ER Modeling I Exercise Solutions. 2 Solution to Q1.

Slides:



Advertisements
Similar presentations
ER Model For a college DB
Advertisements

Relational Database Modeling II We dont live in a world of reality, we live in a world of perceptions. J. Gerald Simmons.
Transform an ER Model into a Relational Database Schema
Chapter 2.1 V3.1 Napier University Dr Gordon Russell
Solution to Q1 Note: the mandatory side of the relationships are not identified.
Entity Relationship (E-R) Modeling Hachim Haddouti
Data Modeling (CB 12) CPSC 356 Database Ellen Walker Hiram College (Includes figures from Database Systems by Connolly & Begg, © Addison Wesley 2002)
Entity-Relationship Models
Entity Relationship (ER) Modeling
Entity Relationship (ER) Modeling
Entity Relationship (ER) Modeling
E/R Exercises – Part I April 16, 2017.
1 Relationships Relationships will have justification in business rules, in the way the enterprise manages its business. The following figure illustrates.
DATABASE APPLICATION DEVELOPMENT SAK 3408 Database Design II (week 3)
Entity-Relationship Model and Diagrams (continued)
Ch5: Software Specification. 1 Descriptive specifications  Describe desired properties of system  Three types:
Lecture 3 :Database Analysis and Design (II)
1 Data Modelling Which data to include in the database.
Things are bad. Children no longer obey their parents and everyone is writing a book. -- Marcus Tillius Cicero.
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,
Entity-Relationship Diagrams
Yong Choi School of Business CSUB
Entity-Relationship Modeling I The cautious seldom err. Confucius.
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Advanced Entity Relationship Concepts. Advanced Concepts UIDs Intersection Entities Recursive Relationships Roles Subtypes Exclusivity Historical Fan.
Database Design Concepts
1 Data Modeling 2 Yong Choi School of Business CSUB.
Mid term Exam COVERS chapters 1-3, 7-8 Two parts In class Take home part (given on Oct 29 th, Due Nov5th in class)
Chapter 5 Entity Relationship (ER) Modelling
Chapter 5 Entity–Relationship Modeling
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Data Modelling – ERD Entity Relationship Diagram’s Entity Relationship Diagrams and how to create them. 1.
DATABASEMODELSDATABASEMODELS  A database model ◦ defines the logical design of data. ◦ Describes the relationships between different parts of data.
ER to Relational Translation COMSATS INSTITUTE OF INFORMATION TECHNOLOGY, VEHARI.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
1 CMPT 275 Software Engineering Requirements Analysis Phase Requirements Analysis activity Janice Regan,
E-R model for Exercise #1 Comments: 1. There is a lot of process, or data flow information in this description that will not be modeled in the E-R diagram,
4 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Relationship Degree Indicates number of entities or participants.
DeSiamorePowered by DeSiaMore1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Chapter 9: Logical Database Design and the Relational Model (ERD Mapping)
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
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.
Description and exemplification of entity-relationship modelling.
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.
Computing & Information Sciences Kansas State University Friday, 26 Sep 2008CIS 560: Database System Concepts Lecture 13 of 42 Friday, 26 September 2008.
advanced data modeling
Copyright Ó Oracle Corporation, All rights reserved. Assign Unique Identifiers A Unique Identifier (UID) is any combination of attributes and/or.
Lecture 03 Entity-Relationship Diagram. Chapter Outline.
Practice of ER modeling Yong Choi School of Business CSUB.
Lesson 4: The Relational Model. Lesson Overview Database Design Entities Relationships E-R Diagrams.
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
Tutorial 2 Data Modelling. 3 Terminology & Notation(1) An entity is an object about which the system needs to hold information –Customer, Student, Course.
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.
Order Database – ER Diagram Prepared by Bryan Borcher Spring 2014.
Ch 05. Basic Symbols ( manino ). Cardinalities Cardinality Notation.
ENTITY RELATIONSHIP DIAGRAM. Objectives Define terms related to entity relationship modeling, including entity, entity instances, attribute, relationship.
ENTITY-RELATIONSHIP MODELLING. Objectives: How to use Entity–Relationship (ER) modelling in database design. Basic concepts associated with ER model.
Entity Relationship (E-R) Model
Let try to identify the conectivity of these entity relationship
Entity-Relationship Model
Entity Relationship Diagrams
The Jonesburgh County Basketball Conference (JCBC) is an amateur basketball  association. Each city in the county has one team that represents it.  Each.
Entity-Relationship Model and Diagrams (continued)
Order Database – ER Diagram
Solution Problem1 Exam0 ssn Sal empl. name name Person Team city contr
Database Systems: Design, Implementation, and Management Tenth Edition
Database Systems Instructor Name: Lecture-9.
Database Management system
Presentation transcript:

