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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| ||||
| "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 -- |