COSC578 Database Management Systems Sungchul Hong

Slides:



Advertisements
Similar presentations
ER Model For a college DB
Advertisements

the Entity-Relationship (ER) Model
Entity-Relationship (ER) Modeling
Conceptual Data Modeling: ER
Chapter 31 Chapter 3 Data Modeling Using the Entity-Relationship Model.
CIS458 Organizational Database Management Sungchul Hong
Systems Development Life Cycle
Data Modeling is an Analysis Activity
Systems Development Life Cycle
The Database Approach u Emphasizes the integration of data across the organization.
Extended E-R Model: Basic Symbols
Logical Database Design and the Relational Model (part 1)
Copyright © 2004 Pearson Education, Inc.. Chapter 3 Data Modeling Using the Entity-Relationship Model.
Copyright © 2007 Ramez Elmasr and Shamkant B. Navathei Week 3 Outline Overview of Database Design Process Example Database Application (COMPANY) ER Model.
CS34311 The Entity- Relationship Model Part II.. CS34312 Database Design Stages Application Requirements Conceptual Design Logical Design Physical Design.
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.
CS 405G Introduction to Database Systems
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,
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas.
© 2007 by Prentice Hall (Hoffer, Prescott & McFadden) 1 Entity Relationship Diagrams (ERDs)
3.1 CSIS 3310 Chapter 3 The Entity-Relationship Model Conceptual Data Modeling.
Chapter 3 Data Modeling Using the Entity-Relationship (ER) Model.
CIS 4365 Entity Relationship Diagrams
Dr. Mohamed Osman Hegaz1 Conceptual data base design: The conceptual models: The Entity Relationship Model.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Principles of Database Design, Part II AIMS 2710 R. Nakatsu.
ER to Relational Translation COMSATS INSTITUTE OF INFORMATION TECHNOLOGY, VEHARI.
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.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 2: Modeling Data in the Organization.
Chapter 7 Database Design and The E–R Model. 2 Goals n Facilitate DB design and represent the overall logical structure of the DB. n Definition Entities.
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:
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
CS 405G: Introduction to Database Systems Lecture 2 : Database Design I.
The Hong Kong University of Science and Technology COMP3311 Spring 2013 Tutorial 1 ER Diagrams.
1 A Demo of Logical Database Design. 2 Aim of the demo To develop an understanding of the logical view of data and the importance of the relational model.
Chapter 3 Data Modeling Using the Entity-Relationship (ER) Model Copyright © 2004 Pearson Education, Inc.
Carnegie Mellon University © Robert T. Monroe Management Information Systems Data Modeling Management Information Systems Robert.
Chapter 3: The Enhanced E-R Model
Database Examples.
Entity-Relationship Model Chapter 3 II COSC 457 Sungchul Hong.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
CS263 Lecture 5: Logical Database Design Can express the structure of a relation by a Tuple, a shorthand notation Name of the relation is followed (in.
Database Management Systems
1 The Entity- Relationship Model Instructor: Mohamed Eltabakh
Database Systems – ER Diagrams EXAMPLE COMPANY DATABASE Requirements of the Company (oversimplified to illustrate) The company is organized into DEPARTMENTs.
Lecture 03 Entity-Relationship Diagram. Chapter Outline.
Logical Database Design and the Relational Model.
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
1 The Entity- Relationship Model Instructor: Mohamed Eltabakh Part-2.
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
CSE 412/598 DATABASE MANAGEMENT COURSE NOTES 3. ENTITY-RELATIONSHIP CONCEPTUAL MODELING Department of Computer Science & Engineering Arizona State University.
Copyright © 2016 Pearson Education, Inc. Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki Topi CHAPTER 2: MODELING DATA.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 3: Modeling Data in the Organization Modern Database Management 9 th Edition Jeffrey.
Chapter 4, Part A: Logical Database Design and the Relational Model
Introduction to Database Systems
Chapter 3 1 Chapter 3: Modeling Data in the Organization.
IS 4420 Database Fundamentals Chapter 3: Modeling Data in the Organization Leon Chen.
Database Management Systems
Chapter 3 Data Modeling Using the Entity-Relationship Model
ER model Ashima Wadhwa.
Order Database – ER Diagram
Order Database – ER Diagram
Example Question–Is this relation Well Structured? Student
Lecture3: Data Modeling Using the Entity-Relationship Model.
Order Database – ER Diagram
Some examples of simple business rules:
Presentation transcript:

COSC578 Database Management Systems Sungchul Hong ERD Exercise #2 COSC578 Database Management Systems Sungchul Hong

HW#1 HW#1 is posted.

SUMMARY OF ER-DIAGRAM NOTATION FOR ER SCHEMAS Symbol Meaning ENTITY TYPE WEAK ENTITY TYPE RELATIONSHIP TYPE IDENTIFYING RELATIONSHIP TYPE ATTRIBUTE KEY ATTRIBUTE MULTIVALUED ATTRIBUTE COMPOSITE ATTRIBUTE DERIVED ATTRIBUTE TOTAL PARTICIPATION OF E2 IN R CARDINALITY RATIO 1:N FOR E1:E2 IN R STRUCTURAL CONSTRAINT (min, max) ON PARTICIPATION OF E IN R E1 R E2 N E1 R E2 (min,max) R E

Creating an ERD from the Investigated Facts Identify all the entities. attributes Identify all the relationships. Identify cardinality and multiplicities (min max).

Simple ERD 1 A painter can paint many paintings; each paining is painted by one painter. A gallery can have many paintings. A painting can be exhibited by a gallery. (0,N) (1,1) Painter (1,1) (0,N) Painting Displayed Gallery Paint

Simple ERD 2 An employee can learn many skills; each skill can be learned by many employees and these skills could have different skill levels (let say from L1 to L5). (0,M) (0,N) Employee Learn Skills Level

Simple ERD 3 An employee manages one store; each store is managed by one employee. Obviously not all the employees are not managers. (1,1) (0,1) Employee Manages Store

Simple ERD 4 A College example Students in a typical college or university will discover that each course can have many sections, bye each section refers to only one course. For example, an Accounting II course might have two sections: one offered on Monday, Wednesday, and Friday from 10:00 a.m. to 10:50 a.m., and one offered on Thursday from 6:00 p.m. to 8:40 p.m.

(0,N) (1,1) Course Has Section

Simple ERD 5 Each student can take many classes (or none) and each class can contain many students. (0,N) (1,M) Student Take Classes

Combining ERDs A class can be identified with course and section. (1,1) (0,N) Course Has Section (0,N) (1,M) Student Take Section

(1,1) (0,N) Course Has Section (0,N) (1,M) Student Take

Adding Additional Conditions Adding prerequisite, enroll grade (0,N) (1,1) Has Course Has Section (0,M) (0,N) (0,N) Prerequisite (1,M) Student Take Grade

Case Study (Pine Valley Furniture Company ) 1. The company sells a number of different furniture products. These products are grouped into several product lines. The identifier for a product is Product_ID, while the identifier for a product line is Product_Line_ID. Referring to the customer invoice, we identify the following additional attributes for product: Product_Description, Product_Finish, and Unit_Price. Another attribute fro product line is Product_Line_Name. A product line may group any number of products, but must group at least one product. Each product must belong to exactly one product line.

Case Study 2. Customers submit orders for products The identifier fro an order is Order-ID, and another attribute is Order_Date. A customer may submit any number of orders, but need not submit any orders. Each order is submitted by exactly one customer. The identifier for a customer is Customer_ID. Other attributes include Customer_Name and Customer_Address.

Case Study 3. A given customer order must request at least one product. Any product sold by Pine Valley Furniture may not be requested on any order, or may be requested on one or more orders. An attribute associated with each order and product is Quantity, which is the number of units requested.

Case Study 4. Pine Valley Furniture has established sales territories for its customers. Each customer does business in one or more of these sales territories. The identifier for a sales territory is Territory_ID. A sales territory may have any number of customers, or may not have any customers doing business.

Case Study 5. Pine Valley Furniture Company has several salespersons. The identifier for a salesperson is Salesperson_ID. Other attributes include Salesperson_Name, Salesperson_Telephone, and Salesperson_Fax. A salesperson serves exactly one sales territory. Each sales territory is served by one or more salespersons.

Case Study 6. Each product is assembled from one or more raw materials. The identifier for the raw material entity is Material_ID. Other attributes include Unit_of_Measure and Unit_Price. Each raw material may be assembled into one or more products.

Case Study 7. Raw materials are supplied by vendors. The identifier for a vendor is Vendor_ID. Other attributes include Vendor_Name and Vendor_Address. Each raw material can be supplied by one or more vendors. A vendor may supply any numver of raw materials, or may not supply any raw materials to Pine Valley Furniture. An attribute of the relationship between vendor and raw material is Unit_Price

Case Study 8. Pine Valley Furniture has established a number of work centers. The identifier for a work center is Work_Center_ID. Another attribute is Location. Each product is produced in one or more work centers. A work center may be used to produce any number of products, or may not be used to produce any products.

Case Study 9. The company has over 100 employees. The identifier for employee is Employee_ID. Other attributes are Employee_Name, EmployeeAddress, and Sill. An employee may have more than one skill. And Each skill can be mastered by many employees or none.

Case Study 10: Each employee works in one or more work centers. A work center must have at least one employee working in that center, but may have any number of employees.

Case Study 11. Each employee has exactly one supervisor. An employee who is a supervisor may supervise any number of employees, but not all employees are supervisors.