The Entity-Relationship Model

Slides:



Advertisements
Similar presentations
Banking Business Scenario
Advertisements

ER Model For a college DB
ER Modeling Case Studies
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.
ER to Relational Mapping. Logical DB Design: ER to Relational Entity sets to tables. CREATE TABLE Employees (ssn CHAR (11), name CHAR (20), lot INTEGER,
Logical DB Design: ER to Relational Entity sets to tables. Employees ssn name lot CREATE TABLE Employees (ssn CHAR (11), name CHAR (20), lot INTEGER, PRIMARY.
Database Design The process of finding user requirement
ER Modeling Case Studies
Database Management Systems, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
1 The Entity-Relationship Model Chapter 2. 2 Exercise  What can you say about policy of the bank from the ER diagram?  What can you say about the policy.
The Entity-Relationship (ER) Model
SQL Lecture 10 Inst: Haya Sammaneh. Example Instance of Students Relation  Cardinality = 3, degree = 5, all rows distinct.
E/R Exercises – Part I April 16, 2017.
Modeling Your Data Chapter 2. Overview of Database Design Conceptual design: –What are the entities and relationships in the enterprise? – What information.
Database Design Chapter 2. Goal of all Information Systems  To add value –Reduce costs –Increase sales or revenue –Provide a competitive advantage.
1 The Entity-Relationship Model Chapter 2. 2 Database Design Process  Requirement collection and analysis  DB requirements and functional requirements.
ER Modeling Case Studies
1 The Entity-Relationship Model Chapter 2. 2 Overview of Database Design  Conceptual design : (ER Model is used at this stage.)  What are the entities.
Introduction to Accounting Information Systems
Instructor :Huda Al-Omair
Lecture 7 of Advanced Databases
The Relational Model1 ER-to-Relational Mapping and Views.
The Hong Kong University of Science and Technology COMP3311 Spring 2013 Tutorial 1 ER Diagrams.
Normalization Exercise. First Normal Form Second Normal Form.
Lecture 3 Book Chapter 3 (part 2 ) From ER to Relational.
ER & Relational: Digging Deeper R &G - Chapters 2 & 3.
Introduction to Database Systems
Mapping E/R to RM, R. Ramakrishnan and J. Gehrke with Dr. Eick’s additions 1 Mapping E/R Diagrams to Relational Database Schemas Second Half of Chapter.
LECTURE 1: Entity Relationship MODEL. Think before doing it! Like most of the software projects, you need to think before you do something. Before developing.
BIS 360 – Lecture Six (Part 1) Conceptual Data Modeling (Chapter 10 and partial Chapter 12)
Test SEITA.
Example COMPANY Database
Entity Relationship Diagram ERD. Background Peter Chen developed ERDs in Charles Bachman and James Martin have added some slight refinements to.
1 CS122A: Introduction to Data Management Lecture #5 (E-R  Relational, Cont.) Instructor: Chen Li.
Database Management Systems 1 Raghu Ramakrishnan The Relational Model Chapter 3 Instructor: Xin Zhang.
Lecture # 11 & 12 (First Exam) Chapter # 5 The Relational Data Model and Relational Database Constraints Database Systems.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
COP Introduction to Database Structures
Logical DB Design: ER to Relational
The Entity-Relationship Model
Design Concepts & ER Model
MODELS OF DATABASE AND DATABASE DESIGN
ER Diagram Practical Example
Database EER.
ER Modeling Case Studies
The Entity-Relationship Model
Modeling Your Data Chapter 2 cs542
The Entity-Relationship Model
Translation of ER-diagram into Relational Schema
Instructor: Elke Rundensteiner
From ER to Relational Model
The Entity-Relationship Model
The Entity-Relationship Model
DBMS SUBMITTED BY :- MADHU MADHAN Lecturer in Computer engg.
Practice of ER modeling
The Entity-Relationship Model
Example A university registrar’s office maintains data about the following entities: (a) courses, including number, title, credits, syllabus, and prerequisites;
CS4222 Principles of Database System
The Entity-Relationship Model
Faloutsos - Pavlo C. Faloutsos - A. Pavlo Lecture#2: E-R diagrams
ER Modeling Case Studies
More on ER Model and the Relationship Model
The Entity-Relationship Model
Question Which of the following plays an important role in representing information about the real world in a database? Explain briefly 1)DDL.
The Entity-Relationship Model
The Entity-Relationship Model
The Entity-Relationship Model
Quizzes on FD and NF Chapter 19
Quizzes on FD and NF Chapter 19
The Entity-Relationship (ER) Model
Presentation transcript:

The Entity-Relationship Model Chapter 2 The slides for this text are organized into chapters. This lecture covers Chapter 2, on the Entity-Relationship approach to database design. The important issue of how to map from ER diagrams to relational tables is deferred until the relational model and the integrity constraints it supports have been introduced. ER to relational mapping, together with a discussion of the related SQL commands, is discussed in Chapter 3. 1

Exercise name Customer ssn addr acct# balance What can you say about policy of the bank from the ER diagram? What can you say about the policy of the company? CustAcct Account name Employees ssn lot Manages deptid budget Dept 7

Exercise name Customer ssn addr acct# balance CustAcct Account What can you say about policy of the bank from the ER diagram? No joint account; a customer can have multiple accounts Unique SSN for Customer and acct# for Account Can a customer exist in the DB without having an account? Can an account exist without a customer? 7

Exercise What can you say about the policy of the company? name Employees ssn lot deptid budget Dept Manages What can you say about the policy of the company? Each dept must have a single manager A manager can manage multiple depts Unique SSN for Customer and deptid for Dept Can a dept exist in the DB without having a manager? 7

Design Exercise Design a DB using ER, and sketch the resulting diagram. State any important assumptions you made in reaching the design. Show explicitly whether relationships are 1-1, 1-M, or N-M. UVA registrar’s office: It maintains data about each class, including the instructor, students, enrollment, time and place of the class meetings. For each student-class pair, a grade is recorded. Hospital: It maintains all patients visited, including age and address. It also keeps track of the information about billing, visits, data, reason for visit, and treatment. 12