ERD Diagram Assignment
SECTION 1
Data Fundamentals Overview
Section Beginning (Dark Color Option )
1
Fundamental relationship
Relationship between two entity types
A person, place, or thing “acts” upon something to complete ”x” (i.e. purchase a product)
Binary Relationships
Data Fundamentals Overview
Salesperson
Product
Sells
2
Represents the maximum number of entities that can be involved in a relationship.
One-to-One Binary Relationship
One-to-Many Binary Relationship
Many-to-Many Binary Relationship
Cardinality
Data Fundamentals Overview
3
The minimum number of entity occurrences that can be involved in a relationship.
“inner” symbol on E-R diagram (“outer” symbol is cardinality)
Modality
Data Fundamentals Overview
Everyone order has exactly ONE customer AND Every customer has one or more ORDERS
4
Associate occurrences of an entity type with other occurrences of the same entity type.
Unary Relationships
Data Fundamentals Overview
5
A single occurrence of one entity type can be associated with a single occurrence of the other entity type and vice versa
1:1 Relationships
Data Fundamentals Overview
Student
Student ID #
6
Use “crow’s foot” to represent the multiple association.
“many” = the maximum number of occurrences that can be involved, means a number that can be 1, 2, 3, ... n.
1:M Relationships
Data Fundamentals Overview
Company
Product A
Product B
Product C
7
“Many” can be either an exact number or have a known maximum.
M:M Relationships
Data Fundamentals Overview
Musicians
Albums
Musicians
Musicians
8
Involves three different entity types
Ternary Relationships
Data Fundamentals Overview
9
Describes the relationship between two entities.
Used with many-to-many relationships.
Represented on E-R diagram as an “associative entity”
Intersection Data
Data Fundamentals Overview
10
Entities can have attributes; many-to-many relationships can have attributes.
Many-to-many relationship may be treated similarly to entities in an E-R diagram.
Associative Entity
Data Fundamentals
11
SECTION 2
Data Modeling Creation
Section Beginning (Dark Color Option )
12
A diagramming technique
Diagrams entities (with attributes) and the relationship between the entities.
There are many variations of E-R diagrams in use.
The E-R Diagram
Data Fundamentals Overview
13
Entity Relationship Diagram Basics
Entity type’s attributes are shown below the separator line.
PK and boldface denote the attribute(s) that constitute the entity type’s unique identifier
Rectangular shape
OBJECT = a type of entity
Name of entity is in caps above the separator line.
Data Fundamentals Overview
14
In an ER diagrams, common practice is to a convention that entity type and relationship type names are uppercase letters, attribute names have their initial letter capitalized, and role names are lowercase letter
Data Definition & Naming Conventions
Data Fundamentals Overview
15
SECTION 3
Assignment
Section Beginning (Dark Color Option )
16
Each book has an id, title, publication date, publisher, ISBN, functional category, page count, price (publisher), and product description
There are 3 categories of book: fiction, non-fiction, and specialty
There are 2 categories of music: digital and media-based
An author can write one or more books.
A musician can be a solo artist, part of a group, or both
An author can also be associated with one or more publishers.
A musician/group/act can be associated with one or more music houses
An author’s book can have one or more editions.
A song and or album can have more than one version/edition (i.e. EP, LP, CD, DVD etc)
A publisher can have many authors and many books.
A record company can have many artists associated and many albums associated with it.
A record company can also be the publishing company (i.e. self-publishing)
\
Many ISBNs can also be associated with a given publisher but only one ISBN per form of medium (ie the ISBN is the PK no matter what).
An author can write many books.
An artist can write many songs, albums etc.
UCOnline needs to keep track of user ratings for each item sold in the online store (e.g., 1-5 and 1 for ‘Dislike’, to 5, for ‘Awesome!’).
A particular user rates a particular item at a given time.
A user CANNOT rate the same multiple times unless there are multiple editions of the item. Each edition can be rated separately.
Each user who submits a rating will be identified by a unique id and has a name, gender, age, and location. Nothing is anonymous.
There is also a social network between users. Users can send communication requests (i.e. instant messages/emails) to other users. Such requests can be accepted or ignored. Once accepted, the two users are considered ‘book buddies.’ If ignored, the user can send the request again. We want to add a store when the requests were sent (timestamp), the result of the requests and when the request was answered (timestamp).
Tools
Visio
Visual Paradigm Online
SQLDBM
Draw.io
ERDPlus
Lucidchart