Database Design 3: Advanced Data Modeling Concepts CS 320.

Slides:



Advertisements
Similar presentations
ER Model For a college DB
Advertisements

Developing ER-Diagram
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Entity Relationship (ER) Modeling
Text-Book Chapters (7 and 8) Entity-Relationship Model
System Analysis - Data Modeling
Information Resources Management February 6, 2001.
Ch5: Software Specification. 1 Descriptive specifications  Describe desired properties of system  Three types:
Entity Relationship Diagrams
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Systems Analysis and Design in a Changing World, 6th Edition
Chapter Five Data Modeling with the Entity-Relationship Model.
Class Number – CS 304 Class Name - DBMS Instructor – Sanjay Madria Instructor – Sanjay Madria Lesson Title – ER Model.
Chapter 2 Modeling Data in the Organization
Modern Systems Analysis and Design Third Edition
Entity/Relationship Modelling
Mapping ERM to relational database
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
1 Data Modeling 2 Yong Choi School of Business CSUB.
Instructor :Huda Al-Omair
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
Switch off your Mobiles Phones or Change Profile to Silent Mode.
MIS 3053 Database Design & Applications The University of Tulsa Professor: Akhilesh Bajaj ER Model Lecture 1 © Akhilesh Bajaj, 2000, 2002, 2003, 2004.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Database Design 1: Introduction and Terminology CS 320.
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 2: Creating an ER Model
Database Management Systems MIT Lesson 02 – Database Design (Entity Relationship Diagram) By S. Sabraz Nawaz.
ITEC 3220A Using and Designing Database Systems Instructor: Prof Z. Yang Course Website: 3220a.htm
advanced data modeling
INTRODUCTION TO DATA MODELING CS 260 Database Systems.
Entity/Relationship Modelling. Entity Relationship Modelling In This Lecture Entity/Relationship models Entities and Attributes Relationships Attributes.
MIS 3053 Database Design & Applications The University of Tulsa Professor: Akhilesh Bajaj ER Model Lecture 2 © Akhilesh Bajaj, 2000, 2002, 2003, 2004,
More Data Modeling CS 146. Relationship Lower Bounds  Lower bound: minimum number of related instances in a relationship  Value is typically 0 or 1.
Ashima Wadhwa. database  A database can be modeled as: ◦ a collection of entities, ◦ relationship among entities. entity  An entity is an object that.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
Introduction to Database Systems
EntityRelationshipDiagrams. Entity Relationship Models The E-R (entity-relationship) data model views the real world as a set of basic objects (entities)
Database Design 4: Deriving Tables From Data Models CS 320.
Howard Paul. Sequential Access Index Files and Data File Random Access.
©Silberschatz, Korth and Sudarshan7.1Database System Concepts - 6 th Edition Chapter 7: Entity-Relationship Model.
Data Modeling and Entity-Relationship Model I
Topic 3: ER – Entity Relationship Model (ERM) 6/12/
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
Entity Relationship (E-R) Model
Contents Design Process Modeling Constraints E-R Diagram Design Issues
Entity/Relationship Modelling
Data Modeling Using the ERD
Let try to identify the conectivity of these entity relationship
Business System Development
Information System & Database Design
Entity-Relationship Model
DATA REQIREMENT ANALYSIS
Chapter -3- Data Modeling Using the Entity-Relationship Model
Chapter 7: Entity-Relationship Model
Data Modeling for Database Design 2
ERD (Entity Relationship Diagrams)
Chapter 2 Modeling Data in the Organization
Database Systems Instructor Name: Lecture-9.
Database Modeling using Entity Relationship Model (E-R Model)
ITEC 3220A Using and Designing Database Systems
ER Modeling Case Studies
Chapter 7: Entity-Relationship Model
Entity Relation Model Tingting Zhang.
Database Management system
Database Management system
Presentation transcript:

Database Design 3: Advanced Data Modeling Concepts CS 320

