Announcements Reading for Friday Homework 2 - Due 9/24

Slides:



Advertisements
Similar presentations
Chapter 6: Entity-Relationship Model (part I)
Advertisements

Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Text-Book Chapters (7 and 8) Entity-Relationship Model
Pertemuan Entity Relationship Diagram
CS157A Lecture 3 ER Diagram Prof. Sin-Min Lee Department of Computer Science San Jose State University.
Lecture Eleven Entity-Relationship Modelling
Modeling Data The Entity Relationship Model (ER) For Database Design.
Chapter 4 ENTITY-RELATIONSHIP MODELLING.
Information Resources Management January 30, 2001.
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. Entity-Relationship Model Database Management Systems I Alex Coman, Winter.
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
Entity-Relationship (E-R) Model
Chapter 4 Entity-Relationship modeling Transparencies © Pearson Education Limited 1995, 2005.
Announcements Reading for Wednesday Homework 2 - Due 9/22
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas.
Ch5: ER Diagrams - Part 2 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Entity-Relationship modeling Transparencies
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
© 2007 by Prentice Hall (Hoffer, Prescott & McFadden) 1 Entity Relationship Diagrams (ERDs)
Chapter 3: Modeling Data in the Organization
Entity-relationship Modeling Transparencies 1. ©Pearson Education 2009 Objectives How to use ER modeling in database design. The basic concepts of an.
Entity-Relationship Model
Entity-Relationship Model. 2 Outline  What is ER Model? And Why?  Overview of Database Design Process  Example COMPANY Database  ER Model Concepts.
Chapter 2: Modeling Data in the Organization
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Entity Relationship Modeling
C HAPTER 11 Entity-Relationship modelling Transparencies © Pearson Education Limited 1995,
9/10/2012ISC 329 Isabelle Bichindaritz1 Entity Relationship (E-R) Modeling.
DATABASEMODELSDATABASEMODELS  A database model ◦ defines the logical design of data. ◦ Describes the relationships between different parts of data.
Switch off your Mobiles Phones or Change Profile to Silent Mode.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 2: Modeling Data in the Organization.
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
Entity-Relationship Modeling Based on Chapter 12.
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
Entity-Relationship Model Using High-Level Conceptual Data Models for Database Design Entity Types, Sets, Attributes and Keys Relationship Types, Sets,
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:
Chapter 11 & 12 Entity-Relationship (E-R) Model Characteristics of E-R Model Components of E-R Model Example of E-R Model Enhanced E-R Model.
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
Computing & Information Sciences Kansas State University Wednesday, 24 Sep 2008CIS 560: Database System Concepts Lecture 12 of 42 Wednesday, 24 September.
Chapter 2 : Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E-R Diagram Extended E-R Features Design of.
Chapter 3 Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
1 Data Modeling : ER Model…. Lecture Summary so for …. ER Model Entity, Attribute, Key Relationships Instance Diagram.
1 Entity-Relationship Model © Pearson Education Limited 1995, 2005.
ITTelkom Entity Relationship Diagram (1) CS2343 Perancangan Basisdata Relasional.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan Lecture-03 Introduction –Data Models Lectured by, Jesmin Akhter.
Databases Illuminated Chapter 3 The Entity Relationship Model.
Computing & Information Sciences Kansas State University Friday, 26 Sep 2008CIS 560: Database System Concepts Lecture 13 of 42 Friday, 26 September 2008.
1 Database Systems Entity Relationship (E-R) Modeling.
1 Announcements Reading for next week: Chapters 8 and 10  Last reading from the text for a little while (I promise) About those database accounts....
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
Chapter 11 (2) CIS458 Sungchul Hong. Structural Constraints Main type of constraint on relationships is called multiplicity. Multiplicity - number (or.
Entity-Relationship Modeling. 2 Entity Type u Entity type –Group of objects with same properties, identified by enterprise as having an independent existence.
Chapter 8 Entity-Relationship Modeling Pearson Education © 2009.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Mapping Constraints Keys.
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.
April 20022CS3X1 Database Design Entity-relationship modelling John Wordsworth Department of Computer Science The University of Reading
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Lecture 3: Modeling Data in the Organization Modern Database Management 9 th Edition Jeffrey.
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
ENTITY-RELATIONSHIP MODELLING. Objectives: How to use Entity–Relationship (ER) modelling in database design. Basic concepts associated with ER model.
Chapter # 3 Data Modeling Using the Entity-Relationship (ER) Model
Conceptual Design & ERD Modelling
Entity Relationship Model
Entity-Relationship Model
Overview of Entity‐Relationship Model
Entity-Relationship Modeling
Database Modeling using Entity Relationship Model (E-R Model)
Entity Relation Model Tingting Zhang.
Presentation transcript:

Announcements Reading for Friday Homework 2 - Due 9/24 4.1 – 4.5 Homework 2 - Due 9/24 Homework 3 – Due 10/1 Select paper topic and email me your choice

The Entity-Relationship Model: Relationships, etc. Lecture 6

Relationships Relationship type – Relationship set – Relationship instances – Relationship can have descriptive attributes Represented by diamond on E-R diagram Connections or interactions between entity instances Represented by diamond on E-R diagram Relationship type – category of relationships Relationship set – collection of relationships of same type Relationship instances – relationships that exist at a given moment Relationship can have descriptive attributes

Degree of relationship Binary – Ternary – N-ary – Binary – links two entity sets; set of ordered pairs Ternary – links three entity sets; ordered triples N-ary – links n entity sets; ordered n-tuples

Cardinality of Relationships One-to-one: Number of entity instances to which another entity set can map under the relationship One-to-one: X:Y is 1:1 is each entity in X is associated with at most one entity in Y and each entity in Y with at most one entity in X.

Cardinality of Relationships One-to-many: Many-to-many: One-to-many: X:Y is 1:M is each entity in X can be associated with many entities in Y, but each entity in Y with at most one entity in X. Many-to-many: X:Y is M:M if each entity in X can be associated with many entities in Y, and each entity in Y with many entities in X (many=more than one)

Relationship Participation Constraints Total participation Partial participation Total participation Every member of entity set must participate in the relationship Represented by double line from entity rectangle to relationship diamond Partial participation Not every entity instance must participate Represented by single line from entity rectangle to relationship diamond

Roles Role: Optional to name role of each entity, but helpful in cases of Role: function that an entity plays in a relationship Optional to name role of each entity, but helpful in cases of Recursive relationship – entity set relates to itself Multiple relationships between same entity sets

Existence Dependency Existence dependency: Existence dependency: Entity Y is existence dependent on entity X is each instance of Y must have a corresponding instance of X In that case, Y must have total participation in its relationship with X

Weak Entities If Y does not have its own candidate key, Y is called a weak entity, and X is strong entity Use double rectangle for weak entity, with double diamond for relationship connecting it to its associated strong entity Note: not all existence dependent entities are weak – the lack of a key is essential to definition If Y does not have its own candidate key, Y is called a weak entity, and X is strong entity Weak entity may have a partial key, called a discriminator, that distinguishes instances of the weak entity that are related to the same strong entity Use double rectangle for weak entity, with double diamond for relationship connecting it to its associated strong entity Note: not all existence dependent entities are weak – the lack of a key is essential to definition

Problems with ER modeling: Fan Trap Occurs when a model represents a relationship between entity types, but the pathway between certain entity occurrences is ambiguous. Can occur when 2 or more 1:N relationships fan out from the same entity Division Operates Is Allocated Branch Staff Fix

Problems with ER modeling: Chasm Trap Occurs when the model suggests the existence of a relationship between entity types, but the pathway does not exist between certain entity occurrences. Can occur when an entity with partial participation forms part of a pathway between entities that are related. Staff Oversees Is Allocated Property Branch Fix

Complete the E-R Diagram A dentist’s office needs to keep information about patients, the number of visits they make to the office, work that must be preformed, procedures preformed during the visit, charges and payments for the treatment, and laboratory supplies and services. Assume there is only one dentist, so there is no need to store information about the dentist in the database. There are several hundred patients. Patients make many visits, and the database should store information about the services performed during each visit, and the charges for each of the services. there is a standard list of charges, kept outside of the database. The office uses three dental laboratories that provides supplies and services, such as fabricating dentures.

Visit Patient Charge Work Needed Procedure Payment Supplies Laboratory

Complete the E-R Diagram An interior design firm would like to have a database to represent its operations. A client (customer) requests that the firm perform a job such as decorating a new home, redecorating rooms, locating and purchasing furniture, and so forth. One of the firm’s decorators is placed in charge of each job. For each job, the firm provides an estimate of the amount of time and money required for the entire job. Some of the work for a job, such as planning furniture placement, is done by the decorator in charge of the job. In addition, the firm might hire contractors to work on a daily or hourly basis on a particular job. A job might also include several activities, such as painting, installing floor covering, fabricating draperies, wallpapering, constructing, installing cabinets, and so on. These activities are done by contractors hired by the firm .The contractor provides an estimate for each activity. An activity or job might also require materials such as paint or lumber, and the firm has to keep track of the cost of materials for each activity or job, in order to bill the client. The database should store the estimated costs of all activities and all jobs.

Complete the E-R Diagram An automobile body repair shop needs to keep information about its operations. Customers initially bring their cars to the shop for an estimate of the repairs. A mechanic looks at the car and estimates the cost and time required for the entire job. If the customer accepts the estimate, a job number is assigned and the customer’s name and contact information; the car’s license plate number, make, model, and year; and a list of repairs needed is recorded. The customer than makes an appointment to bring in the car on a specified date. When the car is brought in for repairs, the work begins. The shop keeps track of the charges for the parts and labor as they accumulate. Only one mechanic works on the car for the entire job. A job might include several repairs (e.g., replacing the left fender, painting the passenger door). The time actually spent for each repair is recorded and used to calculate the cost of labor, using a fixed hourly rate.