4.9
Page 1: Implementing Plural Attributes
Initial Table
Implement plural attributes by relocating them to a new weak table.
New Table Structure
Contains the plural attribute along with a foreign key referencing back to the initial table.
Primary key of the new table is a composite key that includes the plural attribute and the foreign key from the initial table.
The new table is closely associated with the initial table, indicating its dependence.
Key Constraints
Primary key cascade rules and foreign key restrict rules must be defined for referential integrity.
Naming Convention
The name of the new table is derived from the initial table name followed by the attribute name to denote its function clearly.
Page 2: Implementing Standard Attributes
Attribute Types
Implement definition of standard attributes using
teIee
type for attribute specification.The type specified for the attribute determines the exact data type for the corresponding column in the database.
Page 3: Implementing Foreign Key Requirements
Foreign Key Constraints
Establish that if the table being referenced has a required entity, the corresponding column in the referencing table must also be marked as required (NOT NULL).
If the referencing table contains a singular entity, the foreign key column is defined as unique.
Ensuring data integrity includes setting specific constraints:
NOT NULL
for required columnsUNIQUE
specification for unique columnsPRIMARY KEY
designation for primary key columns.
Page 4: Steps for Implementation
Activities
7A: Implement plural attributes by creating new weak tables.
7B: Specify cascading and restricting rules for new foreign keys in these weak tables.
7C: Define and specify column data types that correlate with the determined attribute types.
7D: Enforce relationships and attribute cardinality using
UNIQUE
andNOT NULL
constraints.