Figure 3-24: Band names, tracks, and silly descriptions (Web hosting ratings)
Figure 3-24: Band names, tracks, and silly descriptions represented as an ERD. Understanding Referential Integrity Referential Integrity functions just as its name states: It ensures the integrity of referential relationships between tables as defined by primary and foreign keys. In a relation between two tables, one table has a primary key and the other a foreign key. The primary key uniquely identifies each record in the first table. In other words, there can be only one record in the first table with the same primary key value. The foreign key is placed into the second table in the relationship such that the foreign key contains a copy of the primary key value from the record in the related table. Band band_name Track band_name (FK) track_name description Option 1 Band band_name Track band_name (FK) description track_name Option 2 Band band_id band_name Track band_id (FK) track_name description track_id Option 3 Primary key is a composite - inefficient Primary keys are names large key values - inefficient Surrogate keys used - efficient 63 Database Modeling Building Blocks
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.