Rensselaer Polytechnic Institute CSCI-4380 – Database Systems David Goldschmidt, Ph.D.

Slides:



Advertisements
Similar presentations
ER Model For a college DB
Advertisements

ER to Relational Mapping. Logical DB Design: ER to Relational Entity sets to tables. CREATE TABLE Employees (ssn CHAR (11), name CHAR (20), lot INTEGER,
Logical DB Design: ER to Relational Entity sets to tables. Employees ssn name lot CREATE TABLE Employees (ssn CHAR (11), name CHAR (20), lot INTEGER, PRIMARY.
Relational Database. Relational database: a set of relations Relation: made up of 2 parts: − Schema : specifies the name of relations, plus name and type.
DBMS, RDBMS Concepts BBSR, 06\11\2012, Prof. Suraj Sharma, IIIT-Bh Insert Client/Partner logo.
SQL Lecture 10 Inst: Haya Sammaneh. Example Instance of Students Relation  Cardinality = 3, degree = 5, all rows distinct.
E/R Exercises – Part I April 16, 2017.
Translating from ER to Relationship Schema Adapted from Juliana Freire.
System Analysis - Data Modeling
Systems Analysis Requirements structuring Process Modeling Logic Modeling Data Modeling  Represents the contents and structure of the DFD’s data flows.
SPRING 2004CENG 3521 The Relational Model Chapter 3.
--The Entity Relationship Model(2)--1 Reflexive Rela1tionships  An entity may be related to another entity of the same type.  Example: A Customer could.
Copyright © 2004 Pearson Education, Inc.. Chapter 3 Data Modeling Using the Entity-Relationship Model.
SLIDE 1IS Fall 2002 Database Management: Discussion Session University of California, Berkeley School of Information Management and.
1 Data Modelling Which data to include in the database.
Multiplicity in E/R Diagrams
Enhanced Entity-Relationship Model (EER) 1. Enhanced-ER (EER) Model Concepts Includes all modeling concepts of basic ER Additional concepts: subclasses/superclasses,
CS411 Database Systems Kazuhiro Minami
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,
Ch5: ER Diagrams - Part 2 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Dr. Mohamed Osman Hegaz1 Conceptual data base design: The conceptual models: The Entity Relationship Model.
IS 325 Notes for Wednesday September 18, 2013.
DATABASE MANAGEMENT SYSTEMS BASIC CONCEPTS 1. What is a database? A database is a collection of data which can be used: alone, or alone, or combined /
DATABASE MANAGEMENT SYSTEMS BASIC CONCEPTS 1. What is a database? A database is a collection of data which can be used: alone, or alone, or combined /
Conceptual Design Lecture - 2 Database Development.
Conceptual Design Revision Database Development. Basic constructs of the Entity Relationship Model Entity  Representation of an Entity on an ER diagram.
ER to Relational Translation COMSATS INSTITUTE OF INFORMATION TECHNOLOGY, VEHARI.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
Initial Design of Entity Types for the COMPANY Database Schema Based on the requirements, we can identify four initial entity types in the COMPANY database:
CS 405G: Introduction to Database Systems Lecture 2 : Database Design I.
The Hong Kong University of Science and Technology COMP3311 Spring 2013 Tutorial 1 ER Diagrams.
 Entity-relationship models (ERM) Entity-relationship models (ERM)  Simple E-R Diagram Simple E-R Diagram  Weak Entity Weak Entity  Strong Entity.
 An entity-relationship diagram (ERD) is a specialized graphic that illustrates the interrelationships between entities in a database.
UNIT_2 1 DATABASE MANAGEMENT SYSTEM[DBMS] [Unit: 2] Prepared By Lavlesh Pandit SPCE MCA, Visnagar.
Weak Entity Sets A weak entity is an entity that cannot exist in a database unless another type of entity also exists in that database. Weak entity meets.
ICOM 5016 – Introduction to Database Systems Lecture 5 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
Rensselaer Polytechnic Institute CSCI-4380 – Database Systems David Goldschmidt, Ph.D.
Computing & Information Sciences Kansas State University Friday, 26 Sep 2008CIS 560: Database System Concepts Lecture 13 of 42 Friday, 26 September 2008.
CMPT 258 Database Systems The Relationship Model PartII (Chapter 3)
Keys for Relationship Sets The combination of primary keys of the participating entity sets forms a super key of a relationship set. – (customer-id, account-number)
Lecture 3 Book Chapter 3 (part 2 ) From ER to Relational.
advanced data modeling
Exam 1 Review Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
Lecture 03 Entity-Relationship Diagram. Chapter Outline.
Exam 1 Review Dr. Bernard Chen Ph.D. University of Central Arkansas.
The Entity-Relationship Model, P. I R. Nakatsu. Data Modeling A data model is the relatively simple representation, usually graphic, of the structure.
CST203-2 Database Management Systems Lecture 4. Student entity NIDFNameLNameRegNoExamIdBirthdate.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
Logical Database Design and the Relational Model.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 5 (Part a): Logical Database Design and the Relational Model Modern Database Management.
CSE 412/598 DATABASE MANAGEMENT COURSE NOTES 3. ENTITY-RELATIONSHIP CONCEPTUAL MODELING Department of Computer Science & Engineering Arizona State University.
Mapping E/R to RM, R. Ramakrishnan and J. Gehrke with Dr. Eick’s additions 1 Mapping E/R Diagrams to Relational Database Schemas Second Half of Chapter.
Extended ER Modelling. Extended E-R Features: Specialization Top-down design process; we designate subgroupings within an entity set that are distinctive.
Rensselaer Polytechnic Institute CSCI-4380 – Database Systems David Goldschmidt, Ph.D.
Mapping ER to Relational Model Each strong entity set becomes a table. Each weak entity set also becomes a table by adding primary key of owner entity.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 7: Entity-Relationship.
Test SEITA.
CS422 Principles of Database Systems Convert ER Design to Relations Chengyu Sun California State University, Los Angeles.
Example COMPANY Database
ENTITY RELATIONSHIP DIAGRAM. Objectives Define terms related to entity relationship modeling, including entity, entity instances, attribute, relationship.
Lecture # 14 Chapter # 5 The Relational Data Model and Relational Database Constraints Database Systems.
Database Systems 主講人 : 陳建源 日期 :99/10/19 研究室 : 法 Chapter 4 Enhanced Entity-Relationship and Object Modeling.
Entity Relationship (E-R) Model
Entity-Relationship Model
Entity-Relationship Model
Outline of the ER Model By S.Saha
Order Database – ER Diagram
Database Systems Instructor Name: Lecture-9.
Chengyu Sun California State University, Los Angeles
Database Dr. Roueida Mohammed.
Presentation transcript:

Rensselaer Polytechnic Institute CSCI-4380 – Database Systems David Goldschmidt, Ph.D.

 Modeling a database begins by identifying the information to be stored  Need to also define how information elements are related to one another  Further, define constraints on the information, including defining keys, referential integrity, etc.

 Fundamental goals of E/R modeling:  Capture and document all requirements and business rules as clearly and exactly as possible  Satisfy all requirements of the given problem  Produce E/R diagrams that are easily translatable into relational models/implementations

 Each course has many enrolled students  Each student enrolls in many classes, but the maximum for each student is 6 Students Courses enroll-in <= 6

 In a referential-integrity constraint, an entity in one set is required to have an entity in another set to which it is related  Each department has exactly one chair  Each faculty member can be chair of at most one department Faculty Departments chair-of C “exactly one”“at most one”

 Much like OOP, we can define subclasses in an E/R diagram  We identify parent/child entity sets via the is-a relationship  The Students and Faculty relations inherit all attributes of People ▪ This includes the key(s) of People Students Faculty People is-a

Undergrads Graduates Students is-a specialization generalization Is this a good design?

 A weak entity set is one in which its key is not guaranteed to be unique  The weak entity set is always linked to one or more (strong) entity sets keyB keyA Weak Entity Set Strong Entity Set support C

 Weak entities are determined by one or more supporting entities  The key of the supporting entities are appended to the key of the weak entity ▪ keyA is not unique, but the combined keyA-keyB should be unique Strong Entity Set support keyB keyA Weak Entity Set C

 Dependent names are not guaranteed unique  Names of dependents of a given employee are guaranteed to be unique  Each dependent depends on exactly one employee (required) Employees depend empid name Dependents C

 Course names are not guaranteed to be unique  Names of courses within a given department are guaranteed to be unique  Each course is offered in exactly one department (required) Departments offered deptid name Courses C

Advisors Students advises C Majors has C Faculty serves-as C

 Go back to the relations we’ve worked with in class and create E/R diagrams for each  e.g. MusicGroup, Company  Also create a detailed E/R diagram for the celebrities relations (and relationships!)  see next slide....