IT 354 Database Management System
IT 354 Database Management System
1b.)
1c.)
InPateient And OutPatient both acts as the weak entity as their existence depends upon the
labreport entity
1d.)
In Patient and Employee Entity, Pcontactno and Econtactno represents multi-value attribute as it
can have multiple values for the contact no.
1e.)
Patient Consults Doctor is a 1:1 relationship. One Patient consults one doctor at a time.
1f.)
Doctor Reviews LabReport 1:M relationship. Doctor reviews multiple reports of the same
patient.
1g.)
LabReport decides Inpatient and outpatient act as N:M relationship as multiple reports belong to
one or more patient.
1h.)
Ternary Relaionship
Lab Report
1i.)
ER Diagram
Pcontact No
Page
Psex
PappoinmentDate
Paddress Date
Date Admitted
Pname
Admitted
Date Discharge
Pid Patient
Consults Visits
Registers
Doctor
Eage SPH Econtact No
Esex Ejoiningdate
has
Date
Eaddress
Edesignation
Employee
Ename Admitted Admin
ELicenseno
Review Eid
IS A
s Maintains
ReportNo Nurse
Pid
Lab Report
InvoiceNo
Details
Outpatient
date Controls
Decides
Labreportno DoctorRefid
Room Pid
Pid DoctorRefid
Rid InvoiceNo
Rtype Rrate
Issued
2.i) ..viii)
Patient
Employee
Room
Records/Invoice
LabReport
Inpatient
Patient
Employee
Room
LabReport
InPatient
OutPatient
UN Normalized Relation
Branch_ID B_Location B_Dept B_Head ContactNo Contractor_ID Contractor C_location C_ContactNo Tender_ID Job_ID T_open T_Close Amount
1 Al Khor Sales Mohammed 44135678 1001 Urbacon Al Khor 61324568 3001 1 15/02/2015 15/03/2015
150,000.0
2 Doha Finance Ali 44556681 1002 Rasgas Doha 77453267 3002 2 25/04/2015 25/05/2015
650,000.0
3 Saniyya Lease Hamza 70306720 1001 Urbacon Al Khor 61324568 3003 3 15/12/2014 15/1/2015
659,000.0
4 Jumerah Safety Abdullah 55321112 1001 Urbacon Al Khor 61324568 3004 4 15/02/2015 15/03/2015
235,500.0
5 Riyadh HR Nayab 77117242 1002 Rasgas Doha 77453267 3005 5 25/04/2015 25/05/2015
76,000.00
3 Saniyya Lease Hamza 70306720 1003 Qapco Riyadh 44678912 3006 6 15/12/2014 15/1/2015
556,777.0
4 Jumerah Safety Abdullah 55321112 1004 GBC Doha 77453267 3007 7 15/02/2015 15/03/2015
45,600.00
5 Riyadh HR Nayab 77117242 1005 Gulf Const Rayan 44678912 3008 8 25/04/2015 25/05/2015
63,000.00
1 Al Khor Sales Mohammed 44135678 1001 Urbacon Al Khor 61324568 3009 9 15/12/2014 15/1/2015
88,990.00
2 Doha Finance Ali 44556681 1004 GBC Doha 77453267 3010 10 15/02/2015 15/03/2015
99,000.00
b)
Branch_ID
Contractor_ID
Tender_ID
c)
Contractor_ID-->{Contractor,C_Location,C_Contactno,Job_ID}
Tender_ID-->{Tender_ID,Job_ID,T_Open,T_Close}
d)
BCNF Relation
Branchdetails
Contractordetails
ER Modelling (Top down Approach): it is the graphical technique for understanding and
organizing the data without its actual implementation. It is used for developing commercial
database applications containing complex data.
Pros
1. It is simple and easy to understand. Users without prior knowledge can also easily
understand.
2. It can be easily generalized and specialized based upon the requirements.
3. A high level data system can be designed using this approach
Cons
Pros
Cons
From the beginner point of view I would prefer Top down approach as its simple and easy to
understand. Moreover the graphical representation makes it easier to add or remove the
requirements at any time.
Bibliography
https://cs.uwaterloo.ca/~david/cs338/12%20ER%20to%20Rel.pdf
http://holowczak.com/converting-e-r-models-to-relational-models/
http://www.cs.ust.hk/~wilfred/Bobby/public_html/report/node37.html#SECTION008310000000
00000000
http://www.careerbless.com/db/rdbms/Overview.php
Bibliography
http://creately.com/blog/diagrams/er-diagrams-tutorial/
http://www.studytonight.com/dbms/database-normalization.php
http://www.tutorialspoint.com/dbms/database_normalization.htm
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.296.6945&rep=rep1&type=pdf
http://www.tutorialspoint.com/dbms/er_model_basic_concepts.htm