10.07.2015 Views

Using Data Modeler

Using Data Modeler

Using Data Modeler

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Deferrable vs. Non-deferrable (Oracle only)Check constraints for the Oracle DBMS can be identified as non-deferrable ordeferrable. Non-deferrable check constraints verify the validity of an action at the endof the SQL statement. Deferrable check constraints verify the validity of an actioneither at the end of the statement using Initially Immediate, or at the end of thetransaction before it is committed using Initially Deferred.Create RelationshipsRelationships relate tables to one another in a data model using two types ofrelationships—identifying and non-identifying. You can also define the cardinality androles for a relationship, and you can use them in different relationship structures.Identifying RelationshipsAn identifying relationship specifies that a child table cannot exist without the parenttable. When you use an identifying relationship, the primary key of the parent tablemigrates to the child table as a foreign key. The foreign key is embedded in the childtable’s existing primary key constraint as a primary/foreign key. If the child tabledoes not have an existing primary key constraint, the migrating foreign key isassigned as a primary/foreign key creating both a foreign key and a primary keyconstraint.Figure 16An Identifying RelationshipEmbedded Primary/Foreign KeyWhen the foreign key is embedded, it appears as a primary/foreign key in the table.Embedding the foreign key in the primary key enforces the referential integrity of therelationship. This embedding prevents orphan records in the child table by requiringthe deletion of the record in the child table first, before deleting the record in theparent table. It also prevents you from reassigning the primary key to another columnBuilding a New <strong>Data</strong> Model 35

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!