Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

MAEERS MIT Polytechnic, Pune-38

@ Atiempt any FoUR


between DEMS and
a Give any our ditferences
RDEHS

QBHS RDBH5

DBHS is a qenexalized ROBMS is a


type o
SoFtware For manaqing OBHS hat depenod upon
and manipuletingthe h e mathe matcal ConcepBs
database oF TelaHion.

DsMS Stores aleata 2 ROBNS Stores data in


a5 File atahular Fom i.e, table

Not eusyto meintain Data integrity can be


dataintegn maintained easily

4 01d ersion of Software atest Nersion of Software


to h.andle h e dalabase o r handlina batabas e

D a t aSecurits is lou Level of data Se cunty is


as Compare tu RDENS uery high

Tn OBHS normalination o) RDBHS fullyupport


process i l net be normali2ation
Present
MAEER'S MIT Polytechnic, Pun

DeFine followinq with examples


a Relaion
AA relation s dlePined as "adahle i t h
Column and rows" Accorelinq E . Cocdd.
d a l a Can b e Storec
in £orm oP w dD
tabia dimensioDultable A Telaion is a Set
a uples.

E
Roll-Na 1 Name lContact-N
e. Shudant iofo (Ro IIND, Ahme, contact-No)
b Tuple
A Sinqle rouof q+ble,
bleubich Cont ains q
Single ecord Forthat elahion is calle e
a tuple s

E Roll-nlo NampContai No
1 Aawya234567|
2
shruti 19 238 too4

EXplain follooing Cardinatties uith diogram


One to man
Ao entity inA s associated ith
An
coy number
oP entities in 'g'.
An entity in 8 howe uer, Can
be associatedcuith at must one A entity in
eq
e.g A department has many employe es
2 A eacher deaches man coursesS
MAEERS MIT Polytechnic, Pune-3

One to-many Relai0nsbip.


b Hany g n y
An enity in 'A_is associated with-cpausE
9nesf entityes in B
An entity in 'B oeeuer ea
eis associated cith_any number o enhities
in A
e.q Man4
Hany Students SSues same buak faom
library
a Many Customers purchasin4Tom many
shops

-611

b3
b4
Hany-to HanyRelaHonship.

ist any Four Commads opP

DDL
DDL (data definihon lanquage) 7V
Comrnends 1 CREATE table creatton
n ALIER +9ble modifhcaion ancd upd a hor

9) DROP table daopped or delete


MAEER'S MIT Polytechnic, Pun

4TRUNCATEtoble values or dertg deletee.


sRENAE etelete table or Column engme

bDHL
DHL data manipulatioD anguage)
Commands SELECT =
Pekun dable Valyes
) ThSERT Tnselt Nalues in +ables
3 UPDAIE: updates values in tables
4)DELEE lelete Values

e ite SGL quen Por Celconsider table in G2a)


Display disinct book 4iHes Prom book deBails
table:
Select Distinct (b-tiHe)
from BooK-d etails

F. rite Syntax Por enforcing pnmary key Constreint


ct the time of table_Creation

CREATE TABLE table name


attributes
AD colomnname pkda colemn nome atrbute)
PRI MARY IKEY,
MAEER'S MIT Polytechnic, Pune-3

2 Attem pt any haee


a.
Displau book 4Hh PHN Publi cations.
5elec b-ite, b-id
trom Book- deails

ohee publishex = PHN,

b.Display book dehails for auwthor Korm.


Selech b-iHe, b-id
From Book-deraus
ohee auhor ' Korth';

o r i e Hhe Synta for Hhe follousing ommands


a RENAME
Rename ommand is usedto change he table name.

ALTER TABLE old.table RENAME ne table

SYIF RENAME TYIF


b.UPDATE
Lommand to data in he
Opdale sused modli ky he
table
Ater Tab letable -name SIIF

Ate old-atribuwe roll-no

neuo atribue, enrollmentno


MAEER'S MIT Polytechnic, Pune-3

C Eplain Hhe use of Enhity Tatequty onstrunt


enihy is any daua record in database Each database
represents a table Cund each ro19 ofatable nepresenk an
instaunce of_ouh enbity. TheHe ane noo ypes o Eniy
inlegih constraunts namely UNIQUE Constraint andl PREMARY
KEY Corstnaint.
ONIQUE Consraint
I r is used o preuent dupli cahon o# values oithin he
nouosof aspecified Column or set of Columna in he
table.

PRIMARY KEY Constnaint


The primay ey onsmaint aeids duplication of raus
Ond dees not allo L9 null vaues ohen enforced on a column
or ser oF Coluumns.

d.Railway-info Cr-id, tname, SouHCe cihy, dest.ci, closses,


no- oF_bogies
Displa4 railoa derails for Hhe rauluoay staninq at Pune
Sele ct rid, r - n a m e
From Raluoay-info
whene Soce -ciy = 'Pune
MAEER'S MIT Polytechnic, Pune-38

2Displa nailuoay dehails far the railwaus hainq ethe


0 to So bagies
Select cid rname

Fromrailuoayinto
wheHe nooE. boqies 1O o2 S

C Cnanqe he uost oP book t Sooforbooks haaing pag


morethan O0

You might also like