0% found this document useful (0 votes)
36 views

P - Id Name Age Weight Gender Disease Mapping Telephone Entity P - Id Phone

The document describes various entity relationship diagrams for a hospital database. It defines tables for patients, doctors, departments, lab reports, bills, rooms, and more. It also defines the primary keys and foreign key relationships between the tables. The final section analyzes the tables and determines they are in first normal form or second normal form.

Uploaded by

Amen Abatemame
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

P - Id Name Age Weight Gender Disease Mapping Telephone Entity P - Id Phone

The document describes various entity relationship diagrams for a hospital database. It defines tables for patients, doctors, departments, lab reports, bills, rooms, and more. It also defines the primary keys and foreign key relationships between the tables. The final section analyzes the tables and determines they are in first normal form or second normal form.

Uploaded by

Amen Abatemame
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Relational table

P_id name Age weight gender disease


Mapping telephone entity

P_id phone
Mapping Doctor table entity

D_id D_name Dep_id


Mapping Department entity

Dep_id Dep_loc Dep_name


Mapping Inpatient entity

P_id Date_admission Date_discharge Lab_no Room_no


Mapping Out patient entity

P_id Lab_no date


Mapping Lab report entity

P_id Lab_no weight D_id amount

Lab_no catagory
Mapping Bill entity

Bil_id P_id Lab_charge Doc_charge No_days Room_charge

Bil_id P_id P_type

Mapping Employeeentity

Emp_id Emp_name salary sex age

Emp_id phone

Mapping Rooms entity

status Room_no Room_type

1
Relational table

Mapping doctor consulting patient entity

P_id Name age weight gender disease Dcp_id

Mapping doctor checking lab report

P_id Lab_no weight D_id amount Dcl_id

Mapping lab report deciding patient disease

Lab_no Amount Weight D_id Pl_id

Mapping inpatient admitted to aroom

Date_admission Date_discharge Lab_no Room_no Inar_id

Mapping Patient issued to bill

Bil_id Lab_charge Doc_charge No_days Room_charge Pib_id

The final relation schema

Patient

P_id Name age Weight Gender disease Dcp_id


Type of norm=1nf

P_id Phone

Fd1:{pid}->pname,age,weight,gender,disease,phone

Fd2:{dcid}->docname,docdep,docname

2nf

P_id Name age weight Gender disease

2
Relational table

Dcp_id Docname

Doctor

D_id D_name Dep_id


Type of norm=2nf

Fd1:{docid}->docname

Fd2:{depid}->dep name,deploc

Department

Dep_id Dep_loc Dep_name Dmdep_id

Type of norm=2nf

Fd1:{dep_id}->dep_loc,depname

Fe2{docid}->docname

Lab report

P_id Labreport_no Weight D_id amount Dcl_id


Type of nirm=1nf

Labreport_no catagory
Fd1:{pid}->pname,

Fe2:{labreport }->no,weight,did,amount,catagories

Fd3:{did,labreport no}->dcl_id

Mapping lab report deciding patient disease

Lab_no Amount Weight D_id Pl_id


Type of norm 1nf

Fd:{lab no}->amount,weigt,did,pi_id

3
Relational table

Bill

Bil_id Lab_charge Doc_charge No_days Room_charge iPib_id oPib_id


Type of norm=2nf

Fd:{bill_id}->lab charge,doc charge,no days,room charge,ipib_id,opib_id

Room

Status Room_no Room_type


Type of

Out patient

P_id Lab_no date

In patient

Date_admission Date_discharge Lab_no Room_no Inar_id

You might also like