Entity, Referential and Domain Integrity
The three integrity rules of the relational model: a primary key may not be null, a foreign key must match an existing primary key or be null, and eve...
Material for readers past the basics.
145 notes tagged
The three integrity rules of the relational model: a primary key may not be null, a foreign key must match an existing primary key or be null, and eve...
Super key, candidate key, primary key, alternate key, composite key, foreign key and surrogate key, defined formally with a worked method for finding...
An e-commerce database covering customers, products, carts, orders and payments, including why an order line must copy the price it was sold at rather...
A banking database with a generalisation hierarchy for account types, a many to many customer to account relationship, and a transaction model that ne...
A hospital database designed end to end, including a weak entity for prescription lines, a ternary relationship for treatment, and the privacy decisio...
Seven rules turn any ER diagram into a relational schema: entities become tables, one to many puts a foreign key on the many side, many to many become...
A weak entity has no key of its own and can only be identified through an owner entity. It is drawn with a double rectangle, joined by an identifying...
Cardinality says how many entities on one side may relate to entities on the other; participation says whether every entity must take part. Together t...
A relationship is an association among entities. Relationship types have a degree, may carry their own attributes, and may connect an entity type to i...
A key attribute distinguishes one entity from another. Understanding super keys, candidate keys, primary keys and partial keys at design time prevents...
A single comparison of hierarchical, network, relational, object oriented, object relational and NoSQL models, plus a practical method for choosing a...
The hierarchical model arranges records in a tree with one parent each; the network model allows many parents through a graph of sets. Both used physi...