Week 2 (Chapter 4 - Entity Relationship Modelling) Flashcards
What is an entity? How is it represented in an ERD?
This is an object of interest to the end user. Refers to the entity set and not to a single entity occurency.
Represented by a single rectangle with the entity’s name, name is in all caps AND SINGULAR ONLY
E.g. A table is an entity, a row is not an entity.
What is an entity occurence/instance?
This is a single aspect of an entity.
E.g. An entity occurence of a table is a row.
What are attributes?
These are the characteristics that describe an entity.
E.g. An entity, student, has attributes such as first/last name, initials, email, phone number etc.
What is the difference between required and optional attributes?
A required attribute MUST have a value (cannot be empty)
An optional attribute CAN have empty values.
What is the difference between required and optional attributes?
A required attribute MUST have a value (cannot be empty)
An optional attribute CAN have empty values.
What are domains?
These are the set of possible values of a given attribute.
E.g. height range, GPA, gender etc.
NOTE: Attributes can share domains.
What are identifiers?
These are attributes that uniquely identify each entity instance.
E.g. A primary key is an identifier.
What is the difference between composite and simple attributes?
Composite attributes is an attribute that can be subdivided to yield additional attributes
Simple attributes cannot be subdivided.
E.g. An address is a composite attribute (post code, street name, street number, city, state). However, sex or first name are simple attributes.
What is the difference between a single-valued and a multi-valued attribute?
Single-valued attributes can only have ONE value.
A multi-valued attribute can have multiple values.
A product’s serial number can only be one value therefore it is single-valued. A multi-valued attribute can incude car colours, heights, material type etc.
What are derived attributes?
These are attributes that have a value calculated from other attributes. Not stored, rather calculated with an algorithm.
What are derived attributes?
These are attributes that have a value calculated from other attributes. Not stored, rather calculated with an algorithm.
Steps of data base design?
- Conceptual
- Logical
- Physical
Can an entity ahve multiple keys?
NO, only a single key per entity
can have composite which is a single key created from 2 or more attributes
Are linking tables considered entities?
NO
Do you specify primary/foreign keys during the conceptual design stage?
No, we DO NOT assume the database type in this stage