NAME: Sayali Milind Deo. SEAT NO.:704163 LAB1 DBMS (External Practical Exam)
NAME: Sayali Milind Deo. SEAT NO.:704163 LAB1 DBMS (External Practical Exam)
SEAT NO.:704163
LAB1 DBMS (External Practical Exam)
2) Create database using following schema . Apply given Interity Constraint &
answer the following querues using SQL .
(fill up database with at least 05 records in each table)
Doctor(Did,Dname,Daddress,qualification)
PATIANTMASTER(Pcode,Pname,age gender.bloodgroup,Did)
ADMITTEDPATIENT(Pcode,Entry_date,discharge_date,wardno.,disease)
Integrity Constraint:
The values of any attribute should not null.
Gender value should beM(male) or F(female)
Queries:
A) Find the details of doctors who are tranning the patient of ward no. 3.
Answer:
Create database db1
CREATE TABLE Doctor(
Did int primary key
Dnmae varchar(30) NOT NULL
Daddress varchar(30) NOT NULL
qualification varchar(30) NOT NULLL
insert into Doctor values
(1,’sayali Deo’,’pachora’,’MD’),
(2,’Aboli Wani’,’pune’,’MBBS’),
(3,’Radha Pathak’,’jalgaon’,’MD Gynac’),
(4,’Mansi Deo’,’palghar’,’MD’),
(5,’Dhanu Varma ’,’pachora’,’BAMS’);
Select*from doctor
Did Dname Daddress qualification
1 sayali Deo Pachora MD
2 Aboli Wani Pune MBBS
3 Radha jalgaon MD Gynac
Pathak
4 Mansi Deo Palghar MD
5 Dhanu pachora BAMS
Varma