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

Department 2. Employee 3. Project 4. Employee - Skills

This document contains instructions for Assignment #01 which requires students to draw ER diagrams for two case studies. The first case study describes a company that delivers computer products and services to customers. It outlines the employees, departments, projects conducted, and skills possessed. The second case study describes a hospital management system, including departments, rooms, doctors, patients, admissions and discharges. The document provides details of the entities, attributes, and relationships for both case studies to aid students in developing the ER diagrams.

Uploaded by

Muhammad Shahbaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
170 views

Department 2. Employee 3. Project 4. Employee - Skills

This document contains instructions for Assignment #01 which requires students to draw ER diagrams for two case studies. The first case study describes a company that delivers computer products and services to customers. It outlines the employees, departments, projects conducted, and skills possessed. The second case study describes a hospital management system, including departments, rooms, doctors, patients, admissions and discharges. The document provides details of the entities, attributes, and relationships for both case studies to aid students in developing the ER diagrams.

Uploaded by

Muhammad Shahbaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Assignment #01

Class: BSCS 3th Semester


Subject: Database Systems
Deadline of Submission: 07-Dec-2020
Draw the ER Diagrams for Following two Case Studies.
Case Study 1:
Industrial Applications of Computers
A relational database is to be designed for a medium sized Company dealing with industrial
applications of computers. The Company delivers various products to its customers ranging from
a single application program through to complete installation of hardware with customized
software. The Company employs various experts, consultants and supporting staff. All personnel
are employed on longterm basis, i.e. there is no short-term or temporary staff. Although the
Company is somehow structured for administrative purposes (that is, it is divided into
departments headed by department managers) all projects are carried out in an inter-disciplinary
way. For each project a project team is selected, grouping employees from different departments,
and a Project Manager (also an employee of the Company) is appointed who is entirely and
exclusively responsible for the control of the project, quite independently of the Company's
hierarchy. The following is a brief statement of some facts and policies adopted by the Company.
• Each employee works in some department.
• An employee may possess a number of skills
• Every manager (including the MD) is an employee
• A department may participate in none/one/many projects.
• At least one department participates in a project.
• An employee may be engaged in none/one/many projects
• Project teams consist of at least one member.

As per the Case Study, the tables their attributes and the constraints are given below :
Following are the table in the database :
1. DEPARTMENT

2. EMPLOYEE

3. PROJECT

4. EMPLOYEE_SKILLS
5. WORKS_ON

We have following constraint type :


1. Primary key

2. Foreign key

3. Check condition

4. NOT NULL

5. UNIQUE

Constraints for the table are given below:


Table : DEPARTMENT
Column_name Data Type Contraint_type
DEPT_ID INT PRIMARY KEY
DEPT_NAME VARCHAR(50) NOT NULL
MGR_ID INT FOREIGN KEY (references
from EMPLOYEE table)

Table : EMPLOYEE

Column_name Data Type Contraint_type


EMP_ID INT PRIMARY KEY
FNAME VARCHAR(50) NOT NULL
MINIT VARCHAR(50) NOT NULL
LNAME VARCHAR(50) NOT NULL
SALARY INT NOT NULL
DEPT_ID INT FOREIGN KEY (references
from DEPARTMENT table)

Table : PROJECT

Column_name Data Type Contraint_type


PRJ_ID INT PRIMARY KEY
PRJ_TITLE VARCHAR(50) NOT NULL
PRJ_MGR_ID INT FOREIGN KEY (references
from EMPLOYEE table)

Table : EMPLOYEE_SKILLS

Column_name Data Type Contraint_type


SKILL_NAME VARCHAR(50) NOT NULL
EMP_ID INT FOREIGN KEY (references
from EMPLOYEE table)

Table : WORKS_ON

Column_name Data Type Contraint_type


EMP_ID INT FOREIGN KEY (references
from EMPLOYEE table)
PRJ_ID INT FOREIGN KEY (references
from PROJECT table)

As per the Case Study the ER Diagram and Relational Schema are given below :

ER Diagram :
Relational Schema :

Case Study 2
Hospital Management System
Aim: XYZ hospital is a multi-specialty hospital that includes a number of departments, rooms,
doctors, nurses, compounders, and other staff working in the hospital. Patients having different
kinds of ailments come to the hospital and get checkup done from the concerned doctors. If
required they are admitted in the hospital and discharged after treatment. The aim of this case
study is to design and develop a database for the hospital to maintain the records of various
departments, rooms, and doctors in the hospital. It also maintains records of the regular patients,
patients admitted in the hospital, the check up of patients done by the doctors, the patients that
have been operated, and patients discharged from the hospital.
Description: In hospital, there are many departments like Orthopedic, Pathology, Emergency,
Dental, Gynecology, Anesthetics, I.C.U., Blood Bank, Operation Theater, Laboratory, M.R.I.,
Neurology, Cardiology, Cancer Department, Corpse, etc. There is an OPD where patients come
and get a card (that is, entry card of the patient) for check up from the concerned doctor. After
making entry in the card, they go to the concerned doctor’s room and the doctor checks up their
ailments. According to the ailments, the doctor either prescribes medicine or admits the patient in
the concerned department. The patient may choose either private or general room according to
his/her need. But before getting admission in the hospital, the patient has to fulfill certain
formalities of the hospital like room charges, etc. After the treatment is completed, the doctor
discharges the patient. Before discharging from the hospital, the patient again has to complete
certain formalitis of the hospital like balance charges, test charges, operation charges (if any),
blood charges, doctors’ charges, etc. Next we talk about the doctors of the hospital. There are
two types of the doctors in the hospital, namely, regular doctors and call on doctors. Regular
doctors are those doctors who come to the hospital daily. Calls on doctors are those doctors who
are called by the hospital if the concerned doctor is not available.

Entity Relationship Diagram Symbols


Royal Rundle Hospital Management Entity Relationship Diagram

You might also like