Another DALC design question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm new to using .net and data access logic components and I'm getting a bit confused on the best way to design the data layer. I have a table called Document that has a 1 to many relationship with the Reference table. A reference is unimportant outside the context of its document. When displaying the document, I need to display all of its references and when updating the document, I need to update its references. Is it appropriate to place the viewAllReferences() and insertReference() operations into the Document DALC, or should I create a Reference DALC to host these?
 
Since a reference doesn't make sense without a document and since a
reference can't exist without a document you can have the document dalc
perform the access functions on the reference. Or, you could create a
DocumentBusObj that creates a Document DA Object and creates a Reference DA
Object and performs the appropriate data access. My preference would be to
have the Document data access perform the reference data access as long as
in the future there is no likelihood of the need to ever access a reference
without a document. I assume that you will have a Document business entity
and it will have a collection or dataset of References.


jacobryce said:
I'm new to using .net and data access logic components and I'm getting a
bit confused on the best way to design the data layer. I have a table
called Document that has a 1 to many relationship with the Reference table.
A reference is unimportant outside the context of its document. When
displaying the document, I need to display all of its references and when
updating the document, I need to update its references. Is it appropriate
to place the viewAllReferences() and insertReference() operations into the
Document DALC, or should I create a Reference DALC to host these?
 
Back
Top