SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Cardinality
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Mohamed Faisal
Starting Member

26 Posts

Posted - 09/24/2012 :  01:49:57  Show Profile  Reply with Quote
HI All,

I have created a few tables in a database. But how do I cardinality between the tables.For example like 1:N,M:M or 1:N,M:O.
is there a code for to declare them in the tables.

visakh16
Very Important crosS Applying yaK Herder

India
47189 Posts

Posted - 09/24/2012 :  03:05:44  Show Profile  Reply with Quote
nope...its done by means of bridge tables ie tables having reference fields from parent tables. you can mark nature of relationship using data modelling tools

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Mohamed Faisal
Starting Member

26 Posts

Posted - 09/24/2012 :  03:43:51  Show Profile  Reply with Quote
Dear visakh16,

That means there is no coding needed for in the SQL. Then why do we do the cardinality for. Is it part of the designing the database process.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
47189 Posts

Posted - 09/24/2012 :  13:06:32  Show Profile  Reply with Quote
thats what I told. its a concept. the implementation is done by creating a bridge table having id fields from master table as foreign key references. The nature of relationship is specified in database model diagrams created using data modelling tools

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000