Composite Relationships  Relationship that has attributes  Always has M:M cardinality

Composite Relationships: Another Example

Decomposing a Composite Relationship Can always be decomposed into 2 1:M relationships!

Degree of a Relationship  Specifies the number of entities that participate in a relationship  Up until now, all relationships have been binary (2 entities)

Unary Relationships Entity has a relationship with itself

Ternary Relationships  Relationship exists among 3 entities

Generalization/Specialization Relationships Does not show cardinalities Supertype Subtypes

How common are non-binary relationships? Unary  Rare Ternary, generalization/specialization  More common than you would think

Homonyms Different attributes have the same name  Avoid!  This is why attributes should take their name from their entity

Synonyms Same attribute (field) has a different name in a different table Avoid! CANDY_PURCHASE CANDY_PRODUCT

Summary: Strategies for Developing ER Models How do you decide if an item is an entity or an attribute?  An item is an entity if: Multiple instances exist (or might exist) in the database  An item is an attribute if: It is a property of an entity instance Each entity instance has a single value of that property

Summary: Strategies for Associating an Attribute With the Correct Entity To which entity does an attribute belong?  Example: Is AdvisorName an attribute of a UniversityStudent instance?  Answer: Only if each advisor advises only one student. Otherwise, you are repeating the name multiple times.

Test Yourself: A composite relationship: a. Is always a 1:M relationship b. Is always a M:M relationship c. Can be made into a new entity d. Might have an attribute that belongs to the relationship e. All of the above except a

Test Yourself: A composite relationship: a. Is always a 1:M relationship b. Is always a M:M relationship c. Can be made into a new entity d. Might have an attribute that belongs to the relationship e. All of the above except a

Test Yourself: In an ER model, a relationship must always involve at least two entities. a. True b. False

Test Yourself: In an ER model, a relationship must always involve at least two entities. a. True b. False

Test Yourself: In an ER model, a relationship can never involve more than 3 entities. a. True b. False

Test Yourself: In an ER model, a relationship can never involve more than 3 entities. a. True b. False

Test Yourself: Naming an attribute CUST_ID in the CANDY_CUSTOMER table and CUSTOMER_ID in the CANDY_PURCHASE table illustrates creating a(n): a. Composite relationship b. Acronym c. Homonym d. Synonym e. None of the above

Test Yourself: Naming an attribute CUST_ID in the CANDY_CUSTOMER table and CUSTOMER_ID in the CANDY_PURCHASE table illustrates creating a(n): a. Composite relationship b. Acronym c. Homonym d. Synonym e. None of the above

Test Yourself: Suppose you create an attribute named DESC that describes products in the CANDY_PRODUCT table. Then you create a second attribute named DESC that describes customer types in the CANDY_CUST_TYPE table. This is a(n): a. Homonym b. Synonym c. Acronym d. Generalization/specialization e. None of the above

Test Yourself: Suppose you create an attribute named DESC that describes products in the CANDY_PRODUCT table. Then you create a second attribute named DESC that describes customer types in the CANDY_CUST_TYPE table. This is a(n): a. Homonym b. Synonym c. Acronym d. Generalization/specialization e. None of the above

UW- Eau Claire keeps data on students including student ID, student name, date of birth, campus address and phone number, permanent address and phone number, and address. Data is also kept on courses that are offered. This data includes the course call ID (like ‘CS 320’), course name (like ‘Web Database Systems’), department (such as "Computer Science"), and the course description that appears in the catalog. Courses are offered multiple times. For each course section offering, the database stores the term offered (such as "Fall 2012", section number, day, time, location, and instructor. Instructor data includes instructor ID, name, address, title, office location, and office phone number. Instructors teach course sections, and instructors also advise students. Students enroll in course sections, and grades are assigned for students in course sections. Students can have one or more instructors who act as advisors. Your Turn: Draw the ER Model for the following database application.

Solution