Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 7 of Advanced Databases

Similar presentations


Presentation on theme: "Lecture 7 of Advanced Databases"— Presentation transcript:

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

2 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

3 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

4 ER Diagram  Page 4

5 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

6 Solution ER  Page 6

7 Solution relational schema diagram
 Page 7


Download ppt "Lecture 7 of Advanced Databases"

Similar presentations


Ads by Google