3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.

Slides:



Advertisements
Similar presentations
Chapter # 4 BIS Database Systems
Advertisements

Entity Relationship (E-R) Modeling Hachim Haddouti
Entity Relationship (ER) Modeling
Chapter 4 Entity Relationship (E-R) Modeling
Entity Relationship (ER) Modeling
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Chapter 4 Entity Relationship (E-R) Modeling
Entity Relationship (ER) Modeling
Entity Relationship (ER) Modeling
Systems Development Life Cycle
1 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred.
Entity Relationship (E-R) Modeling
Database Design & Mapping
System Analysis - Data Modeling
Chapter 3: Modeling Data in the Organization
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 1 Data Models: Degrees of Data Abstraction l Modified ANSI/SPARC Framework.
CHAPTER 2: MODELING DATA IN THE ORGANIZATION © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey.
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 4 Entity Relationship (E-R) Modeling
3 1 Chapter 3 The Relational Database Model Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Chapter Five Data Modeling with the Entity-Relationship Model.
Chapter 3 © 2005 by Prentice Hall 1 Objectives Definition of terms Definition of terms Importance of data modeling Importance of data modeling Write good.
BTM 382 Database Management Chapter 4: Entity Relationship (ER) Modeling Chitu Okoli Associate Professor in Business Technology Management John Molson.
Data Modeling Using the Entity-Relationship Model
1 © Prentice Hall, 2002 CMIS564: E/R Modeling Dr. Bordoloi Based on Chapter 3; Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott,
1 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred.
3 Chapter 3 Entity Relationship (E-R) Modeling Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel.
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Chapter 7 Data Modeling with Entity Relationship Diagrams Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
ITEC 3220M Using and Designing Database Systems Instructor: Prof. Z.Yang Course Website: 3220m.htm
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Chapter 5 Entity Relationship (ER) Modelling
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
The Relational Database Model
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 4 Entity Relationship (ER) Modeling.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Chapter 4 Entity Relationship (ER) Modeling.  ER model forms the basis of an ER diagram  ERD represents conceptual database as viewed by end user 
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
4 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Relationship Degree Indicates number of entities or participants.
Database Design – Lecture 5 Conceptual Data Modeling – adding attributes.
DeSiamorePowered by DeSiaMore1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
3 & 4 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Keys Consists of one or more attributes that determine other.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 4 Entity Relationship (ER) Modeling.
Databases Illuminated Chapter 3 The Entity Relationship Model.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 4 ENTITY RELATIONSHIP (ER) MODELING Instructor Ms. Arwa Binsaleh 1.
Database Design – Lecture 4 Conceptual Data Modeling.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
Entity-Relationship Modeling. 2 Entity Type u Entity type –Group of objects with same properties, identified by enterprise as having an independent existence.
Department of Mathematics Computer and Information Science1 CS 351: Database Management Systems Christopher I. G. Lanclos Chapter 4.
Chapter 3: Modeling Data in the Organization
Entity Relationship (E-R) Model
TMC2034 Database Concept and Design
Tables and Their Characteristics
Database Design – Lecture 4
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Review of Week 1 Database DBMS File systems vs. database systems
Chapter 3: Modeling Data in the Organization
Chapter 4 Entity Relationship (ER) Modeling
Entity-Relationship Diagram (ERD)
Entity Relationship (ER) Modeling
Chapter # 4 Entity Relationship (ER) Modeling.
Presentation transcript:

3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3

3 & 4 2 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Practice … (correction) Each of the MegaCo Corporation’s divisions is composed of many departments. Each of those departments has many employees assigned to it, but each employee works for only one department. Each department is managed by one employee, and each of those managers can manage only one department at a time. EMPLOYEE is assigned to M 1 DEPARTMENT manages 1 1 DIVISION 1M is composed of

3 & 4 3 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel A little from Chapters 3 and 4 Good design begins by identifying appropriate entities and attributes and the relationships among the entities Chapter 3: Section 3.2 Keys (pages 64-69) Chapter 4 All

3 & 4 4 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel The Entity Relationship Diagram (ERD) ERD represents the conceptual database as viewed by end user ERDs depict the ER model’s three main components: –Entities - anything about which data are to be collected and stored (i.e. people, events) –Attributes - characteristics of an entity –Relationships - describe an association among (two or more) entities (1:1, 1:M, M:N)

