DATA MODELING AND ENTITY-RELATIONSHIP MODEL II IST 210: Organization of Data IST210 1.

Slides:



Advertisements
Similar presentations
Banking Business Scenario
Advertisements

ER Model For a college DB
More Diagramming & Practice with Relationship Modeling
Exercise 1 Consider the ER diagram below. Assume that an employee may work in up to two departments or may not be assigned to any department. Assume that.
Data Modeling. What are you keeping track of? You begin to develop a database by deciding what you are going to keep track of. Each thing that you are.
CSCI3170 Introduction to Database Systems
Database Lecture Notes Mapping ER Diagrams to Tables 2 Dr. Meg Murray
Data Modeling and the Entity-Relationship Model
Data Modeling and Entity- Relationship Model II. IST2102 I want a database to maintain departments in my company. Store information about my employees,
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
Draw an ER Diagram for the following (record any assumptions):
M.S. Access Module CAS 133 Russ Erdman. M.S. Access Module Assignment Overview Two options for the unit: All students complete Units A, B and C In class.
Entity-Relationship Model and Diagrams (continued)
Ch5: Software Specification. 1 Descriptive specifications  Describe desired properties of system  Three types:
Entity-Relationship Diagrams
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
CHAPTER 2: MODELING DATA IN THE ORGANIZATION © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey.
Systems Analysis and Design in a Changing World, 6th Edition
COMM 226 ERD case: School of Business
The (min,max) notation (1,1) (0,1) (1,N) (1,1). SUMMARY OF ER-DIAGRAM NOTATION FOR ER SCHEMAS Meaning ENTITY TYPE WEAK ENTITY TYPE RELATIONSHIP TYPE IDENTIFYING.
Case study Lisa’s Bookstore IST210.
Entity/Relationship Modelling
Data Modeling and Entity- Relationship Model I IST2101.
Entity Relationship Model Chapter 6. Basic Elements of E-R Model Entity Object of the real world that stores data. Eg. Customer, State, Project, Supplier,
COURSE REGISTRATION SYSTEM Case study IST2101. Case Study: Course Registration (1) IST2102 You are helping Penn State create a course registration system.
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
CSE 441: Systems Analysis & Design
Relational Database Concepts. Let’s start with a simple example of a database application Assume that you want to keep track of your clients’ names, addresses,
CHAPTER 2. FUNDAMENTAL OF ENTITY RELATIONSHIP (ER)
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Instructor :Huda Al-Omair
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
DATABASE DESIGN I IST 210: Organization of Data IST210 1.
Database Design II (Case Studies: Step 2) IST 210: Organization of Data IST2101.
IST 210: ORGANIZATION OF DATA Chapter 1. Getting Started IST210 1.
Entity-Relationship Model. Entity-Relationship Mode What is it? What is it? –Technique for developing an informal organization of tables How does it work?
Lecture 7 of Advanced Databases
Data Modeling IST210 Class Lecture.
1. Objectives At the end of this chapter you should be able to:  Discuss the use and features of a data model  Define the terms entity and attribute.
Relational Database. Database Management System (DBMS)
Database Beginnings. Scenario so far In our scenario we have people registering for training sessions. –The data about the training sessions was placed.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
3 & 4 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Keys Consists of one or more attributes that determine other.
IT 21103/41103 System Analysis & Design. Chapter 04 Data Modeling.
ERD ( Conceptual data model From the statement of data requirements a conceptual data model is produced. This describes.
ACIS Introduction to Data Analytics & Business Intelligence Database s Benefits & Components.
Database Design I (In-Class Exercise Answer) IST 210: Organization of Data IST2101.
THE RELATIONAL MODEL I IST 210: Organization of Data IST210 1.
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
CSE 412/598 DATABASE MANAGEMENT COURSE NOTES 3. ENTITY-RELATIONSHIP CONCEPTUAL MODELING Department of Computer Science & Engineering Arizona State University.
Database Design. Database Design Process Data Model Requirements Application 1 Database Requirements Application 2 Requirements Application 4 Requirements.
Howard Paul. Sequential Access Index Files and Data File Random Access.
ERD case: School of Business Chitu Okoli Associate Professor in Business Technology Management John Molson School of Business, Concordia University, Montréal.
©Silberschatz, Korth and Sudarshan7.1Database System Concepts - 6 th Edition Chapter 7: Entity-Relationship Model.
Data Modeling and Entity-Relationship Model I
Database Design I IST 210: Organization of Data IST2101.
Chapter 1. Getting Started IST 210: Organization of Data IST2101.
G057 - Lecture 05 From Scenario To Design Mr C Johnston ICT Teacher
DATABASE DESIGN II IST 210: Organization of Data IST210 1.
Week 03 – ER Diagram INFOSYS 222.
Let try to identify the conectivity of these entity relationship
IST 210: Organization of Data
Entity relationship diagrams
MIS2502: Data Analytics Relational Data Modeling
MIS2502: Data Analytics Relational Data Modeling
MIS2502: Data Analytics Relational Data Modeling
Conceptual modeling of databases
Database Management system
Entity-Relationship (E-R) Modeling
Presentation transcript:

DATA MODELING AND ENTITY-RELATIONSHIP MODEL II IST 210: Organization of Data IST210 1

Developing an E-R Diagram: Outline 1. Draw Entities Define Attributes Define Identifier 2. Define the relationships Maximum cardinality: One or Many (1:1, 1:N, N:M) Minimum cardinality: Mandatory or Optional 3. Verify and refine IST210 2

Entity-Relationship Diagram IST210 3 UserID Video ID Name Address USER VIDEO Title Description Length Entity Name  Attributes  Identifier  Minimum cardinality MandatoryOptional Maximum cardinality OneMany

Maximum Cardinality: Exercise IST210 4 BUILDINGAPARTMENT BUILDINGAPARTMENT BUILDINGAPARTMENT BUILDINGAPARTMENT Which design is most suitable? (A) (B) (C) (D) has OneMany

Minimum Cardinality: Exercise IST210 5 BUILDINGAPARTMENT BUILDINGAPARTMENT BUILDINGAPARTMENT BUILDINGAPARTMENT Which design is most suitable? (A) (B) (C) (D) has MandatoryOptional

LISA’S BOOKSTORE Case study IST210 6

Case Study: Lisa’s Bookstore (1) IST210 7 You are helping Lisa maintain information of her bookstore. A book contains information about book title, publisher, author names, and publication year. For a publisher, store the information about name, location, phone number. An author’s name and country should be stored in the database.

IST210 8 Draw Entities

IST210 9 BOOKID Title Year Publisher AuthorID Name Country PublisherName Location Phone BOOK AUTHOR PUBLISHER Draw Entities

IST BOOKID Title Year Publisher AuthorID Name Country PublisherName Location Phone BOOK AUTHOR PUBLISHER Publisher and Author should NOT be the attributes of the book! Information of publisher and author for a book is captured by the relationships! Draw Entities

Attribute v.s. Foreign Key Please note that there is NO foreign key concept in E-R diagram. Do not make a foreign key as an attribute in the E-R diagram. For example, PublisherName should NOT be an attribute of the BOOK entity. Their relationship is currently represented by the line and the corresponding min/max cardinality. In Chapter 5, we will learn how to transform a E-R diagram to tables. At that point, some relationships might be transformed into foreign key. IST210 11

IST BOOKID Title Year AuthorID Name Country PublisherName Location Phone BOOK AUTHOR PUBLISHER Maximum cardinality

IST BOOKID Title Year AuthorID Name Country PublisherName Location Phone BOOK AUTHOR PUBLISHER Maximum cardinality

IST BOOKID Title Year AuthorID Name Country PublisherName Location Phone BOOK AUTHOR PUBLISHER Minimum cardinality

IST BOOKID Title Year AuthorID Name Country PublisherName Location Phone BOOK AUTHOR PUBLISHER Minimum cardinality

Case Study: Lisa Bookstore (2) IST A customer can be uniquely identified using his/her address. A customer has information about his/her name, phone number and home address. Lisa wants to track all the book purchases. Each purchase is made by one customer on one book. The price and date of the purchase will be stored in database. A customer may purchase many books or not purchase any book.

IST BOOKID Title Year AuthorID Name Country PublisherName Location Phone BOOK AUTHOR PUBLISHER Add New Entities

IST BOOKID Title Year BOOK PurchaseID Price Date PURCHASE AuthorID Name Country AUTHOR Address Name Address Phone CUSTOMER PublisherName Location Phone PUBLISHER Minimum cardinality Maximum cardinality

IST210 19

IST BOOKID Title Year BOOK AuthorID Name Country PublisherNam e Location Phone AUTHOR PUBLISHER Address Name Address Phone CUSTOMER PurchaseID Price Date PURCHASE

Case Study: Lisa Bookstore (3) IST In Lisa’s bookstore, there are some events organized to interact with the customers. Lisa wants to record the information of events, including event name, type, and date. She also wants to record which customers attend which events.

IST BOOKID Title Year BOOK AuthorID Name Country AUTHOR EventID Name Date Type EVENT Address Name Address Phone CUSTOMER PurchaseID Price Date PURCHASE PublisherName Location Phone PUBLISHER Minimum cardinality Maximum cardinality

IST210 23

IST BOOKID Title Year BOOK AuthorID Name Country AUTHOR EventID Name Date Type EVENT Complete E-R Diagram PurchaseID Price Date PURCHASE Address Name Address Phone CUSTOMER PublisherName Location Phone PUBLISHER

COURSE REGISTRATION SYSTEM Case study IST210 25

Case Study: Course Registration (1) IST You are helping Penn State create a course registration system. Store information about all students, including their student IDs, names, s, and their major departments (assuming student has at most one major department). The department should have information about department name, building name, and phone number.

IST Draw Entities

IST StudentID Name STUDENT DepartName Building Phone DEPARTMENT Minimum cardinality Maximum cardinality

IST StudentID Name STUDENT DepartName Building Phone DEPARTMENT

Case Study: Course Registration (2) IST A course should have information about course ID, course name, and instructor name. Students can take many courses and a course can be registered by many students. We also need to store the final grade for a student in a course.

IST StudentID Name STUDENT DepartName Building Phone DEPARTMENT CourseID CourseName Instructor COURSE Where should we put grade???

Attributes on Relationships? When you need to store some information about a relationship, the relationship should actually be designed as an entity. If we want to store the grades for the relationship between COURSE and STUDENT, we need to make GRADE as a separate entity. If we only want to store which student taking which course, we don’t need a separate entity to capture their relationship. IST210 32

IST StudentID Name STUDENT StudentID CourseID Grade GRADE DepartName Building Phone DEPARTMENT CourseID CourseName Instructor COURSE Minimum cardinality Maximum cardinality

IST210 34

IST StudentID Name STUDENT StudentID CourseID Grade GRADE DepartName Building Phone DEPARTMENT CourseID CourseName Instructor COURSE

Case Study: Course Registration (3) IST A course is offered by a department. We also want to store this information.

IST210 37

IST StudentID Name STUDENT StudentID CourseID Grade GRADE DepartName Building Phone DEPARTMENT Complete E-R Diagram CourseID CourseName Instructor COURSE

IST Reminder Next Thursday (Oct 21 st ) is a big day: Assignment 4 Due Report 2 Due