Results 1 to 2 of 2

Thread: What's the point of DBase referential integrity with VB.NET ?

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2002
    Location
    UK
    Posts
    2

    What's the point of DBase referential integrity with VB.NET ?

    I've grown up through the route of setting up all your referential integrity in the database first (usually use MS-Access relationships feature and enforce constraints as appropriate) and letting the RDBMS handle all of that.

    Now with VB.NET, I've noticed you can do all this via creating a dataset.

    I'm just a bit confused now....where should the referential integrity rules be placed: in the DBase or in the VB.NET application ? If I can still leave it in the DBase, should I be even mucking around with setting relationships and constraints through the dataset ?

  2. #2
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    Datasets are just a in memory cache of your data in the database and as MS claims in MSDN:
    Although a dataset contains tables and columns as in a database, it does not inherently include a database's ability to relate tables.However, you can create DataRelation objects that establish a relationship between a parent (master) and a child (detail) table based on a common key.
    So in case you have some related tables in database the corresponding tables in dataset are not related. So you may enter some data in these table which are against the relation rules but updating your database with these data will fail and generate error. In case you create relations in datasets then you can rest assured of refrential integrity at dataset level.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width