0% found this document useful (0 votes)
9 views7 pages

DBMS Notes

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)
9 views7 pages

DBMS Notes

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/ 7

El

Lider Líde
El
OE
FECHA n FECHA

" Dalabae oesign


9paasing &Tanslation
Logicatdeign
-phytced doign
* Des igoiog schemo ) OPHmisatio
-pysicclayot dalabJe ) EvauCn
esign ApoRAache:

Entity Relashuonshup madel (eR) quey arser


Trsanslatog
Releional -algebna
Theay inc
" Dat abase de
Engine Query ole
-Skotage managen Exe4 plan
Quey Proteasio pata
Teansaction manaer AlBernave wcuy Jn eNel: Sa+isics

Stoeage manage praovidel interyae bettueen the do pilf algs foe eacb.
(evel dote Stored o datoabaue he applicctton
RogoamqusIè 6ubmted ee 3Hem. Need to eStimate the cost
Taukg: - Depenalb on slaisticcl njo
O Tneract with os Pie ma Needs to estiate sBa+s+ics

3 nansancion. ianageert:
ISS4e:
collecn speat that pen oeSingle logcal
cBosage Punen in databale epalica
Ble Indeaing
ElLider
FECHA
Native
wer
uehere select braanch
cracate
teuble
Takeyace
+ ename
9peraton CSecte
table
Consiaants
not fo IB IB name pecgnaapp
braanchnome
Pinauykey (
l custornero-name (boanch.nam)
esists uwiboßowe.
vaRche
ony be beancb applica
no SOL 3- PEO
fostosed
E (oannO (sD)
chare
quey D0
þororoWeL
o = Is) ( NULS sophwer
mem. (oon. Quey
ope=
(oan
GeAe [oan on
uy) -no
cu 7oslsAdm-
load
Adminis2a
Hene ,
-jam

Fiodname
cutomes ODistinct: TuPle
o
Suppoos
Concate Select
|) cstomer-na2 Voxiabies:
Tupples
whe Stroing uchene1(oann0 FeomSelect
cwstomeoom
-
fore Select
customen-Skeet kom NaU
subsiingOpeiattons: boRRO
distinct
bEanch
axiety WeR
aue
defined
ay
asIbeonch T. To
=
Steingop: (ike Leohose loan
S.
) -- (oan-no jn
The- -nome as the
7o
stree S fom
Main cha_matche

%? ncue FECHA
elauseia

subs on
chaz
ma

R00 El Líder
Lider
E1 ELi
FEOeA FECHA

NOte- func 3 ooreduge dy )


unc+? auways teuneroredwre need not be
sele ct *
fraom custorer 0 select ayg( balange) select counA (*)
where beooweRloaoN= laan.(0o0 -N and foom feom cuutomez
þranch name = pe uohere
oedec by cwtomer-noe O desc
*Laau Ascending select countdistinct namo)
oaup by
select bN , count(oUHnct name
Jet operatians (pocmoroms en tuPPles) Feom dipcsitoes aec
Daion. Intesect except (NO) ceehere depo. gccno ace.accNo
gDoup by béanh name
Slect Cust-ame

foom deposito) Aleng oth gooup by ue uye having t


Infesect
(select cusn feom_ boreouez) select baNch -nameyavg Cbalane)
froom acCOunt
qooup by boanch-name
ecept
hoving avg (balance) 1200

Agnegake funen:
Avg - Averaje mip - mumum Naue
Max mamm Q_Sum- sum vaeg
6 Count numbe ves
Lider
El 3-SQL
E
EIL
FECHA
9 Avg 202a FECHA

Null vatue): #0 cust p0thlaon p


wll 00 be used in any numerfe nsale.
sSelectbamo
N AndT= UN
Ceoherb. loonN= ((oan number

Cbranch, name ) io (select banch, no me

AIl baanch having_grsecte asset than some beanch


Nesked 6ubqueraieA & located. ín B (seit cornpasubOn Hence vietuat
Table
Customees having both an ace loan at banNk select T. broanch-name
Select du name eom branch aL boaoch asS
froom bopaouwen ohereT. assets >5.aksels and
eohere cwstomer name in) (select hame ksndepesitoro)
conkain
came usiog > Some
slauie
oi.
select boanch -name
* All Can be dene by sel theoey a froom b£onch
uehez ausets > some
(sele ct ausect
fom bRAn ch
uchere beanch-city g)
E Some a least ene_mote than one
EEEILíde
FECHA
FECHA

name c beanchen Test o Absence puplica (unique)


hauing neatezcset
CLst at leaut

uehere
selectT. hame
faom depesitoo T
uohe Dot uique
xistceluns Ue ynoh empty
not eists
select R. hgme
cwt have an ac ot aw bEa io 8 tom acc, der uK
uoherT0ame = R. 0gme and
seect S.ngme ace. accNO Qd
Poom depo. a S acc.boanch P)
uoher ndexis
(selecl nama Voiab|e outer level ) (orarelo VOsdabe.
foom boanch
cohese city = s8
except Derived Telattang
Sele ct R. brancb
Teom depo. a T acc ouR _iod. avgacc bala> 1200

S.name R.name
celectngmea
foom select_name, aug (baqLance )
foom acc
yDoup by.name
ay baanch-aug Cn ame, Qvg)
wheneavg 00
Líder
El 0B
EILíde
ECHA
FECHA

with clcwsei Views: Croeate Temp fable.


preovide mechansm to nide cezdoLn daso foom
Nieo celaun we
All acc with man bal an (e
yaiable
Loitth mat bal ance Cvue )u
select man (balonre)
foom Aview
select acc-no
foom acc ) maxbalance Chete view
woh ee ac, bclance = ma -balaoce.velue (selec Dame cust
from
uohez qcc no=
Q Al boanch wohee 7oled deposie > Qug
cul total select baanch cw+

Lojth broanch- Told (bamevoue) ou


select name Sum(balance)
foom accound Vieo delined by anothe2 eLo.
Jooup by name
with bran ch-totad wave CvaLLue) au
seleck avvaue) ModiicoAt - Delete:
foom boanch total Tnset fcLble ts table.
selet oame
toom brognchtotal i braanch totalaug Ql cut feom peieidge btonch:
eahez branchtota vaues baanth-total selectcwt
aug vo fom cul-custmer
cher brranchb-0ame =e
Lider
El Lide
EI
FeCHA FECHA

DeleBc al ace
Needhoun
at eley btanch doceased in ciy. JDINED RELATION
IKey Le K SR
clelete foo acc
ccherre boanch-name io( setect braanch-0m.
fom becanch to identiH Qunique tuple och possible e
Lohene city <. Need hom
Deeie the tecond ol uceoun usth boal oncebloo ki ancidate ken a k s minimal
the avg ath Ganic.

selet delete foom CLcc


fooelka key
cechene balunce < ( select avg Cbal ance)
Isom accecOnk.
oatsicn-produc
ylez moaiyice ud ogogae funcn ge afeced.
Natwrs TDIN
poovide au gift or a Aoan cul
R (ae.Ca)
eith upaate sel $ comel dec motfeRJ alOL) S=Cer8D)
Coye stat emend Res sthema [aLG.c, D.)
If you jnsed in veieuo wilM nof get ingezked into

You might also like