I think you'll find this a worthwhile read:

http://paulstack.co.uk/blog/post/have-orms-introduced-extra-complexity-into-our-codebase.aspx

On Sep 1, 3:59 am, jwz <[email protected]> wrote:
> I'm new to VB.NET, after using VB6 for a decade or so. A friend and
> some books are what I'm using to learn. My friend taught me about the
> Data Access Layer, and I've created some simple classes for simple
> tables. For example, I have a supplier class for the supplier table,
> and a part class for the part table, and an order class for the order
> table. Each class provides the ability to read, update, insert,
> delete, etc., its table.
>
> My question comes in when I need to join tables. For example, if I
> want to join the part table and the order table, each class only knows
> about its table. The select statement in the part class doesn't have
> access to the column definitions in the order class, and vice versa.
>
> When I asked my friend about this, he said I should create a Join
> class. In this class, one of the classes, say the part class, is
> inherited, but I need to define the fields from the order class that I
> want to retrieve.
>
> My problem with this is that if I have several of these join classes,
> then I've duplicated several table definitions, and if I change a
> table in the database, I have to change not only the class that
> represents that table, but I also have to track down all of the Join
> classes this table is defined in, and change them.
>
> It seems like there should be a better way, but I haven't been able to
> find it.
>
> Should I include all of the tables from the database into a single
> class, so that I can reference any table that I need to join?
>
> Is there some other, better way?
>
> Thanks for the help.
>
> Joel

-- 
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net

Reply via email to