about the DataRow.GetParantRows

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
 
K

Kris Sheglova

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
 

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

Top