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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

DALC vs DAO 3
Data components design question 1
Design Issue 1
Data Access Logic Components 3
Using Data Access Logic Components 1
Architecture question 1
Connection Strings 2
How to unlink TOC from a doc 0

Back
Top