Data Layer Relationships



Hello All,

I have a design question about the relationship between data layers
in a class structure. Continuing my previous example with
ActiveDirectoryDomain and ActiveDirectoryGroup classes, I was wondering
on the relationship (if any) that should be established between the
Data Layer classes? Here's a quick UML diagram of the structure...

1 *
[ActiveDirectoryDomain] ------------ [ActiveDirectoryGroup]
| |
| |
| |
[ActiveDirectoryDomain_Data] [ActiveDirectoryGroup_Data]

Now, of course the business layers of the 2 classes are related, but
should their data layers be related as well? For instance, should
ActiveDirectoryDomain_Data know about ActiveDirectoryGroup_Data? My
original thought was that it should not! I thought that all
communication between the 2 classes should happen on the business
layer, not the data layer. But then, I got to designing specific
methods within the data layer. One such method is
ActiveDirectoryDomain_Data.GetGroups(). This method is responsible for
querying the domain controller and returning all of the groups within
the domain. Now, do I just return an array of strings, or should I
return an array of ActiveDirectoryGroup objects? My OO instincts tell
me to return the array of Group objects, but then I would have to
introduce the relationship between the Domain_Data and Group_Data
classes?

Any suggestions or furture reading on Data Layer Relationships /
Dependencies would be very much appreciated.

Thank you all,
~ Guruk

.