0% found this document useful (0 votes)
60 views5 pages

DBMS External Practical

The document provides instructions to create a database with tables for doctors, patients, and patient admissions. It includes the table schemas with column names and data types. Sample data is inserted into each table. Queries are written to select data from the tables. Integrity constraints are defined to prevent null values and restrict gender values.

Uploaded by

alia patil
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)
60 views5 pages

DBMS External Practical

The document provides instructions to create a database with tables for doctors, patients, and patient admissions. It includes the table schemas with column names and data types. Sample data is inserted into each table. Queries are written to select data from the tables. Integrity constraints are defined to prevent null values and restrict gender values.

Uploaded by

alia patil
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/ 5

Name Vishou SunRhapsale

SeatNa- 704155

MCA 1SE

LA3 1 DBMSExteraal Prachcu


DATE
PAGE

3 Create datubase usingolleuiingshema Schema


Apolygiven Jntegrity Conshrants andanswer
the \lawiny QueYieS uSingSAL:ELu datobae
CutA at e a s t a s kecord in each_tuble)

DOCTOR ( Dd Dname Daddresr qualithcatun


PATIENTMASTER(Pcade Pnume Pesdd. Ggegender,
bloodatauDid
ADMITTEDPATIENT Pcode EntrydateDischarge-date, wardno-
disease

Integriy Constraintsi
TheValues at any attrsbuter Shuuld pno be nul
saender valueshould be MCmale) or_F temale

Luees
a) FLad he detls od patient wh are
dscharge
thn he periad 25/a2ÍS _ I5/o4f1S
E
PAGE

nSwerS

CTeate database dhi


Create table DacTOR(Dld int piimary keq, Dname.
vaTchur(20) NoT NILL, Daddzes vorchur(20) NOT NULL
qualincanon NaYchar(2o) No7 NULL)

insertinto DocTraR values(4lo,Ashok N' 'Buldhana 'MD


(5o1R.KalteMalkapur' MBBSJ
(Sa2 M. Patl Malkapur MS Orthei)
(4 P Rajput, PuneBHMG
(412, SRane' algaonMD')

Select ram DoCTOR


Did Dname DaddresS gualincathon
410 Ashok N Buldhana MO
Mal kopur MBAS
SolR.kolte
So2 M.Patil Molkapur MS Ortho

4 P. Ruyput one BHMS


_412 S. Rane Jogoon MD
Create zuble PATIENT MASTERPeode int QuMuyKej,
Poume Varchor (20) NoT NOLL,_Podd. VurchorL20
nume
NoT NULL, age int NaT MDLL,9enderchur
Checkgender inME) bloodgraup varchar
Did reterences DoCTOR Did))_

Lasertnto PATIENTMASTER olues , Ram Ingle


Malegaon3MAB+ A8+,501)
(12, kitan Ph,Bhusawa S 'FO,Sor)
(13,Vishwas MalkapurS4, MR+502
(14,Rashun Jalgaun 21L MB- 412)
I5,Deya x,Buldhana' 26 MAL L10
Select_ trom PATLENI MASTER

Pcade Pname Padd age9ender blaodg roupP 0id


Ram IngleMoleguon 38 M AB+ So
kiron Pahi|BeusawalL18 O S02
13 Vishwa |Malkopur SL M B+ Soz
Ras han Jalgaon 2) M 412
S Deva k. Buldhana2 M At
create
(reate tuble
tuble ADMITIEDPATIENT(Pcade jat_reterences
PATIENTMAS TER Rade), Entry-date date
NOT NOLL Dischargedate. date NOT NULLwordno _nt
No7 NuLL disease, Varchur4o) VOT NDL

insert intn ADMITTEDPATIENT_yalues


LOI/1/2014,15 /1/2014'3,Maleria.
(12,26/o3/201522/03/201S2 Hand Cratk
a14/o4/2015,L/04/2015 2,'Neck ache')
(1olos/2020 16/os/2020,4,High 8P
(IS21//2620 'a6/12/2020, 5, covid');_
Select x ram_ ADMITTDPATIENT
Pcode CndydateDischoyae-dote wordno digeasee
o/u/2014|IS/ /2014 Maleria
12 26/43/21S 27/03/2015 2 Hond Crack
3 4/64/201S14/4/20Is 2 Neck ache
4 (o/oS/2020 6/05/20 20 High 8P
1S21/u/2020 6/12/ 2020 Covid

ueiyAnser
Select rom_PATIENTMASTER Where
Pcode in (select Pcode from ADMITTEDPAT/ENT
BETWEEN25/02/Is' to
where Dischuge-date
1s/o4/2S15
Yecult gegender bloadgraup Did
Pode Pnume Paidd
SOz
12 Kiran Pui Bhusawal F
Bt Soz
13 VishwasMulkapur S4 M

You might also like