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

Slides:



Advertisements
Similar presentations
ENTITY RELATIONSHIP MODELLING
Advertisements

Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Concepts of Database Management Seventh Edition Chapter 6 Database Design : ERD Model.
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
E/R Exercises – Part I April 16, 2017.
Entity-Relationship Data Model CS 157A Professor Sin-Min Lee Student: Yen-Chu Pan.
Modeling Data The Entity Relationship Model (ER) For Database Design.
Entity-Relationship Data Model Alex Ostrovsky. Presentation Overview ► Short historical overview ► Elements of E-R Model ► Basic organization & relationships.
The Entity-Relationship Data Model
1 The Entity-Relationship Data Model Chapter 2 (Database Design)
1 Data Modelling Which data to include in the database.
CSCI 242 Relational Data Modeling Copyright 2011, David C. Roberts, all rights reserved.
Database Design & ER Diagrams
Database Systems Relational Model Concepts Toqir Ahmad Rana Database Management Systems 1 Lecture 17.
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,
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas.
Entity-Relationship Modeling I The cautious seldom err. Confucius.
1 Relational model concepts Key constraints Referential integrity constraint Steen Jensen, autumn 2013.
ICOM 5016 – Introduction to Database Systems Lecture 4 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
Dr. Mohamed Osman Hegaz1 Conceptual data base design: The conceptual models: The Entity Relationship Model.
Entities and Attributes
DATA MODELLING TOOLS FOR ORGANISING DATABASES. For a database to be organised and logical, it must be well-designed and set out. In such cases, the databases.
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 2/1 Copyright © 2004 Please……. No Food Or Drink in the class.
Entity-Relationship Data Model N. Harika Lecturer(csc)
Q1: What is DBMS and explain its architecture. Q2: Explain Data Independence in detail. Q3: What is database user and explain the types of database user.
Rensselaer Polytechnic Institute CSCI-4380 – Database Systems David Goldschmidt, Ph.D.
Database Systems Lecture # 7 8 th Feb, Conceptual and Logical Design Person buys Product name pricenamessn Conceptual Model: Relational Model: (plus.
Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Rob and Coronel Adapted for INFS-3200.
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
1 Entity-Relationship Diagram. 2 Components of ERD: –Entity –Relationship –Cardinality –Attributes.
Slide Chapter 5 The Relational Data Model and Relational Database Constraints.
An Entity Relationship (ER) Diagram is a graphic that shows the interrelationship between entities in a database.
© D. Wong Ch. 2 Entity-Relationship Data Model (continue)  Data models  Entity-Relationship diagrams  Design Principles  Modeling of constraints.
CPSC 603 Database Systems Lecturer: Laurie Webster II, M.S.S.E., M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 2 Introduction to a First Course in Database Systems.
Databases Illuminated Chapter 3 The Entity Relationship Model.
Home Work. Design Principles and Weak Entity Sets.
Announcements Reading for Monday –4.6 Homework 3 – Due 9/29.
Rensselaer Polytechnic Institute CSCI-4380 – Database Systems David Goldschmidt, Ph.D.
advanced data modeling
Data Modeling Yong Choi School of Business CSUB. Part # 2 2 Study Objectives Understand concepts of data modeling and its purpose Learn how relationships.
Lecture 03 Entity-Relationship Diagram. Chapter Outline.
CPSC 603 Database Systems Lecturer: Laurie Webster II, M.S.S.E., M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 4 Introduction to a First Course in Database Systems.
Rensselaer Polytechnic Institute CSCI-4380 – Database Systems David Goldschmidt, Ph.D.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
6.1 © 2007 by Prentice Hall Chapter 6 (Laudon & Laudon) Foundations of Business Intelligence: Databases and Information Management.
Test SEITA.
Lecture 3 A short revision of ER and EER modelling See R. Elmasri, S.B. Navathe. Fundamentals of Database Systems (third edition) Addison-wesley. Chapter.
Database -Entity-Relationship Model 2012/03/05.
Example COMPANY Database
High-level Database Models Prof. Yin-Fu Huang CSIE, NYUST Chapter 4.
A short revision on entity- relationship modelling.
IT 5433 LM2 ER & EER Model. Learning Objectives: Explain importance of data modeling Define and use the entity-relationship model Define E/R terms Describe.
ENTITY RELATIONSHIP DIAGRAM. Objectives Define terms related to entity relationship modeling, including entity, entity instances, attribute, relationship.
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
Entity-Relationship Data Model
Entity Relationship (E-R) Model
Entity/Relationship Modelling
Entity-Relationship Model
ER model Ashima Wadhwa.
Outline of the ER Model By S.Saha
CSCI-100 Introduction to Computing
CS 174: Server-Side Web Programming February 12 Class Meeting
Database Modeling using Entity Relationship Model (E-R Model)
Chengyu Sun California State University, Los Angeles
Entity-Relationship Data Model
Database Dr. Roueida Mohammed.
Chapter 3: Multivalued Dependencies
Session 5: Weak Entity Sets and ER Model to Relational ( )
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.

 An entity is a building block of our database, abstracting an object of some sort  e.g. movie, faculty member, student  An entity set is a collection of similar entities  e.g. all movies, all faculty members, all students  This is similar to the object/class concepts of OOP, but there are no methods/functions

 Each entity set has a key and (usually) other attributes  The key consists of one or more attributes  The key should functionally determine all other attributes!  Entity sets should be in BCNF or 3NF  Entity sets should not have attributes that relate to other entity sets, unless they are foreign keys

 An E/R diagram is a graph representing:  Entity sets (rectangles)  Attributes (ovals)  Relationships (diamonds) ▪ i.e. connections between two or more entity sets Students Courses id name enroll-in E/R diagrams are a notation for describing database schemas keys are underlined

 Each course has many enrolled students  Each students enrolls in many classes  Note that many implies zero or more Students Courses enroll-in

 Each department has many faculty  Each faculty member belongs to at most one department (so zero or one) Faculty Departments in “at most one”

 Each department has at most one chair  Each faculty member can be chair of at most one department Faculty Departments chair-of

 For a particular major and student, there is at most one faculty member who is the advisor  A faculty member may advise many students in many majors Students Faculty advised-by Majors

 A student enrolls in a course with at most one department code (e.g. CSCI)  Is this the correct relationship? Students Courses enroll-in DeptCodes (e.g. CSCI)

 The department code is actually functionally determined by the course itself (e.g. by CRN)  Note that this does not account for cross-listed courses.... Students Courses enroll-in DeptCodes (e.g. CSCI) has

 Is this the correct relationship?  It is correct (and necessary) if a faculty member can advise students across multiple majors  Otherwise, each faculty should functionally determine the major s/he advises Students Faculty advised-by Majors

 A movie may have many sequels  For each sequel, there is at most one original movie Movies sequel-of original sequel exactly one in this case... role

 The grade attribute is associated with the given relationship ▪ And involves both a student and a course  This is merely a shortcut.... Students Courses enroll-in grade

 The grade attribute of the Grades entity set (relation) is functionally determined by the entire tuple involving Students and Courses  i.e. a student enrolled in a course has a grade Students Courses enroll-in Grades grade

 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....