If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > Cardinality and referential integrity

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-04-11, 16:47
XGuarden XGuarden is offline
Registered User
 
Join Date: Oct 2011
Posts: 6
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.
Reply With Quote
  #2 (permalink)  
Old 11-06-11, 11:11
jassi.singh jassi.singh is offline
Registered User
 
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
Reply With Quote
Reply

Tags
cardinality, database, power designer, referential integrity, sql server 2008

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On