Stage 8: Generate and review DDL
Knobit of Data modelling · K-814 · Skill
Recognises a foreign-key cycle taken as resolved
What it means
The header note saying all tables are created first and every foreign key added afterwards as `ALTER TABLE`. The script runs; the design does not. Two tables each mandatory to the other cannot be loaded without deferring a constraint, and not every engine can defer one.
How it is assessed
Flags the deficient case and passes the acceptable one. Deficient: `dim_account.primary_card_key` → `dim_card` and `dim_card.account_key` → `dim_account`, both `NOT NULL`; the DDL deploys and the first load has no row it can insert first Acceptable: One direction made optional, or the "primary card" relationship moved into its own table. The cycle is resolved in the logical model, not worked around in the load (the header note is a prompt, not a solution)
Builds on
- Explains referential integrity and referential actionsK-653 · Knowledge
Needed by
- None