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

DBMS Micro-Project 1

The document describes a hospital management system project completed by 4 students under the guidance of a professor, including entity relationship diagrams, table structures, sample data insertion, and queries and procedures implemented on the database. It provides the certificate and details of the students who worked on the project to develop a database to manage information about hospitals, doctors, nurses, and patients.

Uploaded by

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

DBMS Micro-Project 1

The document describes a hospital management system project completed by 4 students under the guidance of a professor, including entity relationship diagrams, table structures, sample data insertion, and queries and procedures implemented on the database. It provides the certificate and details of the students who worked on the project to develop a database to manage information about hospitals, doctors, nurses, and patients.

Uploaded by

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

MAHARASHTRA STATE BOARD OF TECHNOLOGY AND EDUCATION, MUMBAI

A Project Report

On

HOSPITAL

MANAGEMENT

SYSTEM

DIPLOMA

IN

ELECTRONICS AND COMPUTER ENGINEERING

Submitted by

MR. DAVARI ATUL SANDIP

MR. JAGTAP ADITYA VIJAY

MR. DORUGADE ANIMESH LAXMAN

MR .PATIL SUDARSHAN SANDEE

DEPARTMENT OF ELECTRONICS AND COMPUTER ENGINEERING

UNDER THE GUIDANCE OF

MR .V . S. REDEKAR

SANT GAJANAN MAHARAJ RURAL POLYTECHNIC, MAHAGAON

ACADEMY YEAR 2023– 24


SANT GAJANAN MAHARAJ RURAL HOSPITAL & RESEARCH CENTER, MAHAGAON

“SANT GAJANAN MAHARAJ RURAL POLYTECHNIC”

A/P- MAHAGAON, SITE- CHINCHEWADI, TAL- GADHINGLAJ, DIST- KOLHAPUR

Certificate
This is to that the following students of THIRDsemester of Diploma in ELECTRONICS AND
COMPUTER ENGINEERING of Institute SANT GAJANAN MAHARAJ RURAL POLYTECHNIC,
MAHAGAON- 416503. (CODE-0965) has completed Micro project.

“HOSPITAL MANAGEMENT SYSTEM” satisfactory in subject DATABASE MANAGEMENT


SYSTEMSsubjectCode 22014 academic years 2022 to 2023as prescribed in the curriculum.
ROLL NO ENROLLMENT NO SEAT NO STUDENT NAME
09 2209650079 MR.PATIL SUDARSHAN SANDIP
10 2209650080 MR.JAGTAP ADITYA VIJAY
19 2209650089 MR. DAVARI ATUL SANDEEP
22 2209650092 MR. DORUGADE ANIMESH LAXMAN

DATE: PLACE: MAHAGAON

Prof.V.S.REDEKAR Prof. M.P.PATIL Prof. R.S.PATIL

(Project Guide) (Head of Department) (Principal)


Attributes

1) HOSPITAL:-
a) Hid
b) Hname
c) Pid
d) Did

2) PATIENT:-
a) Pid
b) Pname
c) Pdiagnosis
d) Did
e) Hid
f) Nid

3) DOCTOR:-
a) Did
b) Dname
c) Qualification
d) Salary
e) Hid

4) NURSE:-
a) Nid
b) Name
c) Salary
E-R Diagram
pid
hid

pdiagnos pname hname

admi
Patient Hospital
tted

pid
nid
did did

hid

to
has

has

did

nurse
doctor

name dname
nid

qual
salary
salary
hid
Table Structure

1) HOSPIYAL TABLE:-
create table hospital
(
hid number(3) primary key,
hname varchar2(20) not null,
pid number(3) not null,
did number(3) not null
);

2) DOCTOR TABLE:-
create table doctor
(
did number(3) primary key,
hid number(3) not null,
dname varchar2(20) not null,
qualification varchar2(20) not null,
salary number(7) not null,
foreign key (hid) references
hospital (hid)
);
3) NURSE TABLE:-
create table nurse
(
nid number(3) primary key,
name varchar2(20) not null,
salary number(7) not null
)

4) PATIENT TABLE:-
create table patient
(
pid number(3) primary key,
did number(3) not null,
hid number(3) not null,
pname varchar2(20) not null,
disease varchar2(20) not null,
foreign key(did) references
doctor (did),
foreign key(hid) references
hospital (hid)
);
Data Insert

1) HOSPITAL TABLE:-
insert all into hospital
values(1,'bombay hospital',101,201)
into hospital
values(2,'D Y patil hospital',102,202)
into hospital
values(3,'Tata memorial',103,203)
into hospital
values(4,'sunrise hospital',104,204)
select * from dual;
2)DOCTOR TABLE:-
insert all into doctor
values(201,1,'ajit','MBBS',80000)
into doctor
values(202,2,'tejas','MS',50000)
into doctor
values(203,3,'ramesh','BHMS',65000)
into doctor
values(204,4,'advait','MD',70000)
select * from dual;

3) NURSE TABLE:-
insert all into nurse
values(10,'ankita',30000)
into nurse
values(35,'radhika',25000)
into nurse
values(46,'arpita',20000)
into nurse
values(30,'girish',35000)
into nurse
values(20,'aniket',28000)
select * from dual;

4)PATIENT TABLE:-
insert all into patient
values(101,201,1,'animesh','allergies')
into patient
values(102,202,2,'atul','colds and flu')
into patient
values(103,203,3,'raj','conjunctivitis')
into patient
values(104,204,4,'om','allergies')
into patient
values(105,201,1,'rahul','colds and flu')
into patient
values(106,202,2,'sanchit','colds and flu')
into patient
values(109,202,2,'aditya','cancer')
into patient
values(110,204,4,'raj','cancer')
select * from dual;
QUERY

select dname,(salary*2) as incremented_salary from doctor;

select * from patient where disease in('allergies','cancer');


select * from patient right outer join hospital
on(patient.hid=hospital.hid);

create view a1 as select pid,pname,disease from patient;

DECLARE
p_id patient1.pid%TYPE:=101;
p_name patient1.pname%TYPE;
dis patient1.disease%type;
BEGIN
SELECT pid,pname,disease INTO p_id,p_name,dis
FROM patient1
WHERE pid = p_id;

dbms_output.put_line('patient1 name is ' || p_id);


dbms_output.put_line('patient1 name is ' || p_name);
dbms_output.put_line('patient1 name is ' || dis);

exception
WHEN no_data_found THEN
dbms_output.put_line('No such patient');
WHEN others then
dbms_output.put_line('Error');

END;
/

declare
total_rows number(5);
BEGIN
update doctor1
set salary=salary+3000;
IF sql%notfound THEN dbms_output.put_line('NO
DOCTORS FOUND'); ELSIF sql%notfound THEN
total_rows:=sql%rowcount;
dbms_output.put_line(total_rows||'DOCTORS FOUND');END IF;
END;

create or replace procedure pro1(d_id in number)


is
sal number(8,2);
begin
select salary into sal from doctor where did=d_id;
if sal>70000 then
update doctor set salary=sal*0.2 where did=d_id;
else
update doctor set salary=40000 where did=d_id;
end if;
end pro1;

declare
doctor_did number;
begin
pro1(&doctor_did);
end;
/
create or replace function f return sys_refcursor
as
c sys_refcursor;
begin
open c for select * from patient
where pname='animesh';
return c;
end;
/

create or replace function f return sys_refcursor


as
c sys_refcursor;
begin
open c for select * from patient
where pname='animesh';
return c;
end;
/

You might also like