3 & 4 5 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Tables and Keys Tables are basic building blocks of a relational database Keys are central to the use of relational tables

3 & 4 6 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Tables and Their Characteristics

3 & 4 7 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Keys Consists of one or more attributes that determine other attributes Primary key (PK) is an attribute (or a combination of attributes) that uniquely identifies any given row –Composite key - Composed of more than one attribute Foreign key (FK) –An attribute whose values match primary key values in the related table Key’s role is based on determination –If you know the value of attribute A, you can look up (determine) the value of attribute B

3 & 4 8 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Keys (continued)

3 & 4 9 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Keys (continued) Nulls: –No data entry –Not permitted in primary key –Should be avoided in other attributes –Can represent An unknown attribute value A known, but missing, attribute value A “not applicable” condition –Can create problems when functions such as COUNT, AVERAGE, and SUM are used –Can create logical problems when relational tables are linked

3 & 4 10 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Keys (continued)

3 & 4 11 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Entities and Instances Each entity ultimately becomes a table in a database implementation Each instance of an entity is a record or a row in a table in a database Entity name, a noun, is usually written in capital letters

3 & 4 12 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Attributes Attributes ultimately become the fields in a database implementation Attributes are represented by ovals and are connected to entity rectangle with a line Primary Key is underlined in the ERD

3 & 4 13 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Types of Attributes Key attribute is a unique identifier Composite attribute can be subdivided Simple attribute cannot be subdivided Single-value attribute can have only a single value Multivalued attributes can have many values –A student may have more that one phone number; a home- phone number and a mobile-phone number Derived attribute’s value may be calculated (derived) from other attributes –Need not be physically stored in a database

3 & 4 14 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Multivalued Attributes Represented by a double line

3 & 4 15 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Resolving Multivalued Attribute Problems Although conceptual model can handle M:N relationships and multivalued attributes, you should not implement them in relational DBMS –Within original entity, create several new attributes, one for each of the original multivalued attribute’s components Can lead to major structural problems in table –Create new entity composed of original multivalued attribute’s components

3 & 4 16 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Resolving Multivalued Attribute Problems (continued)

3 & 4 17 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Derived Attributes (continued) Represented by a dashed line

3 & 4 18 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Connectivity and Cardinality Connectivity –Used to describe the relationship classification (based on participation) Cardinality –Expresses minimum and maximum number of entity occurrences associated with one occurrence of related entity Established by very concise statements known as business rules

3 & 4 19 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel EMPLOYEE is assigned to PROJECT M N Cardinality Connectivity

3 & 4 20 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Relationship Participation Optional participation –One entity occurrence does not require corresponding entity occurrence in particular relationship Mandatory participation –One entity occurrence requires corresponding entity occurrence in particular relationship

3 & 4 21 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Relationship Strength Weak (non-identifying) relationships –Exists if PK of related entity does not contain PK component of parent entity Strong (Identifying) Relationships –Exists when PK of related entity contains PK component of parent entity

3 & 4 22 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Weak (Non-Identifying) Relationships

3 & 4 23 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Strong (Identifying) Relationships

3 & 4 24 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Weak Entities Weak entity meets two conditions –Existence-dependent Cannot exist without entity with which it has a relationship –Has primary key that is partially or totally derived from parent entity in relationship Database designer usually determines whether an entity can be described as weak based on business rules

3 & 4 25 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Weak Entities (continued)

3 & 4 26 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Relationship Degree Indicates number of entities or participants associated with a relationship Unary relationship –Association is maintained within single entity Binary relationship –Two entities are associated Ternary relationship –Three entities are associated

3 & 4 27 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Relationship Degree (continued)

3 & 4 28 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Composite Entities Also known as bridge entities Composed of primary keys of each of the entities to be connected May also contain additional attributes that play no role in connective process Used to resolve M:N relationships

3 & 4 29 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Source: Mandatory participation 1, N, M

3 & 4 30 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Practice... An airplane has a registration number, type, number of economy class seats, number of business class seats and the year of production

3 & 4 31 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Practice... Each text book has a unique ISBN (International Standard Book Number), and contains several chapters. Each chapter has a chapter number (unique within a book), the number of pages and the number of references. A chapter covers a single topic, but the same topic may be covered in various books.

3 & 4 32 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Practice... Sometimes students work in groups. Each group has a unique number and students have their student ids. A student who works in a group has a specific role within that group. The student may have different roles in various groups he/she belongs to.