INF1343, Week 4 Database Design and ER Modeling This presentation is licensed under Creative Commons Attribution License, v To view a copy of this.

Slides:



Advertisements
Similar presentations
ER Model For a college DB
Advertisements

More Diagramming & Practice with Relationship Modeling
Information System Analysis Lab 7. ERD entity-relationship diagram is a data modeling technique that creates a graphical representation of the entities,
Chapter 2.1 V3.1 Napier University Dr Gordon Russell
Entity Relationship (E-R) Modeling Hachim Haddouti
ENTITY RELATIONSHIP MODELLING
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Chapter 4 Entity Relationship (E-R) Modeling
Entity Relationship (ER) Modeling
IT420: Database Management and Organization
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 6.
SLIDE 1IS Fall 2002 Database Design: Conceptual Model and ER Diagramming University of California, Berkeley School of Information Management.
9/7/1999Information Organization and Retrieval Database Design: Conceptual Model and ER Diagramming University of California, Berkeley School of Information.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke Database Processing Tenth Edition Chapter 5 Data.
Review Questions What is data modeling? What is the actual data model that is created called? Data modeling is a technique for organizing and documenting.
SLIDE 1IS Fall 2002 Information Systems Planning and the Database Design Process University of California, Berkeley School of Information.
Chapter Five Data Modeling with the Entity-Relationship Model.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 3 The Entity- Relationship Model.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 6.
SLIDE 1IS 257 – Spring 2004 Information Systems Planning and the Database Design Process Ray R. Larson University of California, Berkeley.
SLIDE 1IS 257 – Spring 2004 Database Design: Conceptual Model and ER Diagramming Ray R. Larson University of California, Berkeley School of.
Slide 1 Chapter 05 – Part 1 Data Modeling with the Entity-Relationship Model.
Data Modeling and Entity- Relationship Model I IST2101.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke’s Chapter Five: Data Modeling with the Entity-Relationship.
Data Modeling and Relational Database Design. Analyze and model the relationships between entities Draw an initial entity relationship diagram Read the.
Data Modeling using Entity Relationship Diagramming (ERD)
1. 2 Data Modeling 3 Process of creating a logical representation of the structure of the database The most important task in database development E-R.
2.3 Organising Data for Effective Retrieval
Outline What is ER Model? And Why? Example COMPANY Database
Practice of ER modeling
Instructor :Huda Al-Omair
Data Modelling – ERD Entity Relationship Diagram’s Entity Relationship Diagrams and how to create them. 1.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-1 David M. Kroenke’s, 10 th ed. Chapter.
Chapter 7 Data Modeling with Entity Relationship Diagrams
advanced data modeling
MIS2502: Data Analytics Relational Data Modeling
Dr Gordon Russell, Napier University Data Analysis 1 - V2.0 1 Data Analysis 1 Unit 2.1.
Data Modeling Using the Entity- Relationship (ER) Model.
data modeling with visio
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Five: Data Modeling with the Entity-Relationship.
Data Modeling and Entity-Relationship Model I
Chapter 7 Data Modeling Using the Entity-Relationship (ER) Model
INF1343, Winter 2012 Data Modeling and Database Design Yuri Takhteyev Faculty of Information University of Toronto This presentation is licensed under.
CCT395, Week 4 Database Design and ER Modeling This presentation is licensed under Creative Commons Attribution License, v To view a copy of this.
INF1343, Winter 2011 Data Modeling and Database Design Yuri Takhteyev University of Toronto This presentation is licensed under Creative Commons Attribution.
INF1343, Week 6 Implementing a Database with SQL This presentation is licensed under Creative Commons Attribution License, v To view a copy of this.
CCT395, Week 6 Implementing a Database with SQL and a Case Study Exercise This presentation is licensed under Creative Commons Attribution License, v.
INF1343, Winter 2012 Data Modeling and Database Design Yuri Takhteyev Faculty of Information University of Toronto This presentation is licensed under.
CCT396, Fall 2011 Database Design and Implementation Yuri Takhteyev University of Toronto This presentation is licensed under Creative Commons Attribution.
CCT396, Fall 2011 Database Design and Implementation Yuri Takhteyev University of Toronto This presentation is licensed under Creative Commons Attribution.
CCT395, Week 5 Translating ER into Relations; Normalization This presentation is licensed under Creative Commons Attribution License, v To view a.
Translating ER into Relations; Normalization
Database Design: Conceptual Model and ER Diagramming
Special Topics in CCIT: Databases
Entity-Relationship Modelling
Database Design and Implementation
Data Modeling and Database Design INF1343, Winter 2012 Yuri Takhteyev
Database Design and Implementation
Data Modeling and Database Design INF1343, Winter 2012 Yuri Takhteyev
بسم الله الرحمن الرحيم.
Entity-Relationship Modeling "Extended"
Entity-Relationship Modelling
MIS2502: Data Analytics Relational Data Modeling
Database Systems Instructor Name: Lecture-9.
Relationships—Topics
Database Processing: David M. Kroenke’s Chapter Five:
MIS2502: Data Analytics Relational Data Modeling 2
Entity-Relationship Modeling "Extended"
Entity-Relationship Modeling "Extended"
Presentation transcript:

