Database Analysis and Data Modeling

Slides:



Advertisements
Similar presentations
Chapter # 4 BIS Database Systems
Advertisements

Entity Relationship (E-R) Modeling
Entity Relationship (ER) 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.
Entity Relationship (ER) Modeling
Entity Relationship (E-R) Modeling
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 1 Data Models: Degrees of Data Abstraction l Modified ANSI/SPARC Framework.
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
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.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Chapter 5 Entity Relationship (ER) Modelling
BIS 360 – Lecture Six (Part 2) Conceptual Data Modeling (Chapter 10 and partial Chapter 12)
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 (ER) Modeling.  ER model forms the basis of an ER diagram  ERD represents conceptual database as viewed by end user 
Database Design – Lecture 5 Conceptual Data Modeling – adding attributes.
DeSiamorePowered by DeSiaMore1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
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.
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.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 4 ENTITY RELATIONSHIP (ER) MODELING Instructor Ms. Arwa Binsaleh 1.
Department of Mathematics Computer and Information Science1 CS 351: Database Management Systems Christopher I. G. Lanclos Chapter 4.
ENTITY-RELATIONSHIP MODELLING. Objectives: How to use Entity–Relationship (ER) modelling in database design. Basic concepts associated with ER model.
Chapter 3: Modeling Data in the Organization
Entity Relationship Modeling
Entity Relationship (E-R) Model
Comp 1100 Entity-Relationship (ER) Model
Methodology Logical Database Design for the Relational Model
COP Introduction to Database Structures
Conceptual Design & ERD Modelling
TMC2034 Database Concept and Design
Entity Relationship Model
Chen’s Type Guidance.
Chapter 4: Part B Logical Database Design and the Relational Model
Entity Relationship (E-R) Modeling
Entity Relationship (E-R) Modeling
Logical Database Design for the Relational Model
Tables and Their Characteristics
Chapter -3- Data Modeling Using the Entity-Relationship Model
Database Design – Lecture 4
Entity-Relationship Modelling
Lecture3: Data Modeling Using the Entity-Relationship Model.
بسم الله الرحمن الرحيم.
Overview of Entity‐Relationship Model
Entity-Relationship Modeling
الفصل الخامس قواعد البيانات Databases
Chapter 4 Entity Relationship (ER) Modeling
Entity-Relation Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter Entity-Relationship Modeling & Enhanced Entity- Relationship Modeling.
Entity-Relationship Modelling
Database Systems Instructor Name: Lecture-9.
Review of Week 1 Database DBMS File systems vs. database systems
Chapter 3: Modeling Data in the Organization
Chapter 4 Entity Relationship (ER) Modeling
Chapter Entity-Relationship Modeling & Enhanced Entity- Relationship Modeling.
Entity-Relationship Diagram (ERD)
Mapping an ERD to a Relational Database
Entity Relationship (ER) Modeling
Chapter # 4 Entity Relationship (ER) Modeling.
Mapping an ERD to a Relational Database
Relationships—Topics
Presentation transcript:

Database Analysis and Data Modeling Well done, is better than well said. ~ Benjamin Franklin ~

Where are we? SDLC / DBDLC Data Analysis and Conceptual Modeling I Planning II Analysis III Design IV Implementation V Maintenance & Support Time Resources Conceptual Model Logical Model Internal / External Model SDLC / DBDLC Physical Model Data Analysis and Conceptual Modeling

Chen –vs- Crow’s Foot Models Figure 3.6

Attribute Examples Vehicle Unique Identifier (PK Candidate) VIN [U] Make [R] Model ManufYear Age [D] EngineDetail [C] Color [M] Required Derived Attribute (Calc from ManufYear) Composite Attribute (HP, NumCyls, CC) Multi-valued Attribute (White with Blue Trim)

Example: Cardinality 1-1 1-M M-N Read in both directions! A resident possesses a DL or they don’t. A drivers license is possessed by one and only one Resident. A Resident registers zero or more Vehicles, a Vehicle is owned by one and only one resident. A Driver is Licensed to drive one or more vehicles, A vehicle is licensed to be driven by one or more drivers. Here are examples of the three basic relationship cardnalities. It should be noted how to read these diagrams properly: For example: A resident possessed one and only one DriversLicense, A drivers license is possessed by one and only one Resident. A Resident owns one or more Vehicles, a Vehicle is owned by one and only one resident. A Driver is Licensed to drive one or more vehicles, A vehicle is licensed to be driven by one or more drivers.

Example: Relationship Strength Identifying Relationship Existence-Dependent Composite Identifier (PK) BBPlayer is weak entity “Player must be on a team” Non-Identifying Relationship Existence-Independent BBPLayer is not weak Here a way to help you remember: “A weaker line is dashed, a stronger line is solid.” In General it is safer and to make all relationships non-identifying. This means your database will be more “accommodating” because it will optional on the many side of the relationship. Identifying relationships are only used when the requirements deem it so. Suppose we were making a database for basketball intramurals. In this case, the rules of the league would be you can’t be a player without being on a team, thus we’d model a strong relationship. If we were modeling the NBA, we’d have lots of players who played one year, but were cut the next. In this case we would model a weak relationship. This would allow us to maintain a bit list of players, many of which are not on an NBA roster. “Player need not be on a team” Any relationship can be made Strong/Weak How and Why Depend on the Requirements!

Weak Entity Existence-dependent on another entity A Strong Relationship produces a weak entity Has primary key that is partially or totally derived from parent entity Beveled Corners You can’t have a dependent without a corresponding employee. Note: You can’t do the beveled corners in Visio, so we will rely on the fact that the diagram depicts the relationship with a sold line for identifying weak entities. Figure 3.19

Example: Composite Entity Attributes Employee may or may not participate How do we represent the position the employee holds on the project committee? Employee may or may not participate Read the top one As: An Employee participates on zero or more project committees, a project committee contains 1 or more employees.

Example: Relationship Degree Unary Binary Ternary Unary relationships are always existence independent. How can Ternary relationships are always existence dependent and the “relationship” is always a weak entity. Always consists of binary relationships FilmEvent is actually an associative (weak) entity because it cannot exist without the other three.

Recursive Relationships The relationship exists between occurrences of same entity set (unary relationships)

Entity Sub-Type / Super-Type Two Distinctions: d = disjoint o=overlap Helps Depict “Is a” “part of” relationships. Empno Lname Fname DOB Address Employee d Rate Hourly AnnualPay StockOptns Salaried

3x5 Approach to ERD Write Entity on 3x5 card Write Attributes on back Helps with entity placement issues in your diagram (esp. large ones)

ERD Design Methodology Identify Entities Identify Attributes for each Entity For each Attribute identify the Attribute Type [C],[M],[D],[R],[U] Identify Relationships / Bus. Rules Establish Cardinality 1-1,1-M,M-M Establish Participation for each end 0/1 Work Out Relationships Sub-Type/Super-Type (is-a/has-a) Establish Weak Entities in 1-M Resolve M-M’s with Data (Assoc. / Comp. Entities)

Exercises Can you draw this diagram? Can you establish these requirements and then draw the diagram?

Entity-Relationship Modeling Questions?