0% found this document useful (0 votes)
5 views

DBMS assignment

The document discusses various SQL commands and concepts related to relational databases, including the SELECT, COUNT, and aggregate functions. It also covers Codd's rules for database integrity and provides examples of creating, inserting, updating, and deleting records in a STUDENT table. Additionally, it highlights the importance of understanding data independence and the treatment of NULL values in databases.
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)
5 views

DBMS assignment

The document discusses various SQL commands and concepts related to relational databases, including the SELECT, COUNT, and aggregate functions. It also covers Codd's rules for database integrity and provides examples of creating, inserting, updating, and deleting records in a STUDENT table. Additionally, it highlights the importance of understanding data independence and the treatment of NULL values in databases.
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

HssiGNMENT- 02

Sec - A

1 s t sarme citeg ity cevstoal nts


olota type

NoT NVLL

feregn ky valucs matel


- rsures kuy vale in ana ther ebl
pimry

- No tuD tpls
p9inny key attoi buute
}os the

relatanal algeba?
2ushat ü atlectien creat'en in

n eltien at satisfy a
reticne tiaws trem a
to
seleet oal 'steslents
edde tanl&.

Cemnad u sQLa
3.short nates en SeLE CT
sed to trie e eala femn ene o
cemand is
gles he StLECT
tabls u) a database . tt
allws wses p syeity
vieuo 2 Can clude cendities
uchich celns to BY moe
oith oRDE K
WHER E, corting
seLECT ncune, age
CROm studrts.
cn SQL
4- Shortatus on CoUNTA) Cemnend
ChsThe coUNT C) unctins rcetuns the total eber
ef
Ows n a tale incducig tuese ith NUl values
En- SeLET CoUNT( *)'FRoM studens)
Sectien-B

relatienal cababases. U'ke sL» eeic spe


suo to retienedata relatianal calels ocses

desoribe. the aleslrad infematin witheut odc hai


te netrieval methad

CaleulwslTRe)
(i) Tuple Relatiaal

E) Tuple Relatenl Calels (TRC


tue vaiables to deseribe tu sat of
ll tuyale tox uehich a conli tien is tr ue

whee t tuple
En- t|EEsTUENTNsk so .
Ctucent tebleSral naS-mak
Jehn
3 Priya
Sneha

hiy
(ii2 DRC CDemain Relatieal Calculcse
domain vaniables that take vals foem fielos
.Uses
Cattibutes).
7<s2...2n>l cani tie ( ,
" Synta -

smuh)n smaks so)


Snae
Prya Thwe enists)

Q List emplain the


eyem calculahians an uutipla
ons A9ggat tuncticns yaue

Retuy e o. rcews, cieldig


AULLe loased en wage
En -
oncludig
SELE cT couNT C* ) FRoM emplayees

2 Som)- Caloulates tte totalsn fa nnMerie


Lolun.
En- eLECT SUm (salarg)fRoM enpye
Valne
Nrie calum.
Ex SeLeeT Avo (saly FReM eonplayees;
R e t s tte
Calu.
Pa- SeLt cr max (sdlary) fRom enployees;
N) MINO
en- seLFtt mN (iaavy ) FROM tmplyes
Aaamgate gunctiens ae oten wsed witt 4ROUP e
to pesgom pexatiens en grduped data

4ROVP BY dspantment;inlga
See-c

- Explain Cedd's la rue in relatianal olata base


A Suientst Cadd ha eded ctoi'n ls rROBM
au Codd's 1aRuley
(sufesnNaien Rule
AU theinkematientned inte databasst be

(ejguarentaid
access

|(i) dreatment NULL Vatue


be. treated a
NULL
Databay &the eallection meta data, mut be atored
RacLeM n RDBMS on a
that ayene can
Can acc
acess,

|vo\Comprehunstw Kub-language
Jt is the advant age to wndutand deti, defiitior

wndvtndlable mane.

vbVieuo update Rute


hseuhatly viaoch mut

(it) tglh Lenel tnuRt Delete Update


taitiat tait'tat the hoh lenel insert delet
dt
A updte oheutien thet can

Fit)PDI CPhyeial Dake dndeyendne )


Msdifatisn dene on hysial vale of daka
deeun't aftect He aprli cntien preqram a
net dighex luel ef abstrattien

JMeciication dens en
|(xSatgnity Jdepundune
4datibae muut be undeendent o tt pltcatioa
antant that can oe ucepndal

(Diutibution dnderendent
Lhe ends mt met able to see Hhat te
data a clist buted aucn aleus loatiens d
nfeutientat
data is locat ed only Dn siole.
iNon- vesten u l e b
i the sytem hw an steyae ttat ienide
i must et able to ubvet the yatem 4
bypas Hhe wnity itegity constiaunts.
dCeate a STUDENT Lable usith athribute Soll,
Sname, Saddr, Smaxk 2tem NSERT y
DELeTE, UPOATE oreation .
cnsCreat'ng th STUDEN Table -

CREATE Table stAtEEtL STUDEN Stuclnt (


StUell INT PRIMARy KEV,
Srame v4RCHAR (So)y taksav
Sadde vARCHAR(IO0)
Smak INT
Znseet Opeaatiens
LwetLnto stdentt (Sral,Sname, Sadada, Smask )
Values (l, "goAn, BASK' 85 );
Dnient Dntb stlent Sruat, Bname, Saddes Smash)
Values ( a, °Challe,cTe', ta
t4
Dnset tb Stualent(Srell, Snem, Casld, Smart)
Nales (3, tnit? 'Pwu' 6s;
lplat Oprton
tprs vp DTEStelent
SET Smak =9 0 -:Tha wrl update
Charlie 4 meks

Delete Op eratie
DELET E trsm Studet
WHEK E Sral= 3)
Lrthis uiu delete Hu ree od estolet itk Srsll 53

Sraul Snae Saddr Smah


Jehn BBSK

Chael'e 0

You might also like