ER Modeling I Exercise Solutions

2 Solution to Q1

3 Notes to assist Q2 Three sets of relationships exist: A COURSE may generate one or more CLASSes, an INSTRUCTOR teaches up to two CLASSes, and a TRAINEE may enroll in up to two CLASSes. A trainee can take more than one class, and each class contains many (10 or more) trainees, so there is a M:N relationship between TRAINEE and CLASS (we must, therefore, create a composite entity to serve as the bridge between TRAINEE and CLASS). A class is taught by only one instructor, but an instructor can teach up to two classes. Therefore, there is a 1:M relationship between INSTRUCTOR and CLASS. Finally, a COURSE may generate more than one CLASS, while each CLASS is based on one COURSE, so there is a 1:M relationship between COURSE and CLASS. These relationships are all reflected in the following E-R diagram. Note the optional and mandatory relationships: to exist, a CLASS must have TRAINEEs enrolled in it, but TRAINEEs do not necessarily take CLASSes (some may take "on the job training"). An INSTRUCTOR may not be teaching any CLASSes, doing research instead, but each CLASS must have an INSTRUCTOR. If not enough people sign up for a CLASS, a COURSE may not generate any CLASSes, but each CLASS must represent a COURSE.

4 Solution to Q2

5 Solution to Q3

6 Keep in mind that the preceding E-R diagram reflects a set of business rules that may easily be modified For example, if customers are supplied via a commercial customer list, many of the customers on that list will not (yet!) have bought anything, so INVOICE would be optional to CUSTOMER We are assuming here that a product can be supplied by many vendors and that each vendor can supply many products. The PRODUCT may be optional to VENDOR if the vendor list includes potential vendors from which you have not (yet) ordered anything. Some products may never sell, so LINE is optional to PRODUCT... because an unsold product will never appear in an invoice line. LINE may be shown as weak to INVOICE, because it borrows the invoice number as part of its primary key and it is existence- dependent on INVOICE The design depends on the exact nature of the business rules.

7 Solution to Q3

8 Solution to Q4 clientinstrument hostsperforms manages plays represents 1 M 1 M 1 M 1 M M (0,N) (1,1) (0,N) (1,1) (0,N) (1,1) 1 M 1 (0,N) (1,1) (0,N) agent event musician

9 Notes to assist Q5 Note the following relationships:  The main components are TEAM and GAME.  Each team plays each other team at least twice.  To play a game, two teams are necessary: the home team and the visitor team.  Each team plays once as the home team and once as the visitor team. Given these relationships, it becomes clear that TEAM participates in a recursive M:N relationship with GAME. The relationship between TEAM and GAME becomes clearer if we list some attributes for each of these entities: GAME entity TEAM entity GAME_NUM TEAM_NUM GAME_DATETEAM_NAME GAME_HOME_TEAMTEAM_CITY GAME_VISIT_TEAM GAME_HOME_POINTS GAME_VISIT_POINTS Note: TEAM_NUM appears at least twice in a GAME:once as GAME_HOME_TEAM and once as GAME_VISIT_TEAM.

10 Solution to Q5