Amity School of Engineering & Technology E-R Diagram for a University Enterprise.

Slides:



Advertisements
Similar presentations
Convert ER to Relational Database Entity relation Entity relation Attributes attributes Attributes attributes Primary key primary key Primary key primary.
Advertisements

Relational Database Design Via ER Modelling
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Huiswerk Lees delen 3.2, 3.3 van hoofdstuk 3. opgaven voor hoofdstuk 2: modelleeropgave 5.
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.
E R Model to Relational Model
INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS Dr. Adam Anthony Fall 2012.
CS F212 Database Systems Today’s Class E R Model.
Entity-Relationship Modelling
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. Database Management Systems I Alex Coman, Winter 2006 Entity-Relationship.
1 Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E-R Diagram Extended E-R Features Design of an E-R Database.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Reduction of an E-R Schema to Tables A database which conforms to an E-R diagram can be represented.
Chapter 7: Entity-Relationship Model
Entity-Relationship Model
Database System Concepts, 5th Ed. Chapter 6: Entity-Relationship Model.
Entity-Relationship Model
Converting ER model Into Relational Table
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.
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 6: Entity-Relationship.
Chapter 3: Relational Model I Structure of Relational Databases Structure of Relational Databases Convert a ER Design to a Relational Database Convert.
Chapter 3: Relational Model  Structure of Relational Databases  Normal forms (chap. 7)  Reduction of an E-R Schema to Relational (Sect. 2.9)  Relational.
Chapter 7 Database Design and The E–R Model. 2 Goals n Facilitate DB design and represent the overall logical structure of the DB. n Definition Entities.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 7: Entity-Relationship.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 7: Entity-Relationship.
Chapter 6: Entity-Relationship Model. Design Process Modeling Constraints E-R Diagram Design Issues Weak Entity Sets Extended E-R Features Design of the.
Database System Concepts, 5th Ed. ©Silberschatz, Korth and Sudarshan Chapter 6: Entity-Relationship Model.
EXAMPLE. Subclasses and Superclasses Entity type may have sub-grouping that need to be represented explicitly. –Example: Employee may grouped into.
1 Session 2 Welcome: The seventh learning sequence “ Reduction of an EER schema to tables“ Recap : In the previous learning sequence, we discussed the.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com ICOM 5016 – Introduction.
7.1Database System Concepts - 6 th Edition Chapter 7: Entity-Relationship Model Design Process Modeling Constraints E-R Diagram Design Issues Weak Entity.
7.1Database System Concepts - 6 th Edition Chapter 7: Entity-Relationship Model Design Process E-R Modeling Constraints E-R Diagram Weak Entity Sets Extended.
ICOM 5016 – Introduction to Database Systems Lecture 9 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
Entity Relationship Diagram (2)
DATABASE MANAGEMENT SYSTEM Entity-Relationship Model.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan Lecture-03 Introduction –Data Models Lectured by, Jesmin Akhter.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 7: Entity-Relationship.
Modeling A database can be modeled as: a collection of entities, relationship among entities. An entity is an object that exists and is distinguishable.
Chapter 6: Entity-Relationship Model. 6.2 Chapter 6: Entity-Relationship Model Design Process Modeling Constraints E-R Diagram Design Issues Weak Entity.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 7: Entity-Relationship.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
CS157A Lecture 4 ER Model 2 Prof. Sin-Min Lee Department of Computer Science San Jose State University.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 7: Entity-Relationship.
Database Design Slide 1 Database Design Lecture 7 part 2 Mapping ERD to Tables.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Module 8: Entity-Relationship.
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.
Chapter 7: Entity-Relationship Model
Database System Concepts, 7 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Module 4: Overview of.
©Silberschatz, Korth and Sudarshan1Database System Concepts Entity-Relationship Modelling Entities Attributes Relationships Mapping Cardinality Keys Reduction.
©Silberschatz, Korth and Sudarshan1Database System Concepts Entity-Relationship Modelling Entities Attributes Relationships Mapping Cardinality Keys Reduction.
Chapter 7: Entity-Relationship Model
Chapter 7: Entity-Relationship Model
Chapter 7: Entity-Relationship Model
Chapter 7: Entity-Relationship Model
Chapter 7 Entity-Relationship Model
Outline of the ER Model By S.Saha
Chapter 7: Entity-Relationship Model
Chapter 7: Entity-Relationship Model
Module 4: Overview of Database Design Using the E-R Model
Session 2 Welcome: The seventh learning sequence
Chapter 6: Entity-Relationship Model
Chapter 6: Database Design Using the E-R Model
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.
Chapter 7: Entity-Relationship Model
Chapter 7: Entity-Relationship Model
Chapter 7: Entity-Relationship Model
Chapter 6: Database Design Using the E-R Model
Presentation transcript:

Amity School of Engineering & Technology E-R Diagram for a University Enterprise

Amity School of Engineering & Technology Reduction to Relational Schemas

Amity School of Engineering & Technology Representing Entity Sets With Simple Attributes A strong entity set reduces to a schema with the same attributes student(ID, name, tot_cred) A weak entity set becomes a table that includes a column for the primary key of the identifying strong entity set section ( course_id, sec_id, sem, year )

Amity School of Engineering & Technology Representing Relationship Sets A many-to-many relationship set is represented as a schema with attributes for the primary keys of the two participating entity sets, and any descriptive attributes of the relationship set. Example: schema for relationship set advisor advisor = (s_id, i_id)

Amity School of Engineering & Technology Redundancy of Schemas n Many-to-one and one-to-many relationship can be represented by adding an extra attribute to the “many” side, containing the primary key of the “one” side n Example: Instead of creating a schema for relationship set inst_dept, add an attribute dept_name to the schema arising from entity set instructor

Amity School of Engineering & Technology Redundancy of Schemas (Cont.) For one-to-one relationship sets, either side can be chosen to act as the “many” side – That is, extra attribute can be added to either of the tables corresponding to the two entity sets If participation is partial on the “many” side, replacing a schema by an extra attribute in the schema corresponding to the “many” side could result in null values The schema corresponding to a relationship set linking a weak entity set to its identifying strong entity set is redundant. – Example: The section schema already contains the attributes that would appear in the sec_course schema

Amity School of Engineering & Technology Composite and Multivalued Attributes Composite attributes are flattened out by creating a separate attribute for each component attribute – Example: given entity set instructor with composite attribute name with component attributes first_name and last_name the schema corresponding to the entity set has two attributes name_first_name and name_last_name Prefix omitted if there is no ambiguity Ignoring multivalued attributes, extended instructor schema is – instructor(ID, first_name, middle_initial, last_name, street_number, street_name, apt_number, city, state, zip_code, date_of_birth)

Amity School of Engineering & Technology Composite and Multivalued Attributes A multivalued attribute M of an entity E is represented by a separate schema EM – Schema EM has attributes corresponding to the primary key of E and an attribute corresponding to multivalued attribute M – Example: Multivalued attribute phone_number of instructor is represented by a schema: inst_phone= ( ID, phone_number) – Each value of the multivalued attribute maps to a separate tuple of the relation on schema EM For example, an instructor entity with primary key and phone numbers and maps to two tuples: (22222, ) and (22222, )

Amity School of Engineering & Technology Multivalued Attributes (Cont.) Special case:entity time_slot has only one attribute other than the primary- key attribute, and that attribute is multivalued – Optimization: Don’t create the relation corresponding to the entity, just create the one corresponding to the multivalued attribute – time_slot(time_slot_id, day, start_time, end_time)