HOSPITAL DATABASE
There are four tables in the database as follows
1) patient (p_id, p_name, age, p_add)
2) doctor(d_id , d_name , d_add)
3) attend (d_id, p_id)
4) admitted(p-id, d_o_a)
Create the table Patient
SQL> create table patient
(p_id varchar2(20),
p_name varchar2(20),
age number(3),
p_add varchar2(20));
Create the table Doctor
SQL> create table doctor
(d_id varchar2(20),
d_name varchar2(20),
d_add varchar2(20));
Create the table Attend
SQL> create table attend
(d_id varchar2(20),
p_id varchar2(20));
Create the table Admitted
SQL> create table admitted
(p_id varchar2(20),
d_o_a date);
Insert The Values Into Patient Table
SQL> insert into patient values
(‘&p_id’,’&p_name’,&age,’&p_add’);
Insert The Values Into Doctor Table
SQL> insert into doctor values
(‘&d_id’,’&d_name’,’&d_add’);
Insert The Values Into Attend Table
SQL> insert into attend values
(‘&d_id’,’&p_id’);
Insert The Values Into Admitted Table
SQL> insert into attend values
(’&p_id’,&d_o_a);
Show The details Of Patient Table
SQL> select * from patient;
Show The details Of Doctor Table
SQL> select * from patient;
Show The details Of Attend Table
SQL> select * from attend;
Show The details Of Admitted Table
SQL> select * from admitted;