none
dataset RRS feed

  • Question

  • As I create various relationships among tables in my dataset (using the dataset designer), must I also create corresponding relatiosnhips in the underlying sql database tables?

     

    Monday, April 28, 2008 4:28 PM

Answers

  • You don't have to but in general it would make sense.  Typically it is more structurally sound to enforce the data relationships on the server side because this way no one can bypass the constraint.

     

    Or as my old dba used to say:

     

    If you let garbage data into your database you will end up with a database full of garbage sooner or later.

     

    Monday, April 28, 2008 5:36 PM

All replies

  • You don't have to but in general it would make sense.  Typically it is more structurally sound to enforce the data relationships on the server side because this way no one can bypass the constraint.

     

    Or as my old dba used to say:

     

    If you let garbage data into your database you will end up with a database full of garbage sooner or later.

     

    Monday, April 28, 2008 5:36 PM
  • Thanks!

     

    Based on your comment, maybe I should ask the reverse question:  If I enforce relationships on the server side, but make changes in my dataset, and if I add or modify a relationsip, is it best to update the dataset by deleting and replacing it wholesale or is there a more elegant way to make the update?

     

     

     

    Monday, April 28, 2008 6:01 PM
  • Ok, so you want to have changes in relationships on server side somehow automatically update the relationships on the client side in your DataSets?

     

    I am really not sure to be honest.  I found if I add tables to dataset designer in VS.NET 2008 it automatically locates the server relationships and set's these up for me inside the DataSet.  However I don't see a way to refresh this information once the dataset is created.

    Monday, April 28, 2008 8:57 PM
  • Ok, thanks very much for your responses.

     

    Monday, April 28, 2008 9:33 PM