INF1343, Week 4 Database Design and ER Modeling This presentation is licensed under Creative Commons Attribution License, v To view a copy of this license, visit This presentation incorporates images from the Crystal Clear icon collection by Everaldo Coelho, available under LGPL from Yuri Takhteyev University of Toronto January 24, 2010

Announcements 1.Assignment 1 due now. Submit late assignments via as PDF. 2. Assignment 2 to be posted today. (Due in 3 weeks. Start early.) 3. No office hours today.

Schedule Intro SQL Design Interfacin g Etc.

| Tables_in_diveshop | | BIOLIFE | | BIOSITE | | DEST | | DIVECUST | | DIVEITEM | | DIVEORDS | | DIVESTOK | | SHIPVIA | | SHIPWRCK | | SITES |

1. Serves the purpose. 2. Simplifies updates. 3. Avoids “anomalies”. Good DB Design

Two Approaches 1. Start with whatever, then fix it 2. Start by modeling ER Modeling

Database Design requirements analysis implementation deployment design

clientyoudatabaseusers the problem functional specification clarification a design a schema use feedback a new problem

Functional Specifications What is the system going to do? (Not how, but what.)

Course Enrollment What do we want from a course enrollment system?

“Use Cases” A student wants to enroll in a course for the next semester. The student goes to the website for the enrollment system and logs in. The student is presented with a list of courses there he or she is enrolled in. There is a button next to each course to un-enroll from it. There is also a search box that the student can use use to look for courses that they are not enrolled in. The student can find the course by the course code or course title...

ER Model E is for “Entities” R is for “Relationships” (“relationships” != “relations”)

“Use Cases” A student wants to enroll in a course for the next semester. The student goes to the website for the enrollment system and logs in. The student is presented with a list of courses there he or she is enrolled in. There is a button next to each course to un-enroll from it. There is also a search box that the student can use use to look for courses that they are not enrolled in. The student can find the course by the course code or course title...

Entities The “things” we need to keep track of in our database: students courses instructors rooms time slots

student last name first name utorid date of birth attributes programcoursepayment other entities

student last name first name utorid date of birth programcoursepayment other entities a date up to 8 letters or numbers what alphabet? phone number Local? Domestic? “domains”

student last name first name utorid date of birth “Chen’s notation”

student last name first name utorid date of birth “UML notation” (simplified)

program course payment student last name first name utorid date of birth

program name code course code title payment amount date session code start date student is in a program student made a payment student enrolls in a course course is offered in a session student last name first name utorid date of birth course belongs to a program

A Movie Database What are the entities? Which are related?

Cardinality student last name first name utorid date of birth payment amount date payment amount date payment amount date payment amount date payment amount date one student, many payments “one-to-many” relationship

student last name first name utorid date of birth payment amount date “Crow’s Foot Notation”

not more than 1many “Crow’s Foot Notation”

at least 1 (mandatory) could be 0 (optional) “Crow’s Foot Notation” N

just one zero or many “UML Notation” 1..1 or just “1” 0..N or “0..*” N

at least 1 (mandatory) “Weak Entity” a weak entity studentpayment

More Examples worldcharacter speciespet courseassignment ???

Variations ownerpet manageremployee ???

Questions on 1:M?

WeWe ❤ 1:M Because they are really easy to represent in a relational database.

Many-to-Many student last name first name utorid date of birth course code title

Examples bookauthor personaddress courseinstructor ???

Movie Database Which relationships are 1:M and which are M:M?

We ! ❤ M:M Because they cannot be represented in a relational database.

Breaking Up M:M student last name first name utorid date of birth course code title

“Associative Entity” student last name first name utorid date of birth course code title enroll ment

Examples book author author ship ??? person address reside nce

Questions on M:M?

One-to-One ???

One-to-One ???

One-to-One enginecar the engine is installed in the car engines in stock cars shipped

Examples citymayor captainship chef signature dish ???

Recursive Relationships person likes

Recursive Relationships person likes

Examples employee tax return coin image ??? is filed jointly with supervises is the flip side of ???

N-nary Relationships seller sold (what?) to the buyer sellerbuyer house seller sold house (to whom?) buyer bought house (from whom?)

N-nary Relationships seller buys a house from buyer sellerbuyer house

N-nary Relationships seller house buyer sale

Putting It Together ● OpenOffice Draw – Free / open source – Available in the lab – You can get “Crow’s Foot” templates at – Alternatively, do UML notation (“n..m”) by hand ● Microsoft Visio ● Your favorite software Options for software:

Questions?