You are here: Re: how to have the DB diagram « MsSQL Server « IT news, forums, messages
Re: how to have the DB diagram

Posted by David Portas on 11/10/05 14:43

Foreign key constraints are the method used to enforce relationships
between tables. You can create a foreign key like this:

ALTER TABLE table1
ADD CONSTRAINT fk_table1_table2
FOREIGN KEY (col1) REFERENCES table2 (col1) ;

It is also possible to do it through Enterprise Manager although that's
not something you should ever do on a live database - only use EM on a
development system.

For a database with hundreds of tables you will probably want to use a
ER modelling tool to help with the creation of keys. Visio Enterprise
Architect for example.

--
David Portas
SQL Server MVP
--

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация