3) Entity Relationship Model Flashcards
(72 cards)
What is the first step in the database design process?
Requirements collection and analysis
Interview prospective database users to understand requirements of database
What does the conceptual database design phase involve?
Create conceptual schema with descriptions of data types, relationships and constraints
Plan the data schema
What are high-level transactions in the database design process?
Main actions users will perform with the database
These actions are called transactions
What is involved in the implementation phase of the database design process?
Transform conceptual schema into implementation data model
Build the database in a system like MySQL or PostgreSQL
What does the physical design phase specify?
Internal storage structures and file organizations for the database
Application programs are designed and implemented as database transactions
What is the purpose of the Entity Relationship (ER) Model?
Visually design a database using diagrams
Helps plan out the structure of your data before building the database
List the main parts of the ER Model.
- Entity
- Attribute
- Key Attribute
- Relationship
- Cardinality
What is an entity in the context of the ER Model?
Thing or object you want to store data about
Examples include student, course, employee
Define an attribute in relation to an entity.
Detail or property of entity
Examples include name, id, email
What is a key attribute?
Attribute that uniquely identifies each entity
Example: id
What does a relationship in the ER Model show?
How two entities are connected
Example: student enrolls in a course
What does cardinality describe in the ER Model?
How many instances are involved in the relationship
Example: One student can enroll in many courses (1:N) and an employee manages one department (1:1)
What are the two types of attributes in an entity or relationship?
Simple and Composite attributes
Simple attributes are not divisible, while composite attributes can be divided into smaller subparts.
What is a single-valued attribute?
A single value for a particular entity
Example: age is a single-valued attribute of a person.
What is a multivalued attribute?
A set of values for the same entity
Example: college degrees attribute of a person.
Define stored attribute.
An attribute that is explicitly stored in the database
Example: birthdate.
Define derived attribute.
An attribute determined by other attributes
Example: age is derivable from the birthdate and the current date.
What does a null value indicate?
The absence of a given attribute value
Example: ApartmentNumber not applicable for a house.
What is an entity type?
A template that defines a group of similar entities
All entities in an entity type share the same set of attributes.
What is an entity set?
The set of entities of the entity type in the data
Example: entity set includes Toyota, Honda, etc.
What do ER diagrams focus on?
The structure (schema) of entities, not the actual data
ER diagrams illustrate relationships and attributes visually.
How are entity types shown in ER diagrams?
As rectangles with the name inside
Example: a rectangle labeled Employee.
How are attributes represented in ER diagrams?
As ovals connected to their entity with straight lines
Example: Name, ID, Age are shown as ovals.
What is a composite attribute?
An attribute that can be broken down into parts
Example: Name can be divided into First and Last.