E-R Diagram (Cont.) Draw ER Diagram for the following scenario:

Slides:



Advertisements
Similar presentations
ER Model For a college DB
Advertisements

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
Data Modeling using the Entity-Relationship (ER) Model
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.
CS 405G Introduction to Database Systems
ER Modeling Case Studies
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas.
Data Modeling Using the Entity-Relationship Model
the Entity-Relationship Model
Lecture 2: Entity-Relationship Modeling
Advanced Entity Relationship Concepts. Advanced Concepts UIDs Intersection Entities Recursive Relationships Roles Subtypes Exclusivity Historical Fan.
Entities and Attributes
Outline What is ER Model? And Why? Example COMPANY Database
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Practice of ER modeling
Instructor :Huda Al-Omair
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
Introduction to Database Systems
Data Modeling Using the Entity-Relationship
ER Data Models Ctd. CSET 3300.
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:
DBMS Module 1 ER Modeling.
3 & 4 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Keys Consists of one or more attributes that determine other.
Data modeling using the entity-relationship model Chapter 3 Objectives How entities, tuples, attributes and relationships among entities are represented.
Database Management COP4540, SCS, FIU Database Modeling Using the Entity-Relationship Model (Continued)
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)
Copyright Ó Oracle Corporation, All rights reserved. Assign Unique Identifiers A Unique Identifier (UID) is any combination of attributes and/or.
Database Systems – ER Diagrams EXAMPLE COMPANY DATABASE Requirements of the Company (oversimplified to illustrate) The company is organized into DEPARTMENTs.
IT2005 System Analysis & Design
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 3 Data Modeling Using Entity-Relationship Model.
Data Modeling Using the Entity- Relationship (ER) Model.
Chapter 3: Data Modeling Using the Entity-Relationship (ER) Data Model
Introduction to Database Systems
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems.
Example COMPANY Database
Chapter 7 Data Modeling Using the Entity-Relationship (ER) Model
Comp 1100 Entity-Relationship (ER) Model
Entity/Relationship Modelling
Databases (CS507) CHAPTER 7.
Chapter 3 Data Modeling Using the Entity-Relationship Model
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
Entity-Relationship Model
ER Modeling Case Studies
بسم الله الرحمن الرحيم.
Entity-Relationship Modeling "Extended"
Data Modeling with Entity Relationship Diagrams (Cont.)
Initial Design of Entity Types: EMPLOYEE, DEPARTMENT, PROJECT, DEPENDENT Gender.
CS4222 Principles of Database System
376a. Database Design Dept. of Computer Science Vassar College
Conceptual Data Modeling Using Entities & Relationships
ER Modeling Case Studies
ER Modeling Case Studies
Mapping an ERD to a Relational Database
Entity Relation Model Tingting Zhang.
Entity-Relationship Modeling "Extended"
Entity-Relationship Modeling "Extended"
Presentation transcript:

E-R Diagram (Cont.) Draw ER Diagram for the following scenario: A video store rents movies to members. Each movie in the store has a title and is identified by a unique movie number. A movie can be in VHS, VCD, or DVD format. Each movie belongs to one of a given set of categories (action, adventure, comedy, ... ) The store has a name and a (unique) phone number for each member. Each member may provide a favorite movie category (used for marketing purposes).

There are two types of members: 1. Golden Members: Require their credit card and can rent more than one movie each time. 2. Bronze Members: Don't require their credit card and can rent only A member may have a number of dependents (with known names). Each dependent is allowed to rent one (1) movie at a time.

A video store rents movies to members.

Each movie in the store has a title and is identified by a unique movie number.

A movie can be in VHS, VCD, or DVD format.

The store has a name and (unique) phone number for each member.

Each movie belongs to one of a given set of categories (action, adventure, comedy, ... )

E-R Diagram for library management system

In the library Management system, the following entities and attributes can be identified. Book -The set of all the books in the library. Each book has a Book-id, Title, Author, Price, and Available (y or n) as its attributes. Member-The set of all the library members. The member is described by the attributes Member_id, Name, Street, City, Zip_code, Mem_type, Mem_date (date of membership), Expiry_date. Publisher-the set of all the publishers of the books. Attributes of this entity are Pub_id, Name, Street, City, and Zip_code. Supplier-the set of all the Suppliers of the books. Attributes of this entity are Sup_id, Name, Street, City, and Zip_code. Assumptions: a publisher publishes a book. Supplier supplies book to library. Members borrow the book (only issue). Return of book is not taken into account

