Lecture 7 of Advanced Databases

Slides:



Advertisements
Similar presentations
ER Model For a college DB
Advertisements

Exercise 1 Consider the ER diagram below. Assume that an employee may work in up to two departments or may not be assigned to any department. Assume that.
Data Modeling. What are you keeping track of? You begin to develop a database by deciding what you are going to keep track of. Each thing that you are.
Relational Database Design Via ER Modelling
ER Modeling Case Studies
Chapter 3 CIS 458 Sungchul Hong
1 The Entity-Relationship Model Chapter 2. 2 Exercise  What can you say about policy of the bank from the ER diagram?  What can you say about the policy.
Overview Begin 6:00 Quiz15 mins6:15 Review Table Terms25 mins6:40 Short Break10 mins6:50 SQL: Creating Tables60 mins7:50 Break10 mins8:00 Lab – Creating.
Text-Book Chapters (7 and 8) Entity-Relationship Model
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 5- 1.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 5- 1.
Chapter 5 The Relational Data Model and Relational Database Constraints Copyright © 2004 Pearson Education, Inc.
Database Systems Chapter 5 ITM 354. Chapter Outline Relational Model Concepts Relational Model Constraints and Relational Database Schemas Update Operations.
Chapter 5 The Relational Data Model and Relational Database Constraints.
1 Data Modelling Which data to include in the database.
Case study Lisa’s Bookstore IST210.
Database Systems Relational Model Concepts Toqir Ahmad Rana Database Management Systems 1 Lecture 17.
CS 380 Introduction to Database Systems (Chapter 5: The Relational Data Model and Relational Database Constraints)
Dr. Mohamed Osman Hegaz1 Conceptual data base design: The conceptual models: The Entity Relationship Model.
1 Data Modeling : ER Model Lecture Why We Model  We build models of complex systems because we cannot comprehend any such system in its entirety.
CSE 441: Systems Analysis & Design
Instructor :Huda Al-Omair
Entity-Relationship Model Ch. 3
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 The Relational Data Model and SQL.
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 5 The Relational Data Model.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 5- 1.
The Relational Data Model and Relational Database Constraints
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 5 The Relational Data Model and Relational Database Constraints.
METU Department of Computer Eng Ceng 302 Introduction to DBMS The Relational Data Model and Relational Database Constraints by Pinar Senkul resources:
Assignements. CSC343: Intro. to Databases2 Exercise 1 Superkeys: Candidate keys: Primary key:
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 3 The Basic Relational Model.
1 The Information School of the University of Washington Dec 1fit advdatabases © 2006 University of Washington Advanced Database Concepts INFO/CSE.
An Entity Relationship (ER) Diagram is a graphic that shows the interrelationship between entities in a database.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 5- 1.
Schema Conversion Create a table for each entity –1:1 choose one side and put a foreign key –1:* put a foreign key in many side –*:* create a table for.
Relational Data Model DeSiaMore Powered by DeSiaMore.
Chapter 5 The Relational Data Model and Relational Database Constraints Copyright © 2004 Pearson Education, Inc.
Introduction to Database Systems
The Relational Data Model and Relational Database Constraints
COMP 430 Intro. to Database Systems Entity-Relationship Diagram Basics Slides use ideas from Chris Ré.
BIS 360 – Lecture Six (Part 1) Conceptual Data Modeling (Chapter 10 and partial Chapter 12)
Test SEITA.
Data Modeling AND ER MODELS.
A short revision on entity- relationship modelling.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 5- 1.
The Relational Data Model and Relational Database Constraints.
DATA MODELING AND ENTITY-RELATIONSHIP MODEL II IST 210: Organization of Data IST210 1.
Year 12 > 13 Applied GCE ICT Unit 7 Using Database Software.
4/28/2017 Chapter 5 The Relational Data Model and Relational Database Constraints.
Chapter 3 The Relational Data Model and Relational Database Constraints Copyright © 2004 Pearson Education, Inc.
Lecture # 11 & 12 (First Exam) Chapter # 5 The Relational Data Model and Relational Database Constraints Database Systems.
Copyright © 2004 Pearson Education, Inc.
Week 03 – ER Diagram INFOSYS 222.
4/20/2018.
Information System & Database Design
The Entity-Relationship Model
Constraints AND Examples
Relational Integrity Constraints
The Relational Data Model and Relational Database Constraints
12/7/2018.
CS4222 Principles of Database System
The Relational Data Model and Relational Database Constraints
2/28/2019 Chapter 5 The Relational Data Model and Relational Database Constraints.
4/8/2019.
EECS 647: Introduction to Database Systems
5/12/2019.
Constraints AND Examples
Copyright © 2004 Pearson Education, Inc.
CS 405G: Introduction to Database Systems
Presentation transcript:

Lecture 7 of Advanced Databases ER Model - An Example Instructor: Mr.Eyad Almassri

Problem 1 A Bioinformatics Application Patient: has a unique MSP number, a Patient name, a Date of Birth, a Tissue Type (نوع الانسجة)and an indicator denoting whether the tissue is cancerous or normal. A patient library associates a patient with multiple tags Each tag has a unique tag number and a unique nucleotide sequence. For each tag in the patient library, a count is given to record the number of times the tag occurs in the library. In general, the same tag can be associated with any number of patients. A tag may be mapped to a gene. Each gene has a unique gene name and a type. In general, multiple tags may be mapped to the same gene. However, two different genes cannot be mapped to the same tag. Finally, an article is identified by a unique article number and a journal name. An article may analyze multiple genes and a gene may be analyzed by multiple articles.  Page 2

WARM UP Entity Sets: Relationship Sets: Patients - Attibutes are MSP Number, Name, DOB, Tissue Type and Indicator Tags - Attributes are Tag Number and Nucleotide Sequence Genes - Attributes are Gene Name and Type Articles - Attributes are Article Number and Journal Name Relationship Sets: Patient Library - Many to Many, Has an attribute Count Map - Many to 1 from Tags to Genes Analyzes - Many to Many  Page 3

ER Diagram  Page 4

Problem 2 (Taken from Exercise 5.15) Consider the following relations for a database that keeps track of student enrollment in courses and the books adopted for each course: STUDENT(SSN, Name, Major, Bdate) COURSE(Course#, Cname, Dept) ENROLL(SSN, Course#, Quarter, Grade) BOOK_ADOPTION(Course#, Quarter, Book_ISBN) TEXT(Book_ISBN, Book_Title, Publisher, Author) Draw a relational schema diagram specifying the foreign keys for this schema. 1-Draw a entity-relationship diagram. 2-Draw a relational schema diagram specifying the foreign keys for this schema  Page 5

Solution ER  Page 6

Solution relational schema diagram  Page 7