INFS1000 Lec 5 Data ERD Modelling Flashcards
What are the 4 steps in creating an ERD?
- Identify entities (business objects you need to store info about).
- Identify business rules (relationships).
- Define relationships and represent cardinality (some business objects are actually relationships / associative entities).
- Identify attributes (characteristics of entities).
What are the 3 types of nouns that we discard?
- Nouns that can be calculated (e.g. revenue).
- Nouns that only have 1 instance (e.g. Amazon).
- Nouns that are really attributes / verbs (e.g. gender).
What is a UNARY relationship?
Relationship between 2 diff instances of the same entity.
e.g. employee supervises other employees.
What is a database application FORM used for?
Used to read, insert, modify, and delete data via a use-friendly interface.
What is a database application QUERY used for?
- Means of getting answers from database data.
* Queries feeds into reports
What is a database application REPORT used for?
- Shows data in structured format.
- Computes values (e.g. median).
- Used for analysing data (e.g. average age of customers).
Why would you use an EXTENDED composite primary key? (M:M)
Extend the composite primary key (e.g. with time) to allow for multiple transactions between same subject and object (e.g. hotel guest + room) OVER TIME.
Why would you use a CLASSIFYING relationship? (1:M)
Use a TYPE relationship when an attribute isn’t unique to each entity instance, but to a class (type) of entities.
You can then assign certain attributes to the TYPE (e.g. Rate as an attribute of ROOM TYPE), and others to the object (e.g. floor for ROOM).