Purpose of relations in datasets?

  • Thread starter Thread starter Bobby Edward
  • Start date Start date
B

Bobby Edward

I have a fully relational mysql database (pk, fk, etc)

If I setup a xsd dataset with 2 related tables do I have to create the
relation there too? What's the purpose? Is it just a 'reminder' or does it
have an effect on whether the pk/fk constraints are enforced or not at the
db level???

Thanks
 
Here is an article:
http://msdn.microsoft.com/en-us/library/dbwcse3d(VS.80).aspx

I would say that the GetChildRows based on the relationship (name) is kinda
the useful method from my experience:
http://msdn.microsoft.com/en-us/library/system.data.datarow.getchildrows(VS.80).aspx

So if you have Orders and OrderDetails, and you name the relationship
"OrderToOrderDetailsRelationship"....you can use that name to pull the child
records of course.

This is kinda obvious observations, I'm just expressing what I've used in
the past with that exact feature.

If you write a self referencing relationship, you can use this to populate
something like a TreeView.
 
I have a fully relational mysql database (pk, fk, etc)

If I setup a xsd dataset with 2 related tables do I have to create the
relation there too?  What's the purpose?  Is it just a 'reminder' or does it
have an effect on whether the pk/fk constraints are enforced or not at the
db level???

Thanks

Could be useful with nested controls, for example when you have a
Repeater with a nested GridView
http://groups.google.com/group/micr...read/thread/e7bf33bdf43e6d5d/7cf1f7a4128c5ad7
 
Back
Top