COP5725 Database Management ER DIAGRAM AND RELATIONAL DATA MODEL

Slides:



Advertisements
Similar presentations
BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Advertisements

1 Relational Model and Translating ER into Relational.
Lecture #2 October 5 th, 2000 Conceptual Modeling Administration: –HW1 available –Details on projects –Exam date –XML comment.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
The Relational Data Model Database Model (ODL, E/R) Relational Schema Physical storage ODL definitions Diagrams (E/R) Tables: row names: attributes rows:
1 Lecture 4: Database Modeling (end) The Relational Data Model April 8, 2002.
the Entity-Relationship Model
E/R Diagrams and Functional Dependencies. Modeling Subclasses The world is inherently hierarchical. Some entities are special cases of others We need.
Lecture 08: E/R Diagrams and Functional Dependencies.
Lecture 2: E/R Diagrams and the Relational Model Thursday, January 4, 2001.
Database Management COP4540, SCS, FIU Relational Model Chapter 7.
SQL Structured Query Language Programming Course.
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T5 DESIGNING DATABASE APPLICATIONS.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 7: Entity-Relationship.
E-R to Relational - Basic
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 7: Entity-Relationship.
Exam 1 Review Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
Information Access Mgt09/12/971 Entity-Relationship Design Information Level Design.
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
Week 7-8 DBMS ER-Relational Mapping. ER-Relational Mapping.
Ashima Wadhwa. database  A database can be modeled as: ◦ a collection of entities, ◦ relationship among entities. entity  An entity is an object that.
1 Lecture 08: E/R Diagrams and Functional Dependencies Friday, January 21, 2005.
Chapter 2: Entity-Relationship Model. 3.2 Chapter 2: Entity-Relationship Model Design Process Modeling Constraints E-R Diagram Design Issues Weak Entity.
©Silberschatz, Korth and Sudarshan7.1Database System Concepts - 6 th Edition Chapter 7: Entity-Relationship Model.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 7: Entity-Relationship.
CSE 326: Data Structures Lecture #22 Databases and Sorting Alon Halevy Spring Quarter 2001.
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
The Relational Data Model Database Model (ODL, E/R) Relational Schema Physical storage ODL definitions Diagrams (E/R) Tables: row names: attributes rows:
COP Introduction to Database Structures
Contents Design Process Modeling Constraints E-R Diagram Design Issues
Entity-Relationship Model
Lecture 5: Conceptual Database Design
Entity- Relationship (ER) Model
Modeling Constraints Extracting constraints is what modeling is all about. But how do we express them? Examples: Keys: social security number uniquely.
Entity-Relationship Model
Entity Relationship Model
© 2014 by McGraw-Hill Education. This is proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner.
© The McGraw-Hill Companies, All Rights Reserved APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
DESIGNING DATABASE APPLICATIONS
Entity-Relationship Model
Tables and Their Characteristics
Chapter 7: Entity-Relationship Model
Chapter 7: Entity-Relationship Model
Entity-Relationship Modelling
Chapter 7 Entity-Relationship Model
Conceptual Database Design
Outline of the ER Model By S.Saha
ER MODEL Lecture 3.
بسم الله الرحمن الرحيم.
Order Database – ER Diagram
From E/R Diagrams to Relational Schema
Entity-Relationship Model
Lecture 2: Database Modeling (end) The Relational Data Model
Lecture 06 Data Modeling: E/R Diagrams
Entity-Relationship Modelling
Functional Dependencies
Database Modeling using Entity Relationship Model (E-R Model)
Lecture 8: The E/R Model I
Chapter 7: Entity-Relationship Model
Weak Entity Sets An entity set that does not have a primary key is referred to as a weak entity set. The existence of a weak entity set depends on the.
Lecture 5: The Relational Data Model
Entity-Relationship Model & Diagram
Chapter 7: Entity-Relationship Model
Entity-Relationship Diagram (ERD)
DBMS ER-Relational Mapping
Terminology Product Attribute names Name Price Category Manufacturer
Entity Relation Model Tingting Zhang.
Lecture 08: E/R Diagrams and Functional Dependencies
Presentation transcript:

COP5725 Database Management ER DIAGRAM AND RELATIONAL DATA MODEL Prof: Dr. Shu-Ching Chen TA: Sheng Guan

Entity-Relationship Model

E- R Data Modeling Example: specific person, company, event, plant An entity is an object that exists and is distinguishable from other objects. Example: specific person, company, event, plant Entities have attributes Example: people have names and addresses An entity set is a set of entities of the same type that share the same properties. Example: set of all persons, companies, trees, holidays

Attributes An entity is represented by a set of attributes, that is descriptive properties possessed by all members of an entity set. Example: instructor = (ID, name, street, city, salary ) course= (course_id, title, credits) Attribute types: Simple and composite attributes. Single-valued and multivalued attributes Derived attributes

Relationship Sets A relationship is an association among several entities Example: 44553 (Peltier) advisor 22222 (Einstein) student entity relationship set instructor entity

Entity-Relationship Diagrams Representing entities we represent an entity by a named rectangle use a singular noun, or adjective + noun refer to one instance in naming CUSTOMER PART-TIME EMPLOYEE

Entity-Relationship Diagrams Representing relationship DEPT EMPLOYEE employs

Entity-Relationship Diagrams One to one One to many

Entity-Relationship Diagrams Many-to-many relationship (M:N): exists when one instance of the first entity can relate to many instances of the second entity, and one instance of the second entity can relate to many instances of the first entity. (c) Many to many

E-R Diagram for a University

The Relational Data Model Database Model (ODL, E/R) Relational Schema Physical storage Complex file organization and index structures. ODL definitions Diagrams (E/R) Tables: row names: attributes rows: tuples

Terminology Attribute names Name Price Category Manufacturer gizmo $19.99 gadgets GizmoWorks Power gizmo $29.99 gadgets GizmoWorks SingleTouch $149.99 photography Canon MultiTouch $203.99 household Hitachi tuples

More Terminology Every attribute has an atomic type. Relation Schema: relation name + attribute names + attribute types Relation instance: a set of tuples. Only one copy of any tuple! Database Schema: a set of relation schemas. Database instance: a relation instance for every relation in the schema.

name category name price makes Company Product Stock price buys employs Person name ssn address

Entity Sets to Relations name category price Product Product: Name Category Price gizmo gadgets $19.99

Relationships to Relations Start Year name category name makes Company Product Stock price Relation MAKES (watch out for attribute name conflicts) Product-name Product-Category Company-name Starting-year gizmo gadgets gizmoWorks 1963

Handling Weak Entity Sets affiliation Team University sport number name Relation TEAM: Sport Number University-name mud wrestling 15 Montezuma State U. - need all the attributes that contribute to the key of Team - don’t need a separate relation for Affiliation.

Relational Data Model Key point: Indicate your primary key Define attribute’s data type Indicate the relationship

ER Model to Relational Model

Populate your relation Key point: At least five records are needed for each table. Also indicate the PK here.

Constraint Key point: Indicate the constraint at the end