ER Modeling Case Studies

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 Modeling Case Studies
Conceptual Data Modeling: ER
Mapping an ERD to a Relational Database To map an ERD to a relational database, five rules are defined to govern how tables are constructed. 1)Rule for.
Copyright © 2007 Ramez Elmasr and Shamkant B. Navathei Week 3 Outline Overview of Database Design Process Example Database Application (COMPANY) ER Model.
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.
Data modeling using the entity-relationship model Winter 2006Ron McFadyen Entity-relationship model (ER model) P. 49: “This model and its variations.
Class Number – CS 304 Class Name - DBMS Instructor – Sanjay Madria Instructor – Sanjay Madria Lesson Title – ER Model.
Things are bad. Children no longer obey their parents and everyone is writing a book. -- Marcus Tillius Cicero.
ER Modeling Case Studies
Transforming ER & EER diagrams into Relations (Chapter 9)
ER Modeling Case Studies
Data Modeling Using the Entity-Relationship Model
the Entity-Relationship Model
Entities and Attributes
Practice of ER modeling
Instructor :Huda Al-Omair
Principles of Database Systems With Internet and Java Applications Today’s Topic Chapter 2: Representing Information with Data Models The lecture notes.
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model.
Initial Design of Entity Types for the COMPANY Database Schema Based on the requirements, we can identify four initial entity types in the COMPANY database:
CS 405G: Introduction to Database Systems Lecture 2 : Database Design I.
ER-tutorial Conceptual Design
Database Management COP4540, SCS, FIU Database Modeling Using the Entity-Relationship Model (Continued)
E-R to Relational - Basic
Slide Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model.
Tutorial 5 CS 340.
Weak Entity Sets A weak entity is an entity that cannot exist in a database unless another type of entity also exists in that database. Weak entity meets.
Entity-Relationship Model Chapter 3 II COSC 457 Sungchul Hong.
Data Modeling Using the Entity-Relationship (ER) Data Model (Based on Chapter 3 in Fundamentals of Database Systems by Elmasri and Navathe, Ed. 3)
Data Modelling Using Entity-Relationship (ER) Model
Database Design – Lecture 6 Moving to a Logical Model.
Database Systems – ER Diagrams EXAMPLE COMPANY DATABASE Requirements of the Company (oversimplified to illustrate) The company is organized into DEPARTMENTs.
Data Modeling Using the Entity-Relationship (ER) Data Model.
Data Modeling Using the Entity- Relationship (ER) Model.
Chapter 3: Data Modeling Using the Entity-Relationship (ER) Data Model
Introduction to Database Systems
Example COMPANY Database
Chapter 7 Data Modeling Using the Entity-Relationship (ER) Model
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Lecture # 16 July 26,2012 Data Modeling using the Entity Relationship.
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
Comp 1100 Entity-Relationship (ER) Model
Databases (CS507) CHAPTER 7.
Let try to identify the conectivity of these entity relationship
CS4222 Principles of Database System
Data Modeling Using the Entity- Relationship (ER) Model
Database Management Systems
ER model Ashima Wadhwa.
Entity-Relationship Model
Entity Relationship Model
E-R Diagram (Cont.) Draw ER Diagram for the following scenario:
Entity-Relationship Model
ER Diagram Practical Example
Dept. of Computer & Information Sciences
Lecture3: Data Modeling Using the Entity-Relationship Model.
ER Modeling Case Studies
بسم الله الرحمن الرحيم.
Entity-Relationship Modeling "Extended"
Chapter Entity-Relationship Modeling & Enhanced Entity- Relationship Modeling.
Conceptual Data Modeling Using Entities & Relationships
ER Modeling Case Studies
ER Modeling Case Studies
Chapter Entity-Relationship Modeling & Enhanced Entity- Relationship Modeling.
Mapping an ERD to a Relational Database
Entity Relation Model Tingting Zhang.
Entity-Relationship Modeling "Extended"
Entity-Relationship Modeling "Extended"
Presentation transcript:

ER Modeling Case Studies

BanksDatabase :ER Case Study Consider the following set of requirements for a Bank database that is used to keep track of Customer. Each bank has a unique name. Each branch has a number, name, address (number, street, city), and set of phones. Customer includes their name, set of address (P.O. Box, city, zip code, country), set of phones, and social security number. Accounts have numbers, types (e.g. saving, checking) and balance. Other branches might use the same designation for accounts. So to name an account uniquely, we need to give both the branch number to which this account belongs to and the account number. Not all bank customers must own accounts and a customer may have at most 5 accounts in the bank. An account must have only one customer. A customer may have many accounts in different branches.

Banks Database :ER Case Study Design an ER schema for this application, and draw an ER diagram for that schema. Specify key attributes of each entity type and structural constraints on each relationship type. Note any unspecified requirements, and make appropriate assumptions to make the specification complete.

Banks Database :ER Case Study Branch Branch_NO{PK} Name Address Number Street City Phone[1..*] 1..*  has Customer SSN {PK} Name Address [1..*] P.O Box Code City Country Phone [1..*] Account NO 1..1 1..1 Bank Name {PK} 0..* 1..1  Contains Reason of chasm trap : Note all customer should have an account .So we can not answer this question : List all customer available on a specific branch? Owns  0..5 Account Type Balance 0..*

Banks Database :ER Case Study To avoid chasm trap we add this relationship Branch Branch_NO{PK} Name Address Number Street City Phone[1..*] 1..*  has  has 1..* 0..* Customer SSN {PK} Name Address [1..*] P.O Box Code City Country Phone [1..*] Account NO 1..1 1..1 Bank Name {PK} 0..* 1..1  Contains Owns  0..5 Account Type Balance 0..*

Organization :ER Case Study Organization made up of various departments, each having a name, identifying no., and an employee who is the manager. A department may be located in different places. Information about employee includes name, identification number, birth date, address, sex, and salary. Each employee is assigned to one department. The date the manager is appointed to a department is also tracked. Employees may be directly supervised by another employee. Each project within the organization is controlled by a department. Employees (not necessarily from the controlling dept.) are assigned to projects. Information about projects includes project name, no., and location. Hours spent by employees on each project are also kept.

Organization :ER Case Study Draw an ER diagram to represent the data requirements as following: Identify the main entity types. Identify the main relationship types between the entity types. Identify attributes and associate them with entity or relationship types. Determine primary (or partial) key attributes for each entity type. Determine the multiplicity constraints for each relationship. Your EER diagram may or may not include features such as specialization / generalization, aggregation, and composition. State any assumptions necessary to support your design.

Organization :ER Case Study supervises  Supervisee 1..* Employee NO{PK} Name Birthdate Sex Salary Department Dep_NO{PK} Name Location[1..*] \Total_of_employee 0..1 1..* Employee assigns to  1..1 Supervisor 1..1 Manager Manages  0..1 1..* Worker Start Date 1..1 Works on  1..* Hours  Controls Project Pro_NO{PK} Name Location 0..*