Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Null Foreign Keys
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Versions des environnements
SQL Server:
SQL Server 2012
Application:
Desktop
Divers
Thread ID:
01622856
Message ID:
01622859
Vues:
48
>Assuming a StockItems Table and a Transactions Table. If I want the Transactions Table to have a Foreign Key into the StockItems, and the StockItems to have a foreign keys into Transactions, there's no way I will be able to add a record in both tables (some Transactions will add StockItems) during the same transaction if I make both Foreign Keys non nullable.
>
>a) Is there?
>b) Is it ok the set foreign keys nullable?
>c) Is it not best practice to cross reference like this?
>d) is there anything else wrong in my reasoning?


Someone might jump in with a reply, but I want to ask this to confirm.

Can you post the table structure for both tables, and confirm what your PK/FK relationships are?

Thanks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform