Académique Documents
Professionnel Documents
Culture Documents
Entities, Attributes and Primary key discovered for Hospital Management System
Patient: PID, Name, Address, Age, Sex, Details, Contactno (Primary key:PID)
Employee:EID,Name,Address,Age,LicenseNo,dateofjoining,Contactno,Experience,Salary
(Primary key:PID)
1b.)
Doctor, Admin, Nurse are the sub type Entity .Doctor is subtype entity because it comes under
Employee but it is also Super entity as it contains Trainee and permanent as sub entities.
1c.)
1d.)
Name and Contact no both are multivalued attributes in patient and employee entity as name
consists of first name ,last name and contactno may consists of mobile or landline no.
1e.)
Patient Assigned Room, Patient attends doctor are the 1:1 relationship found.
1f.)
1g.)
Nurses governs rooms .N:M relationship as multiple rooms are handled by multiple persons.
1h.)
Doctor
Permament IS Trainee
A
1i.)
Complete ER Diagram
Date Admitted
Admitted
Date Discharge
Age contact No
Details Roomtype
Sex Roomrate
Address
Date
Name Governs
Period
RoomID contact No
License
Employee
no
Age
EID
attends
Address
IS A
Name
Doctor Reception
Maintains
Temporary IS A Permanent
Details
Appntdate
Records
EID
PID
Recordno
2.i) ..viii)
The eight steps algorithm required to convert an EERD into set of relations
1. Map Regular Entity Types: for each entity type we have to create a relation that
contains only single value attributes. We have to declare primary key to uniquely
identify the other attributes.
2. Map Weak Entity Types: for each weak entity type we have to create a relation that
contains only single value attributes and also define the foreign key.
3. Map 1:1 Relationship: Apply foreign key, merged relationships, cross-reference
approach to identify all the 1:1relatioship
4. Map 1:N Relationship: Identify the relationship schema that represent entity type at
N side of 1:N relationship
5. Map N:M Relationship: for every N:M relationship or ternary or of any higher
order type create a new relation.
6. Map Multivalued Attributes: create a new relation to hold multivalued attributes.
7. Specializations
8. Mapping Union types (Generalization).
Patient
Employee
Room
Records
Patient:
Primary keys
Branch
Contractor ID
Quotationno
c)
Quotationno-->{Tenderno,lastdate,Amountpen}
d)
Branch
Contractordetails
5.)
ER (Entity relationship) Diagram also known as Top down approach of designing the database.
It is the graphical representation of different components entities, attributes and the relationship
among them. It uses different notations to represent the entity, attributes and relationship. It is
widely used in creating database design for complex data. It does not follow any standard
procedure for developing the design but it helps us to explore each component briefly.
Normalization also known as the bottom up approach is most common approach used by
professionals in database designing. Using different levels of normal forms (1NF, 2NF, 3NF,
4NF, 5 NF) we are able to remove the redundancies and find out the dependencies between
various relations. At each level of normalization we break the relation into sub relations in order
to remove the repetition of records in the relation (generalization)
Top down approach is simple and easy to understand but from professional and systematic point
of view I will prefer using bottom up approach .As we have actual data in bottom up approach it
becomes easier to find out the dependencies between the two relations.
Bibliography
http://www.tutorialspoint.com/dbms/er_diagram_representation.htm
http://www.studytonight.com/dbms/er-diagram.php
http://www.studytonight.com/dbms/database-normalization
https://www.cs.oberlin.edu/~jdonalds/311/lecture11.html
http://www.slideshare.net/ARADHYAYANA/er-diagram-to-relational-schema-mapping
http://www.learndb.com/databases/how-to-convert-er-diagram-to-relational-database
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