You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar rigor is required for identifying other objects in the real world:
44
-
*[Vehicle Identification Number](https://www.iso.org/standard/52200.html), regulated by the International Organization for Standardization.
45
-
*[Radio-frequency Identification for Animals](https://en.wikipedia.org/wiki/ISO_11784_and_ISO_11785) for implanted microchips in animals.
46
-
*[US Aircraft Registration numbers](https://www.faa.gov/licenses_certificates/aircraft_certification/aircraft_registry/forming_nnumber), the N-numbers seen on the tails, regulated by the FAA.
44
+
*[Vehicle Identification Number](https://www.iso.org/standard/52200.html), regulated by the International Organization for Standardization.
45
+
*[Radio-Frequency Identification for Animals](https://en.wikipedia.org/wiki/ISO_11784_and_ISO_11785) for implanted microchips in animals.
46
+
*[US Aircraft Registration numbers](https://www.faa.gov/licenses_certificates/aircraft_certification/aircraft_registry/forming_nnumber), the N-numbers seen on the tails, regulated by the FAA.
47
47
48
48
These examples demonstrate that establishing a rigorous system for identification may require costly standardization efforts with many systems for enforcement and coordination.
49
49
@@ -54,7 +54,7 @@ Standard nomenclatures are established to standardize names across all instituti
54
54
55
55
Several key aspects of relational database design contribute to maintaining entity integrity:
Each table in a relational database should clearly indicate the type of real-world entity it represents.
60
60
The table name plays a crucial role in conveying this information.
@@ -63,10 +63,11 @@ For instance, if a table is named `Person`, the database must enforce entity int
63
63
However, if the table uses identifiers that do not ensure a 1:1 mapping to actual persons—such as cell phone numbers, which might be shared or changed—a more appropriate table name should be chosen, like `UserAccount`, to reflect the specific entity type being represented.
64
64
This clarity helps avoid confusion and ensures that the database design accurately mirrors the real-world relationships it models.
65
65
66
-
2.**Establish identification tracking**
67
-
For all entities track by the database, select a way to identify entities and track their identity overtime.
66
+
## Step 2. Establish Entity Identification
67
+
For all entities tracked by the database, determine how the entities will be identified in the physical world.
68
+
This may require establishing and enforcing an identification system.
68
69
69
-
3.**Choose Primary Keys and Unique Indexes**
70
+
## Step 3. Define Primary Keys and Secondary Unique Indexes
70
71
71
72
Every table in a relational database must have a **primary key**, and the attributes of the primary key cannot be nullable. This requirement is essential for maintaining **entity integrity**, as it prevents the creation of records that cannot be uniquely identified.
72
73
@@ -124,4 +125,4 @@ What unique indexes does the database need to enforce?
124
125
# Summary
125
126
Entity integrity is a critical aspect of relational database design that ensures the accurate and consistent representation of real-world entities within a database.
126
127
By implementing clear table definitions, enforcing primary keys and unique indexes, and ensuring mandatory primary keys, you can create robust databases that faithfully mirror the real-world entities and relationships they are intended to manage.
127
-
This foundation of entity integrity supports reliable and accurate data management, enabling databases to function effectively in representing and maintaining the integrity of the data they store.
128
+
This foundation of entity integrity supports reliable and accurate data management, enabling databases to function effectively in representing and maintaining the integrity of the data they store.
0 commit comments