Unix Technical Forum

lookup table relationships best practice

This is a discussion on lookup table relationships best practice within the SQL Server forums, part of the Microsoft SQL Server category; --> What is the best way to setup relationships between one lookup table and many other tables. The tables did ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 07:27 AM
abefuzzleduser2@yahoo.com
 
Posts: n/a
Default lookup table relationships best practice

What is the best way to setup relationships between one lookup table
and many other tables. The tables did not have any lookup table
relationships which I am adding. One lookup table is used for same data
in several different places.

To use one lookup tables with several tables, I had to disable "Cascade
Update" and only have "enforce relationships for updates and inserts"
checked.

Any pros/cons?

Thanks in advance.
P

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 07:27 AM
David Portas
 
Posts: n/a
Default Re: lookup table relationships best practice

"Lookup table" doesn't mean anything in a relational database. There is only
one type of table.

You define relationships between tables with a foreign key. Unfortunately
SQL Server will only allow cascaded updates and deletes on one key per
table. However, in many cases cascaded updates are undesirable and since
it's fairly easy to code the same you probably won't miss this feature most
of the time.

--
David Portas
SQL Server MVP
--


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:38 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com