E-R Diagram for company Database

The company is organized into DEPARTMENTs. Each department has a name, number, and an employee who manages the department. We keep track of the start date of the department manager. A department may have several locations. Each department controls a number of PROJECTs. Each project has a name, number, and is located at a single location. We store each EMPLOYEE's social security number, address, salary, sex, and birth date. Each employee works for one department but may work on several projects. We keep track of the number of hours per week that an employee currently works on each project. We also keep track of the direct supervisor of each employee. Each employee may have a number of DEPENDENTs. For each dependent, we keep their name, sex, birth date, and relationship to the employee.

1. MANAGES: A 1:1 relationship type between EMPLOYEE and DEPARTMENT. Employee participation is partial. Department participation is total. The attribute StartDate is assigned to the relationship type. 2. WORKS_FOR: A 1:N relationship type between DEPARTMENT and EMPLOYEE. Both participations are total.

3. CONTROLS: 4. SUPERVISION: A 1:N relationship type between DEPARTMENT & PROJECT. The participation of Project is total, whereas that of Department is partial. 4. SUPERVISION: A 1:N relationship type between EMPLOYEE (supervisor role) & EMPLOYEE (supervisee role). Both participations are partial.

5. WORKS_ON: 6. DEPENDENTS_OF: An M:N relationship with attribute Hours. A project can have several employees working on it. Both participations are total. 6. DEPENDENTS_OF: A 1:N relationship type between EMPLOYEE & DEPENDENT. The participation of Employee is partial where as that of dependent is total.

E- R Diagram for Banking System: Case Study: Page No. 49

E-R Diagram for University database

The university keeps track of each student's name, student number, social security number, current address and phone number, permanent address and phone number, birthdate, sex, class (freshman, graduate), major department, minor department (if any), degree program (B.A., B.S., ... Ph.D.).  Some user applications need to refer to the city, state, and zip code of the student's permanent address and to the student's last name.  Both social security number and student number are unique for each student. All students will have at least a major department. Each department is described by a name, department code, office number, office phone, and college.  Both the name and code have unique values for each department. Each course has a course name, description, course number, number of credits, level and offering department.  The course number is unique for each course. Each section has an instructor, semester, year, course, and section number.  The section number distinguishes sections of the same course that are taught during the same semester/year; its value is an integer (1, 2, 3, ... up to the number of sections taught during each semester). A grade report must be generated for each student that lists the section, letter grade, and numeric grade (0,1,2,3, or 4) for each student and calculates his or her average GPA.

Department Student Course Section Degree Major In DName DCode OfficeNumber OfficePhone College StudentID Name SSN Birth date Student Sex Minor In Class Address Offer City State Zip Grade_Report Course CName CourseDesc CNumber Credits Letter Grade Instructor Year GPA Belong_To Numeric Grade Section SectionNumber Semester

ER diagram for an AIRLINE database.

asterisks next to attribute names indicate primary key attribute(s) asterisks next to attribute names indicate primary key attribute(s). plusses indicate foreign keys. AIRPORT(AirportCode*, Name, City, State) AIRPLANE_TYPE(TypeName*, Max-seats, Company) AIRPLANE(AirplaneId*, Total_no_of_seats, TypeName+) FLIGHT(Number*, Weekdays, Airline) FLIGHT_LEG(LegNo*, FLIGHTNumber*, DEPARTUREAIRPORTAirportCode+, ARRIVALAIRPORTAirportCode+, Scheduled_DepTime, Scheduled_ArrTime) LEG_INSTANCE(Date*, LegNo*, FLIGHTNumber*, No_of_avail_seats, DEPARTUREAIRPORTAirportCode+, ARRIVALAIRPORTAirportCode+, DepTime, ArrTime, AirplaneId+) FARE(Code*, FLIGHTNumber*, Amount, Restrictions) SEAT(SeatNo*, Date*, LEGLegNo*, FLIGHTNumber*, CustomerName, CPhone) CAN_LAND(AIRPORTAirportCode*, AIRPLANE_TYPETypeName*)