0 ratings0% found this document useful (0 votes) 66 views6 pagesMOD3 IMPqn+ans
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
Modules: SOL Advanced Quenies & DB Appin Devetopment \
_ Alte ae per & Domaincin sae
~)Numefe Datatype, & nkegent Ot Nee 4 (N17, INTEGER jSMPLLINT
: dead P (Flo REAL jpoueLE PRECISION
NuMeDtt) peclij) © & Pies tialaog no 4 detimal drat f=dale,nog clits Bp
tl) Unoroeten 80) ' dodabipe + CHDR | VARCHAR, , CHPRACTER LARS 01 aay B)
n) (BH Slim — BITE) | BT VARYING (ND) ) Binary Lier OBJECT (8.08)
ty), Boolean: TRoE JRALse TONE NOON: x
v) DATE,.:. WYY-MM-DD vi) TIME TH “IME rane YIN TERVAL
VW) Times HH HM! $3 Vil) TRryeatoup + Dater Tre
To pet He datatype cach athsbute we make’ wre 04 domaln & (Ri dornain name used
With fe athibure “Apert (teat. By dotne, g0'r30 ‘Can’ frrprolie. Schema, Vedability for <4.
buati ai demu ben TPE by pollosiny stmt CREATE Domain SNTYPE As LuAela);
Tuple : Mapping, foorn aatho butes tovalues dias from Tespeesve Bee 9 or
Attributes. Tie fntended te desmite dome entity (Rolationthip bho ene)
th te mintisneld. Eample # tuple fr a ial entity. mir be
{Name “Ram! Seow Male 7a ee ae
© Scanned with OKEN ScannerAaggnegati Fianctione jn Sau ve
© ge TS suummatite Tho from mutha fuples Tato single tuple Trbutt ia
ve
CONT’ “ny MAX my Min wgort | AVG
Fy: Setect SomCtatens) pA (salary) MIN fala v4 (salary) oon toto)
PROH EMPLOEE; find evetuaho
Ascortions @ Tigges th (8h. ‘
*Th Se, urarean dpeipy, general eonatrates via Detosatve dasentint oy ween
Arstetion dtaternent 0} DDL
* Fack aiation.ty given a constiatat name © 1¢ specie
+ For oq — 1 spestgy coneNatat Kat faleny of ak ernployte SMTPOF
maf of re Sapt Tat ernploee Ome fet
cteshe pgearion. ¢acmay-consreainT CHECK (NOT ei Tsl fELELT » FROM EMPLDYEE &,
Eee pebeegaedT b rovene, €'talany > M-Selay AND C-bn0 = D-bno AND
Seagian memgesn yp °
+ the contrat name SALARY. CONETERINT 1 sppllowed by kaysond, HEC sbohtch te pilooed
a cond. tH broke that hud hold tue On every clakabate Hate [Raneationte be satioged °
canbe uted to vy er bB wonataint Brits modtny OM deep it
coratiatnls Con be tpedied
ca cond: stentian fo HERE clases *
peatertron, dalony 5
Tha, Conatialnt nome
Py FOHERE clause COnAtKon canbe wed bub many
= hnolkis fp Hotenugt f CREATE TRIRYER whith can be rotten a CREATE TENGE
Gainey VOLATION BEFERE’ InteeT 0 UPDATE OF SALARY ,SORERUKDK SSN ON © MPLOYEE
For EACH ROD KEN ( NEW. SAURY > [SELECT SALARY FROM EMPLOYEE KOHEEE
[G5M1= NEW: SUPERVUOR. £6n )) CNADPH. SUPER WIEOR ( RluD- CupEwvitor £60,
“Trigga, has 3 Conponent-
irenk “peut fiat tte DB opeation Ihab riggest the eseeubion
nditi)- Detexmina jotun the tigen ahould beractivated on paedefvad criteria
ion = fortis Of Sa. Statement / procedures exeuitta shen teiggen Se trigneaed
Properticn of Cursors : guna etm of turer destaationt4,
> deciane curioiname [Hi icine] [seeou). evesoe LoiTH Hp.) FoR some @ucey
Cotocr By oadactim Lit] [FoR READ ony { FoR UPDATE )
A cwuor cante declaed te be a. read-only cumoy (FOR READ ONLY) oH Fie a.
tupuoton a. bows elation whan Uspda delplable Wes , tbe an-uidaptable Curt
(ror vpoare. : phe
cathe Upoare ant, DELETE consmands allow Ue b update clutete 109 0m sth,
tingor it portioned
pastatle ator € open, tm folloning mt 8 eveusted
* Fovag: tf singe an uy 7
DPOATE fatlan § SET S-vating caseit atest teh val cg O95 by pebioring
Mone wun ~ Lose CAvio4 at pautieulas Kong tending Me Conten
vee
Viei2s > vivtual table yrampnok caste pojteaiy,
Sommand to gute viaois CREATE VAEW '
G CREATE VIEW, DEPTINFO (DeptName ,Nojemp setalsal) AS) Lompkeated Fan be
WB SELECT Drama, CooNT() om (Calan) FROM» @7VbiyHOU
DEPARTMENT, EMAOYEE swhers Dno= Drums | * Uepslalen on vieioe defined!
800° BY Dname ; L Pomsingte table aie fematle,
+ To dippye im vieio, DROP VIEW ;-DROP VIEW Dept; 1 Tf cortarn cond. met
Le update on muthple table
Rutes foridealins Note values th $au
{using Joint =) not updatable
+ MUU Value Tepasienk —Val_tuntnoid,
FEivet net pts
1 oUpteting view fe
. ‘val net available
NULL Compared Keely yield> UNKNOWN
* Ags Fimti ., Tgncle NOLS s except’ cooNT te)
*hiitmedie Opecatn ~ Result in VU ony operand it Now,
* thing, opon= concatenain soi not =u.
* Goupin,~ Treat NUULC as dictne,sReHpt Wd nove gy,
ekki Cau ~ We UNDUE AL IENOT NOLL fo NBL Competent
© scanned with OKEN ScannerEXISTS Runthon . check sshetnn gesth of 0 127tlated ate guaag ic emply
Ste dace path orkoe y Baise Med
Li ened itey MIST Sets ota one me
Fats FE MERKEL quong venunitho tuple
Leplemcrtmgnine)
hoorkes (Ia) Name Lease
Sa E+ tmpia, E-Name, from ke ‘ 2
Gmmp € ; get teaplelstonpNamne of temp tehes ade
mp © ashine enise( sel a eer
Oho. ta fm Worken a Ser attest :
ohusue wetendon = €" Emptils
1 UNIQDE, Feunetion= +t hein a qin hat cluplitate, hepla
neue ce boblean :
Create table Department (
Gnptd tb Pratmany Key,
fenat! vara (865) BAUQUE 5))
Se dnd, Avg (salary): frow
GROUP BY Fienchon- a Employer GRovP BY Doo
23s snnt fo abla agarepett fo
LN Embedaled S@L 908 commants ons embedded. to
As Sau€ het —— puspore prog tang (Host tang
a fear dele So. siatemenly can be wed whosier a shat tn hast lang i allt
Pty we axe marked Clearly 5 that iH (anhandie
iim Mmm eps moh a
al bef past
fants tom $66 AS SOU St orentd hth, maynet AlUgo 1 procedaun nate,
tommands . 4 Fome host lang. Cund an wed to addtex diserepanyy,
Vasilable Dedasan - Hor Variable which + being Tped fn sae statement munt be.
decloned bin! EXEC SOL BEGIN DECLARE SECTION! 4 the rmuldd
“exEC Sot END decane seerion' J kamants
un standing 0 G1 Voueblatbs8L, SRLLODE ~Kebuiny ve va hin ean ove
SRLSTTE Eels Proved
i Preefiad vad sok
Coubiaaing 6 tatinuati~ "bre € cou orton eu tan
‘Di Uhdiking - SQUSTATE. , JOHENEVER
feampl’t Exec Sal TNseeyt INTO! Satins VALDEs
© scanned with OKEN Scanner) “IDB Datvers -
Odsdver Manap leis + rerponutbee
{pr managing “spBe., Dicfdow.
Provide Muethoos fl apie? many:
Ls tonnto te obviimen £ DB.
© BLOG tlaxd — Bnary Lope abject ia DB -
Lusets handle, Image, audio, vid
©. Chow clad — chaneter lange objeet DB
lute to handle textdata large — PDR,
@ type clas — aa conth list, reprevenk:
if $8,
she can te propane
Stn} mot b Aca ,
Poramele; vel of Specific IL)
8s 2
© scanned with OKEN Scanner