about the DataRow.GetParantRows

  • Thread starter Thread starter Tony
  • Start date Start date
T

Tony

Hello!

If we have a the Database with tables Customers and Orders these have a one
to many relationship.
One Customer can have many Orders but one Order can only come from one
Customer.

In all situations that I can see a DataRow will have at most one parent row
in the related DataTable.
So sometime it can be useful to use method GetParentRow to fetch for example
which Customer is the parent to a specific Order.

So my question when is it meant to use the GetParentRows.
I can't find any example when one child have many Parent. if you have a many
to many relation you create a relationstable in between.

//Tony
 
Hi Tony,

Databases can have many to many relationships e.g. a student could be
studying many courses, and courses can have many students.

Kris Sheglova
 
Back
Top