Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2011
    Posts
    6

    Unanswered: Cardinality and referential integrity

    Hello,
    I curently using SQL SERVER 2008
    I buiding a database and unfirtunatly I dont make any database for a long time ago.
    I dont remember trick for remember cardinality and if I need to put referential integrity and if yes did I need to select cascase update or delete.

    Exemple:
    What happen if I select cascade delete for an adresse, that will delete everyone living in this adresse? Or if I select cascade delete for a book, that will delete author even if they are referenced for other book?

    I tryed power designer for cardinality but that dont help me, there cardinality are unclear.

    Exemple for an adresse, this adresse have an emplacement(town, contry..)
    But the *town,contry) have a lot of adresse... Witch one are the parent table?

    If you have anything clear that explain how chose good referential integrity and table relation, that will be really appreciate.

  2. #2
    Join Date
    Sep 2011
    Posts
    75
    Quote Originally Posted by XGuarden View Post
    Hello,
    I curently using SQL SERVER 2008
    I buiding a database and unfirtunatly I dont make any database for a long time ago.
    I dont remember trick for remember cardinality and if I need to put referential integrity and if yes did I need to select cascase update or delete.

    Exemple:
    What happen if I select cascade delete for an adresse, that will delete everyone living in this adresse? Or if I select cascade delete for a book, that will delete author even if they are referenced for other book?

    I tryed power designer for cardinality but that dont help me, there cardinality are unclear.

    Exemple for an adresse, this adresse have an emplacement(town, contry..)
    But the *town,contry) have a lot of adresse... Witch one are the parent table?

    If you have anything clear that explain how chose good referential integrity and table relation, that will be really appreciate.
    Hello,

    As far as i know the cascade delete should be for only master fields like UserId etc not for address so i any user i deleted all its data goes while cacade update should be on fro every foreign key field

Tags for this Thread

Posting Permissions

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