Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Nadya allow me to add my experiences.
If you have a child table related by a foreign key to a parent table, then there *must* be some restriction on how data is inserted, changed, or deleted in these tables.
Well, there isn't. After you've designed and implemented a few dozen real world databases, you might discover that things don't fall nicely into your textbook definitions. This is why RDBMSs provide the flexibility to define foreign keys with and without constraint rules.
I know for lookup table, most of real world databases uses Update (Restricted), Delete (Restricted or Ignore {Sometimes you *do* want the deletion of the parent record to leave orphaned child records}) and Insert (Ignore, don’t care about value, because Sometimes you *do* want to insert child records that are not related to an existing parent record, or everything enter by selecting value from lookup table).
Thanks
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement