0% found this document useful (0 votes)
12 views13 pages

Adobe Scan 20 Sept 2022

Uploaded by

Vanna Nilavan
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)
12 views13 pages

Adobe Scan 20 Sept 2022

Uploaded by

Vanna Nilavan
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/ 13

Islspal DaBa Baae (ontepts:

Data Bal: Tt 8 an OYgamid Lollucin odata l


OYm o table oy o s udich Can be Laid Jov
aun hmaun fanant trival ofamy infoxmakin_ana
ubdai n of coYAS
Aduantagts of databasa:0lo managl lanql dunkh of
data
()Data aAl aintains Acuharu odata
Liü) Easl ofapdating data
uData dAiy(Aata aalh Cance mad bA CUAL by
bYoVvidin pecif UOh ID and paks hovd)
ODopa intghiy.
Dada Daxa Ba Can beud, to mainhain_acuha y and
COnbislany dus to bult in intighiy dhlcks andactgas
(Onlyols
Data Basl managlmot SystOm (DBHs)
I alers To seftwahl a t is usponbibl for
StorngALkrivinq Updahng, delelung amd manibulating
Ex:
hsAcceAsFoxpyo Cracl

Hbes of data ase: Hiexardhial: distunbed


f a hod 2y a sub-nodl is dol. Hatn Onbire daka basu Ls
Hent0 no bopula
DAV

brimahy Sec
Netwanh ype IatLCOnhectio_uherQach
nod s, Ihis COnhddlid
Texb UMA m RDBMS
fads ahandub
iData:I 8 a Aaw
DAV fo its sabnodi Ex- Wednsday dolA
uluch gints mianuhg
HentL, it apheahs Ompla andd D Daformahon: Ainy bretsud dada
tdioius to A0trn data ol data
primahy S Heni hot bopulah. E- TomovYo s WedhPsdau
ii) P4 tods: T inÚsaehid logical tollecin
n
odatas horiz0tally Alhresenaikg Yous m atabl
i 8 also Callud a uplLs n RDBMS
iRalaidnal daknol manag!n syslm iv EieldI res nisploUmn hlading o afabll of aa
Specicdatatype a mlanihg ItGs also callid as
OM ábYbuti
Fied AHYibust
BLD BNaml PUBLICATloNS DOP LANG PRICE
9ool PHhonDhanpatya Bla laou Eng SOo
boo AB s3A03 E boo
Kuo Boo3 Ovacl AYuan O6/u aonEne d5O
bO04 L Dhanbai Yay a/qao19 End 300
BOOS Aava XYz 23/s/Aoo Erg 700
O06 Jauab(it ABC sAAOISEng 450
BO07 dhimistyy MCERL Lo1o/2olo End 1O0

uDomaint , a t of lhaal of Valuuso Hhe


DHuaspe, il,4,a_tolucion ofselatud dablu gndnatribull with a sheaific ramq_oValuLs un
whhl lach tabL has bYimahy y ield W Alaki on/tablL/Eil Ex Avgatrvblu Can hanl valu! frm
Hh oudaludh Hly asl l a Gl,as vTalllAalah onli IEJa tabula) auh YESenkakian
Haus DBhS J8 OYgaNiztd it lasy to Yous_ and (oloumns As ShD uwn abah.
Mauntain Qnd Dpdat Sutord& 44CAmm VinCahdihaluty Bbres.enls h0 oYoug lords /
UALd RDBHS ahl AS ACCLAS, Chacl, fox/ao uplsn tabll P: Book tabll has7.
XIL Sport3
efields/ atlibutu gaml þoint
Mo) DegkLs Aabresents ho Apll Namd HouA
daicht
LEx Hhi gintn fablu -3 A B
3
tx: Boohable has6 d3 fodtball
P

Aalaianal Algtbra: he Vaaiot tba XLXSpors


pevloymid oa qinen A lakion
lahonal algtby Roll Nam HouA poiwt
ThlVahious chexah ons aal selechdayn, proJlchdn A
gaml
Cich
Caytisian, bYoduct Unuon, ihh SecH@h,
Crichet
Dgyujoitjain[SaL) CYiche
Alpresenled by ar Foatball
iSelucion: T Eootbal
UsAd to Aglut and diu blays aplus_cy velavdg.
ulAAch Satisty Hhl gihei OndiAn Fotbal
Abrstr brilloo
C3X6
irol0cion: ItJu upresenlid y T Eaire dbtles
AllaHd
Joy HagihLn
tonDuls latlribulles
eld aion a binahy cheraho It s 0hresentid by
ErTprtt BID, aLniL, bham
lan be (aanltd dut only uln Atabl has
Saml onduh and ypbe o dtlvpullsE ALmaul
Ii).CartLsianþroducd: T _abinasy operaidn duplitalls
Subresenlu bg a CYOss (x) alsa Callld
Ih Ha ahlw SAlai o T TA
nhAst Ycud oih Boll Nam Avg Roll Namt Avg
Luih Cahdirthluky as a þroduct al a tablu A K
Casdinaliy and 0 q0
PdigkL4s as ha blun oAndividual digius
olablas Shauun belotu
TUT
Aoll
Naml Avg
Hd has Sa is2d zimas AsLalLud a altzsKati A
a b b D h ais l be shtoun STUDENT
Aall Ava
15AS
RIG

1R34S 16

at Last on (o ati batl Eegn Ahet-A atibott,wose unlaul 4s


din v Halpximhty kly o 4nafsth, fabl
Hencl alld aign andHma hainl
s30BS da5A
eatmung AlnhLns and sSiLqL
alguhA Índ quL4 dapliai ualuts
STUDENT
FevegnAttvnte

Sports
pviaky
Taedidl AolL ha Naan ID SpaYt Lp heinks
Cickat C Is
Foetaal IS
Foxein A
a Ini4u kly held ulid B3s
Anhy dinduskLtO
Bnd dus haa dublicatu valuLs
allandidall kyTs i Shuas To imaia

hHL hat dostn t brinas4 Ry


kDMLLOmmands a Seled inalnt, updalL, diltu
*SaL (ommands: Tt Calludsfyu.ckustd qulky
an9uagl Tt a uiiy adSoltwasl in SQL
bYahdeX by au RDBMS 8 a Y e e open-Soleh Data pes Deschipho
Solttwan Can pe dounlcadid -MySaL sevA Chaanath) Onghh byles O-Sdhahallhs lon4
SBL Va.dhah LLngtn)SAYing Lrahi Chahals ldmg
b
DDL DHL

k 8WALd a data.basl_lakian dlLhon,-


eldh ing Yous andmodilyng ouns Ltc. Cha lLogth)-I holds a Srl a-Asr dhahadi).
SQL Shns_(an be dasiied into Nahdhahunpiablu snud thanddua duh lhclds
Data dLiahon lOngusl [DDL) maximli 6S853S ChahacUks-
Data manu pulati.On ialglDL
I Data Onkal lamgug D ) D bl dhah and ahtha
TYonbach.on onbellangug TL)
nah VAhthah
k DDL: ThAs lamguae J8mainy ud to dofin Tt shaab Valus ) hhthah slaals Valuts Jn
Stuchul HL Labll_LReldSHen xedOngths And Nahuabl wgth wikh ebat
attn 1s uidily UA4d to tlinl eld aAl addid wih spatl to -b ohgthbYex d
daka yhe with tonStxaints Chahadles fo ratdi Ha a3 baddtd'wih auy
SpeuiedDng thahatiA
DM2 DHL: Thus longuaal JA u&ld tn_manibulatu
orpls_o HHHIO Heh fhs lAmmands n LOm holdmax o i (0n_hold ynay 6s,53
opeYalls On youS OY HABUS_D Hal fablu. sS Dhahaclias dhahadus
DDL (omnands akL (Lal tablL, daap tabe, Tt uLS stahc nonary li) USS duhama hUmary
Allt tabl allo tohOn allocahon
sops th oal Sa
Druk ditk hss shevkuat
digiis
FLoat T holds dimal hs ALauh othN PE
Lulnat ha. and dLinalna. I s nshdt.adu Set ht dataamkt by CAlaing
0Decimal dor Decina aiy0
Aatt takabuklkaNi
USE hndan hhand
namd

Cambat be.Lnsight
vODoubl giLS dsblleakenLelals Cat daa lauat DAV;
upto s3 Limalpatts USE DAV

un) Dat 444-mm-dd SHDW DATA BASES


Net DAU Luill le visiblts
Ta Shst uith Hht lasl DDL amd DML (0n mands
k SAL Ompand ng SSL CmedShmt s , DDL
oberatdrsdndclaust Cvante talke Tha Command s lALd toAlalia
falke yit 4 dntd ield (atli buls wih
chexatgs Thay,Anl,Sinalas shen ppraprialt ualidakidns 6iry (anbfyaints
dpe atos Haendbi S lakiidllogi.ca
L iyprds uad to make and Lnsue intaghaly
Qad albs viad Validaling valuus ov a
botialin Set CUAtan4pld
Thu a bYimaly Ruylaiqul het null, dhttk,
dujalt, (avelgn Ady
aiquTi Simulan to primasy ky bud ACREATE TABLE Studnt4
bealloid oym@Al Hhan 1 l d Hen CRall iw Primahy Koy
ddsnot alow duplicalis Jam Vas dan Bo) AoLault
Aulhageloat hack (huBhagl >2) #ol (Onsai
i Delaudt 2 Delault allo.cals dalault Ualiuus HollAl udA chaalAo) Nor MiLL)j
toSpecccolatmn hovalu s'LatBLd by tho
UA'h Chuklroll> 2000nd auLhagl23S
# tabll COn8tYajwt
LiNotnull: Ralers fo presentl of Soml Valut. sAlhxlak ais oninand s Ad to edilg, add
i ull RLpresents ha valul rolting OY_ dhop Oy Col O1Aield fNOm Rae tablé
dhtck: Limita He yalut_hat an be,inasthicoln aSntax
a Loleumn, uhln u donl Joy.a spheuhc ATER TABLE tablL haml>
itJ Calia steae Lol Orisimil Whin ADD ChwHeld datatype onsttaint )
lo h OL oY nanl Han L(al Cald
as tabli (onEtaun

*Squtax ALTER TABLE STUDEN


EREATE TABLE (EablLhamt ADD(RK int duault-)
(Lield nami_dakafype (onsfraind
Dxop CRomctol eld
Sntax:
AtrER TABLE Ktabunam
Eg: Leatt a table 'sHudant'uih oll atlbulis DROPHeldnaml
n d tdmbtrainlkBall hb. Uh þinas ko
hanm uiHdPlaultaueYag/ wHa dheck ALTER TABLE STUDENT
LonsEYaint ahL Haan3Ho witho ut DROP RK
hull
Mcdif
lodily oy doang/ an atbribal DUpdat
Stutak To updati all Stto1ds
ALTER TABLE Cable Sqmtox:
HoDIEy Leld dalabpe Conshtaunt UPDATEmaiadl SEL EIELD
NAMEV¾LUE LoR EXP
ALTER TABLE STUDENT PECIFIC RECORD
HoDIEY AVERAGE (PECI MAL C6,a) NaTMUL i UeDALE mytabll SET FIELD
DROP IABLE T lommayd i Lsd to s0umonl NAME-VALUELOR EXP
Hhl talL yom datalaA WHERE (OND. EXP
Squtari
DAOP TABLE tabL hdml
Deluto
DAOP TABLE STUDENI To dolú all H MYds
Delut YOm TABLENAME
DML: Inalhl TDELEIE FRoM TABLE NAE
spata his conmmand 1s Uh to add a htu
ocoydLha abe. AISeuce 1us oyd uid to duplay, Ht disixed fall xp
a) Inálkng Jlo heldhdin I hab ditpes olnpltm hakons
INSERTMno SrubENT as Shown
a Io Selud al hL Cords
NSERI INIO sTuREM(AVERAE RoL) Syutax:
SELECT
JALUES 28, 123o
from tabl
SELEa
E
NoTE:Sinas,A dalu shodd be A/presentd Lih singlt ERou STtUDENT
ubts
sE Todiublay al ALtoxds jor sheclic held
Squdax tx SELECT NALE FROM STUDENTWHERE NALLEIE
SElud field 1ielda SELECL Roll, hml ni)Lopitall hamls_uih lLHer words SBaiihg ilal
YDm tabll, Yn sHudlnt SELECT E FROM SIUDEMT WHERE NAHE LIKET-
JoTobYint dll hamlb_with A in it
t To selid sheciat SL tords
aLwhi (rdngt
Selzed hamlpluysits To Almonl duplitats rLm Hat tabl
SELECTDISTIN HousE FRoM STUDENI
Ljlhtnl blaysics beluLin 15and a0,
9Lgreu byis Cnd, s 4dto berlonag9n1galu
bSelLothdml
yOm Sude
plusits uncHOMSOYh0hpedlela
Bagilgak functions Bult -in Lanchiops LikL SU
lanpluysics>=15 ard plybiCs C a0- Maxavg9otunt-along uiHn ghoub by
OSeltol namhouut SELECT MAK CICTelD, HOuSE FRou STUDENI GApuP By House
YOm shudind ORDER BY TOTAL DESC
wlhl hatus ih /)
iatb by Laifh hauing Hauing clausi s_Udalang
alang
uhtnt hotuul hot in )
Loiahcub by to hevlonm Vagghlgal Lum chians d
wluch (anhoN be anhindou bhakL clauUnl
Syatax: ieldsl) Tadtt
)opining patenn a 1AL like dlauk StLECT OxA EROM, STbEA WHERE eBHE COndihons
USED TO RE PLACE ANY MD OF CHARACTER aROUP BY eld HAVIN a4g0, CAD.ER BY ields
Lund ihscoA-Adfo Atblacg_Oly Cl dnahadtis
NCTÉ:Cndtn ta be maintaind or a tonplote selact
EX:TO PRINT AL NAMES ENDING wTH A
SELEC JAHLE ERO STUDENT LIHERE MAME KE Cotont (-AAkanb lat, no. o ALCOYdYeSen
a tabll hdludung h
To pyint all nams whH uHer huorols
v)CountO -Thus 3pkwns ho. o itoYAD uilt
t SELEGL SUMlfoes), dlyeint, S. Hocae
ValuLs ex cluding hul FROM fees Studunt s
ohth Yoll s. vol,
Cotunt CdLsig naki on)
aCeals laHo keag le. wilh Jol adribules-Rall.na,
Siyilasly, Lotunk tait disfike wl ulhin o SOLam And es
O ALtoYds withoul duplicalls
CYeadssARCords ubsinq pHLAdd csc ab dalaull
a 1 SELECT COUNT HouA SJam
YOm Studont
Outpt-L6 in3tt inko es Ualuts (HAoq, biolog4, 75456)
1) SELECT QUNT () Liaot iwo ees valuur(1aaAo, (SC
FYO StudInt, lAGd Ito ees ualuLB( 1A1, EGa 75450)
Outpwt-47 7444 56)
lü SELEC CoUN(Dishnd.HotuAL writo a Cormand o ds play haml ad noll nos.
frOan Sudon lP-4 DIeSel Ih bolh Hhs lables
Equjoin, and hakuhal join Uad to atla
lak ons Oy tabls wtbha (ommon Sclack hamt , Sludand voll dm Sludut, fes what
ay ield n adh field sludant yoll-fes. roll
a tauloinIn aujoin, all nasnt Jg Uhld a kenal Join in n lich oly 1 of hL Idonkital
Tollomed by dot erdtoy pyettdad by ield ham CoLiwnn kis(alld halund joln.
a ShoN below
SELECT SUnlfees),olu.ckint Heuu
kaguard rausal join 13 ud ta implamouk il au
3houn pelot
Y.OMees sfudnt
htnt lees allsfudad vall, >selec xon sludont nohnal jain ers
(OY)
kS hull his daual is USLd ta dhi ch Poxlions-Suai4
ALer20Ao -A
fox a data which s hull yz 12)_Ámb RAkieww
kuACJor adl Hae totals al shyden fable le handing
daidh has hull mod4 it wikh foBal Stack
d3co
SSQL

2 b i 9 n anallla hat_nami lor oaLiela Pa-6lb


follo Hl, qiun ps ELECT LoUNT (Doid) rom Emploseus pp
alta he spetield Lane spacl add Nu dapicly
6 Selck hansl, Lid, salary Lsa0a.bognlls iSELECT NAMEY Emplogeo whrl nami likH4.
YO _emplogu updat Salahy ST 1otal sa
2using As
Sdl ham lid Salahy+So0o as
bonus fyôn Lmplogee
1

3 Uhihg
Selcctl namlpid, Salahy Sodo.ay
Bonus AmocntOn hplcyle j-
lurite ca 4uAy to alal analtuhai
ham and ConLsigpoY ield o lo
Uneese hose sladonty Who ha
Sceu abont L450,
SeltthamD shdatk rol tolaleesko-9as
LOnLrSiD rn Stadintfes LihihL skaduct
-lees yoll ard fotrl>z 4S0
O a n d min of dali fields selLd H 1aLST f0
mox

Test
1S)
Londs

Hdmn0
Ad mno, Nam
-616
14Crpal
aob l
a fablehotPERSO NAL Sudh Hha empho
nulland þrimasykly
and S.A ECYeatz-DDL
nAl DDL
s tPATRBASE iInalt-DML
KEprE TABLE PERSONAE iy updath-DHL
CREATE DATA BASE ABC diu-DAL
USE DATABASE ABC elLCtDHL-
CREATE TABLE PERSONAL LEmphohtþrinas BLy
SNOWtNot, hslhaml Uahdhg 3d) Nat hull SELECT * FROM EACOLTY LWHERE DOI> 199o
pa dradkhobb vanddasdo)ai dhLok doby SELEC E ID, ANAME FRoM FACULTY WHERE FSAL O000)
1460-ot-R SELECT FNAME FKoH FACOLTY WHERE POT las0-10-12
SELEa PNAM FROM FACULTY WHERE FNAMELIKEA:
SELEC Empho.haml yOm PERSONAL JOL SELECT FROU PACULTY WHERE FSAL Asooo AND
LJae PERSONAL Ehnpho JOB S.Na A aQnd ENAME LIKE h
hobbysports B)SELECT (CUNTCENAM E) EROM EACUL1Y UHEAE ENAME
LIKE AND FSAL SL0000
SELECT aSELEC PAO ACULTYDRDER By ENAME
SELECTk PROM FACULTY WHERE MAX FSAL)
hINCSA
SELECT ENAME FSAL+12AS AUMUAL SALARY
PRo FACULY

You might also like