Slide 4 Flashcards
Entity Relationship Diagram (ERD)
- A commonly-used conceptual model of data requirements – Others exist…
- The purpose – identifying and understanding the data requirement from a business perspective
- A key advantage - can be easily converted to a relational (tabular) logical model – The relational database model is by far the most commonly used storage method for structured data
Entity Relationship Diagram (ERD) consist of
- 1) Entities,
- 2) Relationships
- 3) Attributes
- 4) Cardinalities.
The Three Phases of Database Design
Conceptual design
logical design
physical design
Conceptual design
modeling business entities and their attributes
– E.g., ERD – Entity-Relationships Diagram
– Similar to an architectural “blue-print” for constructing a building.
Logical design
converting the conceptual model to a specific storage method – E.g., The Relational model – storing the data in twodimensional tables (columns and rows)
Physical design
converting the logical model to a specific DBMS technology – E.g., Oracle, Sybase, MS-SQL, MS-Access
Entity
•An abstract concept that we use to represent key business aspects that we need to capture data about
The entity (or entity-class) represents a type of objects with some common characteristics:
– Persons: agency, contractor, customer, department, division, employee, instructor, student, supplier – Places: sales region, building, room, branch office, campus – Objects: book, machine, part, product, raw material, software license, software package, tool, vehicle model, vehicle – Events: application, award, cancellation, class, flight, invoice, order, registration, renewal, requisition, reservation, sale, trip – Concepts: account, block of time, bond, course, fund, qualification, stock
Entity instance – a specific case of an Entity, eg
– Universities: Boston University, Harvard, MIT, Boston College …
– Actors: Brad Pitt, Julia Roberts, Denzel Washington, Tom Cruise, Hale Berry,…
– Fast-food chains: McDonald’s, Subway, Starbucks, Burger King
In the ERD we represent each entity by a rectangle with the unique name.
– Choose a simple name that makes business sense – Singular – E.g., “Student” not “Students”
Example – Entities in a Casino environment
Which entities are important?
- Resort
- Customer
- Employee
- Product
Relationships
The relationship (or relationship-class) represents how instances that belong to two or more entities are associated with each other in the “real-world” If entities are the “nouns”, relationships are the “verbs”…
A relationship instance is a specific case of a relationship
E.g., Prof. Emily Bailey (entity instance) teaches IS323 (entity instance) to John Robertson (entity instance)
Attributes is:
• Characteristics of an entity or a relationship
Identifier attributes (also known as primary key):
– a set of one or more attributes that uniquely identifies each instance of an entity or relationship
– E.g. Student-ID – unique for each student
– E.g. Course-Number, Semester, Year, Section – together, the combination is unique for each course offering
• Mandatory for each Entity • In the ERD diagram - identifier attributes are underlined