Tagged Questions
2
votes
1answer
50 views
How to enforce a nullable foreign key?
I have a relation between two tables. The foreign key table can have a row related in the primary table. There's a way to enforce the value of the FK column to be NULL or one of the values of the PK ...
3
votes
1answer
199 views
Schema design: Use of association (aka: bridge/junction) table vs foreign key constraint with composite index containing a non-key field
This is an inventory database for IT assets. The models used are trimmed in order to focus on the problem at hand. Using SQL Server 2008. Thanks for taking the time to read and for any input you can ...
1
vote
1answer
146 views
Missing PK/FK after database migration
We recently had a server migration. A new server is now the PROD server, and what used to be the PROD server is now the staging environment.
Apparently, the data was transferred correctly, but the ...
1
vote
1answer
341 views
How can I check the integrity of disabled foreign key relationships for each individual table? (SQL Server 2008)
I'm porting a huge legacy database that many different legacy frontends depend on. When I'm finished, a new frontend will be running alongside all the old legacy frontends minus the frontend I ...
1
vote
1answer
407 views
Using a foreign key on multiple fields in one table
Simple question probably.
For two tables. A one to many relation is created from A -> B, TeamID -> Fk_Team, however there are multiple fields that need to reference this one relationship how does ...