Purpose of relations in datasets?

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
 
S

sloan

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.
 
G

Guest

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
 

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top