Skip to main content

EER Diagram for non Profit Organization

Question: 
Draw E-R diagram for Non Profit Organisation.
Convert E-R diagram into tables.

Step 1: E-R Diagram


Step 2: Converting the E-R Diagram into Tables
b. Converting entity to table and attribute to columns
Orgpital
Orgp-id
Primary Key
HCity

HAddress

Org-Name

Pat-id
Foreign key references to Pat-id of Patient table
Doc-id
Foreign key references to Doc-id of Doctor table
Patient
Pat-id
Primary Key
PName
PAddress
PDiagnosis
Record-id
Foreign key references to Record-id of Medical Record table
Orgp-id
Foreign key references to Orgp-id of Non Profit Orgnaisationtable
Medical Record
Record-id
Primary Key
Problem
Date_of_examination
Pat-id
Foreign key references to Pat-id of Patient table
Doctor
Doc-id
Primary Key
DName
Qualification
Salary
Orgp-id
Foreign key references to Orgp-id of Non Profit Orgnaisationtable
Step 3: Mapping of Attributes
  • Simple Attributes
Simple Attributes which can not be divided into subparts.
Example: Salary of Doctor
  • Composite Attributes
Composite Attributes which can be divided into subparts.
Example: Patient Name, Doctor Name
Step 4: Mapping of Relationships
b. Foreign Key approach
Orgp_patient
Pat-id
Non Profit Orgnaisationtable makes foreign key references to Pat-id of Patient table
Orgp-id
Patient table makes foreign key references to Orgp-id of Non Profit Orgnaisationtable
Orgp_Doctor
Orgp-id
Doctor table makes foreign key references to Orgp-id of Non Profit Orgnaisationtable
Doc-id
Non Profit Orgnaisationtable makes foreign key references to Doc-id of Doctor table
PatiPPatient_MedicalRecord
Pat-id
Medical Record table makes foreign key references to Pat-id of Patient table
Record-id
Patient table makes foreign key references to Record-id of Medical Record table
Step 5: Identifying the relationships
a. Non Profit Orgnaisationhas a set of patients.
Therefore the relations is 1……..N.
b. Non Profit Orgnaisationhas a set of doctors.
Therefore the relations is 1……..N.
c. Doctor are associated with each patient.
Therefore the relations is N……..1.
d. Each patient has record of various test and examination conducted.
Therefore the relations is 1……..N.

Comments

Popular posts from this blog

Cloud Computing Simulator  CloudSim  CloudSim is a simulation tool . This tool is easily and free of cost available   for cloud developer to test the performance of their provisioning policies in a repeatable and controllable environment.This tool is design and developed in java language and available in the form of jar files for the simulation of cloud scenarios. CloudSim library is help to tune the bottlenecks before real-world deployment. It provides essential classes for describing data centres, computational resources, virtual machines, applications, users, and policies for the management of various parts of the system such as scheduling and provisioning. Using these components, it is easy to evaluate new strategies governing the use of clouds, while considering policies, scheduling algorithms, load balancing policies, etc. It can also be used to assess the competence of strategies from various perspectives such as cost, application execution time, etc....
CloudSim Simulator Pause and Stop This code is for simulator work for pause and start after simulation The Cloudsim API having number of class and class having method For pausing the simulator CloudSim.pauseSimulation() method for pause the simulation we have to pass the integer number for pausing the cloudsim simulator CloudSim.pauseSimulation(int) The resumeSimulation() method is use for CloudSim simulation start after the pause CloudSim.resumeSimulation(); Runnable monitor=new Runnable(){ Public void run(){ CloudSim.pauseSimulation(200); While(true){ If(CloudSim.isPaused()){ Break; } try{ Thred.sleep(100); }catch(InterruptedException e){ e.printStackTrace(); } Log.printLine(“\n\n”+CloudSim.clock()+”:The Simulation is paused for 5 sec \n\n”); try{ Thread.sleep(5000); }catch(InterruptedException e){ e.printStackTrace(); } //Add the cloudlet to the list and submit the list to the broker. CloudSim.resumeSimulation(); }; new Thread(monitor).start()...