Chapter 18: The REA Data Model Flashcards
3 steps to implementing an REA diagram
- create a table for each distinct entity entity in the diagram and for each many-to-many relationship
- Assign attributes to appropriate tables
- use foreign keys to implement one-to-one and one-to-many relationships.
One-to-One relationships
show 2 entities on REA
Many-to-Many relationships
results in more than one record for each entity
3 types of anomaly
update
insert
delete
Update anomaly
causes problems when every occurrence of a data item is not updated
I
Insert Anomaly
causes difficulties (sometimes impossibility) to insert new data into a table without violating the basic integrity rules
Delete Anomaly
involves unintended loss of data that occurs when deleting a record in a table
Concatenated key
two columns together as the primary key
Entity Integrity Rule
each table MUST have a primary key and the primary key must have value- cant search data if null (blank)
Referential Integrity
Foreign key data MUST match Primary Key or be null (blank)
Steps of Implementing an REA Diagram in a relational Database
- create a table for each entity
- Create a table for each many-to-many relationship
- examine tables with a one-to-one relationship-combine if appropriate
- Identify the attributes and assign the primary key for each table
- Implement relationships using foreign keys