Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 how to create subtype tb by using this ER-Diagram?

Author  Topic 

Novox
Starting Member

1 Post

Posted - 2007-06-26 : 07:47:03
Hello.. I have a problem only on this relation (supertype and subtype) I have no idea how to create the table in MSSQL2000. I have try all the way that I can guess.. but unfortunately I can't solve this problem >,< I try to build it in diagram but can't.. in diagram I can create only normal relation.. would you please help or advise me some SQL code or the way to create it.. thank you in advance!

Supertype and Subtype ER-Diagram is below:

pootle_flump

1064 Posts

Posted - 2007-06-26 : 11:09:10
Do you mean you want to create a contraint so that a supertype can only be one subtype?
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-06-26 : 12:09:32
if that's so you simply use check constraints on your column.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

pootle_flump

1064 Posts

Posted - 2007-06-26 : 13:27:04
Personally I prefer RI for efficiency.
Go to Top of Page
   

- Advertisement -