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

NoSQL Assignment 1

NoSQL

Uploaded by

Amaan faroqui
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
332 views

NoSQL Assignment 1

NoSQL

Uploaded by

Amaan faroqui
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Assigomnt1

alal is sbsgl? bily dlsobe the waluL ot Rdhiaibeadl


tabaseD
Ans:
No Spl is a db that enables the Storage and.
ot daBa outside aditioal shucturs hot is tound
in yebhcnal dathbase.
AlbsçL db prowidas mechaojam for GtarageS reteziva!
of dafa thed is modtlltd in mear6 oibey than the
tabulgr kela Hon usd in rela tio nal 0&
Nospl db are purpose bit fo speciio data modeJ
and. have fleibleSchemas for building madern
aplicatonS.
Valut, of hationa database

4. EaHing at persistent data


2.
Conufanuy
3. Intkguiy intgrakion
4 standatd medel (r\o
Ctting at persistént data
probably the msst cbeious yalu ot o database /s.
kupinglage
Moxt Computty dchitcturS have the notion ot tueo ares
a fostVolgtile main Mumors and a
Latqey but slouex backing store !
ager
MaínmmoI S both imitd in space and loseS
alldeto uhn bad
poars or Somelhing
hapens to the oerakn ystm
4A 2

corehe
Relational
dotabase +Yansac
Rhational preqiammas
egnAsa provide applicatcachothus thir
i Same con usingInteqration other
ent1p1se
A eDntuoll applitahos Conumenty
all Con Aata.
Enterpiat i
Cnrently
hondles
contoo) Thohpe
oalf]
and
commnon the
CMastly) ayey
sorts
standard
ers aostly
leay deta Hons ing SAtmns
the oay Same Se.
Sing detabuses of
sio standavd all to agplicakions
iS
asdafa, le in aay alsa errorsbodsy
it acusS had al
Single
db to
ntatiously
berf-fits kandles ao
ak tasilyaloOs do that
ot
le
tothindorknq
bove Modal help tmd
multipie
datobaSe. ahHE this their data
ddb muliple n
coh
Sucss mulipleahile all eor tonCurently
handle to have ditfcult to
3 datc. toap ct
del the Shorec happen haue
ale onc
thadotabase tot even
ssiona app
LserS applicatt hanalirng
thaouçh bave to aany
of
ly
B becauie the
icatons applitations
intgsattg
store db malitgjing
qehposihly
in h
thne uses people
ons most
a tronsautioks b 's ijght
singl in ce
to and Carefal looking
can tBe lod
oith

Explaihp2)
Calhdhethe
Thmpedonc dtraenus
net opeiateVendors the The
paajeca
Many
gment
details Customer
Ann : coIe
nca biqqert cc
laAmex
card i
OL3qS054 632| b3
numbi 2
dicagram?
Mostly in
mismatch 0tl200l 243533
6O l mechaniims
SoLdiaecs
bitly
rnatch
pdanc
onha I
blus 12345 I2
abost bluy
is Sare
oaythe
he dhe 2 Temaib
al Carc
Credu A tteren+
ibapedance aue
s 4S1| 34
S
ben the
applieaton latanSueti
os
Simt
Trlah'angl
oclel ohat Jorcur
ipes 39 diteini
Same
ordurs
misaatth
'S
duelopeis fooercas S database
Comm.ony
thi
um
th
The Yelaiona! dala model orqanize S dota ito q Expiain the bou datgbase t act as Applitahioo &
Ssthecture of tables and fows b more intrgiaticn daiabase.?
relatian data model relaticos & tuples.
in the kelational modeluple iS Set af ame Aplicah on integration DadabAbe s
-Na lue paits felahian is a St ot uplcS
s nintgnation ab -aith multide ugplicationsiiuually
The ihgdan mismalch s a major Sourtt. ot fushotig dwelopae by Separate tams .stoing thuy data in a
tn appicahan druelapas n the l990.s many Copnmon databa&e.
people hélive thet it Aould lead ho relaional This improveS Communicahion because alL the aplicabons
eata baSe being replacud wth databa &es that are operatig on a consitent set ot persi[tont data
repli tat 4ha in mumaky doaka. &huctuvs to_dist Thute are Vdoonstdns to shared. database /ntegration
a shature het 's dsIqnud. to inkqrae many appli cahoa
That ducade was mozked wHh the qronth of ohjet cnds up bsing move complek -indud ofto otei
orien ted pragtama ing lunauaqe and wit thao dramgti caly more Conpler thap any ingle pplicatioo
Came abicct orientd Jataan
stuntthy ooveshould an application oant to mohe
hile, cbiect -priend languagrs Sutadad in benming to its datd stovagt it nuds fo coordinate aith all
tht major fartuin proqrammgabjed -oilepted the othy applications uSing the dat abost,
elatotuSe faded into "obsurit ditferent opplica Hons have fftrent &huctural ond peyfo
Manc uds. So nn Indx Tecquired by on applieatils
thir ole as on intgz.aion mech ahísmsugpoatro Mct cae probdumaio hit on inserts o an nth
by a mastly stondosd Lonauoge ot daia manipsalatia,
Csg) LApltcation db i
Impedanu mismateh bas ben made eosiey to_ deo ahich isonl directly acuca by asingle appllcabion coda.
lth by the wlde auatlabili ty ot objat ralahiona) base. that Lookd alt by asing le tam
fame uank s Surh haS Hbenae iBAT9 ith an appli cati on dh -only h tcam using db the
thod iaplementwell- knoaln maping pottns Ham asing the appiaion nuds to knaus about th
bat the mapping panblem s Stin an ssup db stuctue ahich maks it Much casit) h mainte in
ghd guolue the &chatn
The appl Cahgn tam Caotols bath the dh & applicahiog
odthu rsponsib1li ks tot dh ntgri ty Dodes Qre verq Smal Cnothirg more than qndm) but
#e applitatan Code
thre isazich stacuye of interconnaibns be twen then,
5) txplan about raph datab.asei specializa ia optariag this Sot of
intoma'on - but on a much largty Scalc thab a reachchle
diagr onm tould Ca ptuve
indit
COroi-itnd Dauon ierd TAiS 1S icaal fo caphuyeing any dact Can sis bing of Comley
Anna elaton.ships such as`oi al tugaks pro duct pretinnus.
Banbora Rrien d
elizabeth cihibilihy uls
iky
tku Thus shundanntol data. modal. ot a qiaph db i6 eiy Sim ple
Retactoring db nodss Conhatol by eds.
auhor Catcgorg beyanc ths esnkal chamcezisha c thune is alot at uoviatiog
Marin utho Dtubase
refctotrg
Jeatheny in dada mocal-Jn paatculaz ohat uchan1óa you
hav to shoie data in yau y nocs und
pramooutio Altihough. relakional db can tmplmmt relahanibips using

|Chaph db 9re. an odd. Hsh in the Aoscplporod. ohich maaas pertoumanca i orn pooi for highls
ConRctda data, mgdas
on cutts ohich Jed ta agq Ye gate -Orentd data aodelS Crcaph dh maks travtNal alqong fha YelabanshiFs veryg
of larqe YeOrdi aith Sigple comuctiors Chaap
|Giaph dh aa mehvatd by a ditgt tuhoti an niH ps ha aie dishibution modas ?
biaily szglain paths
ra Jati opa data,bases 8 thul hove an opposite Mocl o dot distibuhon.
Smal) ecot de it conpley itoDDectons somethirg data bses disti bution madels retezáb the ws| S in ohth.
iko datd i_ishi butcd actos mulh ple hodes or Smyels
Scalabilityauaila bilry pertelmanta
h piinmaxq driyey ot iotsn1t in Osp has beun oeacse dittrseat peopl
ahilih t run db on a lage clustey uie accs Sinc dityen h pank of the detas et
In
dwe irustanes ue cun Suppout horizontal Scadabilig
In databas e. dihibetion thye re ton pdhs t clotey ay pti ng cifhy Ant pot of datd. onto duffeent
dishilation that 's calledshar ding
repliation
2) shaveling Shordinq s pastiuta»lu valbalo le -ou perfaum ant becatus
it can impy oye bothe yead
Raplicoi on takus &ame Jatd Qcopiel t oVe multple dsing replita n paati tulanly saith Caching tan geatly
Lmpave yead pezfon anu bt does litt lc for ppli cajonJ
that hove a lot ot 0itg
Shaxding putt ditttrent data on diffr ent nodus hondinq prouicu a way t hoxi2ontally scale anite
Ruplication shardng n orthagpnal tchniqus. shanding
eulone
jS poes ittle to imp3o ve reslien ahun ubed
At houq the data. ió an dittaent nods a nodetuilu se makas
Ruplicathi.on Hhat sh ad 's_dat d Unavasla ble jut ao Sunly as it doc
) mastrY -Slave Sing le SAVey Solution

sharding is made much eaeier Lotth aggiagaBes s


Shi net step to be takar ligaty
>sharding Some db are inte ndud fom
huginninq fn use sharding
n ohich case its Lse to jun th in on clusey fog
the ueg baginnim ct due lapma ntand. artainly in productan
each shaud reads & eçli cation
covites its oon datc
Mastri -slave feptica bon -
iith mastr-slave distibaticn fepli caft dta acras
multiple. nodas
Shardng puts
doesn!tesnt daayey Sepqiate
its oan chd wites. mdus , cach of shit
ona nde t daignaed
ds th Masty atuph wit th los ot any ot hum
çouzd for
his mauey 1S the Quthoyitatie updates to
ta the date stye

thatdotc
The othY 0odnj dYe Slaves read writa
A)lnbds
replitation proJJ Sanshroni2) th aonesith aaStey. Cte thesy
al) all ata

AL updat) Runos can he don tom


to th chang Prepogdd matey or slove
6)Explain abaut updat tonsistrny 9 read consiskcngaith
Example
upd ote. Consisteny
update tonsbtcnsensurai that data is aritten tons Stt
state
A read rsailience
puy-t-paLn apllcaion ' Sag Cons istenty Al n0dus aqree on the nLW Wal
before acknpw leclqing, dh uti
AMatry lae replicaton helpswoth senctSali bility
but doesnt hulp oi h scalabilIy ot crite
2.
0Aak tonsistrnts Ao clas
on dhe. valu Kut eventualls
Armpnony disagre
overge
Ih pauids resiliend ¡aintt fatlure ofo slove Evenhual consis trncy dDdua may Odisgre trpernily
b t nnt of a mat.
fusentiallythe mcster ts stil a botHeh eck Single
Poit o sfailure,
oagin by eonsi d1ving upaati na atclphan
pey to per Teptahon atfacks dhs
bvCointi
-at fhe canpanyduntallyMaran
yebsite gnd noia
pramnd are Ionking
pam that the
the phchon
on
hy not hauinc a maatrd
the replcas haye caual waglo, tuy Thuy both hova update auuasSaa thuy beth ge inat
Sant. time to updake h number
thuy
updaet%
alhghtly dhstnt calud besause
orite =tQite Rand cosistencs cnsuLRS thut read& tetnn thc most up fo.
date or ConsiStnt VerSion of thu data.

Apioarhts for mainlaibing Cnnistrnty in hu a od ’ads aloauj ketuzn th lutest itftn valak.
Riads may etuun stale data. trmpLozily
Dphimisti
updat &otc
ssirmisha appinarh hoorks bå releahio Lonticts
by
Bx Racl hom neca. a: litusns "Jan
*Tan

opimiShc npinach iS tondi Honal update


nhre client th doer an update tats Valu lad tom node, A: retuans Jan'
Sinl MToh (stale)
"Tobn Cstale)
updce ustt 's nam Rad fsom poclA refurh,Tan.
Shonn consist a
Tohn" Csfala tomporabi)
Tan seuca s)
Ton (Sucta)
aeak contitzny qspla in bielly about ngg1eqat dada madaiS uoith nd
Ldiaquam canaidin ixanaplr of raanhsnal &agiagatcå.
Cpending)
fuding no le, sele ontainuc unit Siopli dying detet.
rebieuale mabipulokiao
Alenhuoll consisttaly Adata mcdal is ihu model thodah 4ohich We.
Son CSuus) p ceive and anig1late ouL datz
Ltrmp) o people usinq a db the date naodl cesCibal hou
(tmp)
inteynally
the dh Stores Q manipa•ots t he data ionotant |Example i
00e shauld be
n an idual 0YL
ntd ct le ot Sobe Customer
ftorage pncul brrt in orach te namC
ordy

mocuBtn mOns the moce ot


the fm"data
Hthe apeci-fic dcta in an ppliation.
reatinshie billing ordux panunt Orday iftm
A develspeY might paint t an ntity as Jhur dot Addreas TCord number
modu ontaining cusfameSorcs pioduct & the Itke tnid.
Th. dn mi no nt ta, modt. et the. lat (ouplcG f duccdis
ts thc Ye lationca data moclel ohich is best uisualiz Addres faduci
as the 6et f tab lesathy lk! a page Sheet
Sprendshee City
State
gach tabk has tausLpith coch rou repreßenting Sao
enity ot intryest Post cod
Shippi ng addre
Valuu
Asaibe his enhihy thinugh och bauing asigle
A (olumn mas rety fo anihy rouw _jo th Sam1 oy AH his Pointantomple may belp xdain ohad we
yent table alsich covsi hutrs a relatiorship blu are faltking aboatt
those aities. Let s asSue ule haue ta build on e- comMerte website
onL. ot thi mart obvious shifts ith NepL going t be Selling ittons directls- to cstoMS
fog the relnti opal gonde Ovey the eoB we uDill have thstoe itomoion.
each Solution has ditferent mod had obout USPYS OuY product catlog ords hipping addzess
USea ,chich ue put inh fouy catgoritd coidily builog adoresss paymnt dota.
USed in th aislk frosgstm e ran use thiS Scnario to mod the dat d usinq
relation dota GtoLe
Land tolk about their proS & onS

45 lnoup.
arite nshort noks on toltboing This modd lacks a predhad Schma punuiding ikihilty
ConSeqnunas of Agreq af orientation Land dyramic dat. Stuctuing
Kuy valuu dat. moda ky valus data moduls gxal in high perfoiman and
Documunt dota modl Scala biliky making thum idhal for appli cotiens Sach ar
Columm tomil
ess
otoreS caching Tanprs Se ssi on manaqe m Dt

Consenuntus ct Qggtenak orientation


AThe dourmunt dcta model is fraible and Scalahle datd
Th. Constqcuntas of aggrqat orien tahion boih posihve &e Storaq& app1nach that stores data. as Selt -condaind
uqaie Conseq tuhlus documnts JsonXML
on 4 he posih ve Side it impoRS data. ocality an each ciocumont represent intormoinSuch nsheldSualus
raluss fag muht tisn Simpli fies data manag rnt and. reloationship.s.
eterievalnhans data inkqrity Thii modls allocas for duna mic Schuma duign Cnabling Casy
hab les bettey Salabili ty cnt ditihutd datc |adapHon to chonging dat Tequiremunt
managment. dotum nt Can var in shucue aad tontr nt makinq
Addifionallg it rrus doto redundan4 making it an |~dal fot handinq &emi -6shuctured or unstacturecl d a
effrcient pproach. Th dours nt dad modal 6 paz ticulazls sutecd tor content
Agq1e ate Oritniaf nn can lead to data iofleibiliky manLgamant blagginqg plat touns data
|making it dithcat to adapt th changinq ceqilimnts onalycs
also ncredse.
mainaùn onca leadiag
trmpt aity nag2gatirontrnton
dagoiUS
and iv) olamn omily sthe6 i
h dotni locking
Ku valus data modl - A
Column tamily shoias alóo knowon aS colu mo -Drin kdor
mtde, Colu mm Sto res Qre typa of AaspL db that ofeey
A Simple i ghtceight dta modal thoat stores datl ldcsc in olu mns ingtad t rouS.
as a collechi on ot kvalu pairs tThis data aodel isogtimizcd to handling lage amouns
ilintifiey or k. of dtc oth
yariable numbeS 6f columns..
Cach
asociatd
hy SAves
valuo uniqu
for fust ts sfored. ia column fa milic
and reterieval alouning- cnd, etdent lookup
Lof of elakd colu mns.
oheh aie qro upS
ERch talumn tamily shore) Éxal h handlina big
b datd 4.Tmestonop- based Yeusioning
talte. analghtd ond apliations Yquiring "hiah.
2 IntrenaenBal CountS

antu
Sra labìlihy and. pat im 2. Wectoyclocks
2.amport iMetonp.
vSchamoa ess dh 3. tash baSec versioninq
1. timestamp -bdsed Verbioning
dadabast. are dusih1cd ho ste dota. toith ourf pre diehd UScs Bystm Clocks toqcajak imesfamps eniuYeS
Schama. deinitiorß. that notr Vtus ionShove Laz fimestomps
This tlei ble dgta mocdel alaugs fay dunamic
adaphue data. shucyesenable Inq easu moci firation 2 InyerMentol countrzs'
evalation of dattd Schama as nud chang tusts ine.M entingibalts Or counts to tock vesiop.
Stham, -le dheliminat the nu d oor upht
Sthuma, dsign peducing diuelupmaat ime 9.
changs
intreSing ngiit 3. Lampot troastomps
uses lbqital clotks th ordr fenk in dashibuhd
define Wesion stamps Explain hiels abost yanitus
nglicahionsoppoachis ot Congtucing "yersion ctmps.
HLs - basSedd ersioning
’Veston StampS als knouon 05 Version num bes os ime SteL yptoqiaphie hnshal to idnhy dota. weXSions
mps gs usecd. fo tack chanq £5 fo datd in a database
or ditibuted Sstim SVecto f clocks Combins timestomps fom mu ltiplc Dodes
iduntify thu ptdur od updake! to ehsuie (on6l stenis in dih ibuhd Sstrrns

replicns q1o éxplain CAp Thcoreng fn datai|9


’op thorem uas otginally pue posed q &vis byeo er
There are gaueral appoache_ to conshchng yersion in lo0 ancgiwen a toymal psoot by sethi Qilbzl
Stons and nany ynch a Couple of
The basictatementof the cAe thorem is thed
oars lat.
auen the thres propesti t ConslshmcyAvailbi
lity
Car
bleran
Avualabaliky ande poatitoa the cap theorm you
conionl et fos ouf of threk in piachu ohct
Auailobiliky muoning in
once in te it's Sauing thot ih c thà
poiions S cishi butc do you hovea
yea d and ik dota
in th clust that t custty
pnfiion tolesch c meanS
Semive communiccti on biegkaqs. in the pus Explain hour Version
sBampSoskinq on multiple
thet Sepoatt th clustr inta mulip le patihons nodes?
Commuhitake oith eorh othe In muliple -mar cases hå do so mething
A fanciey
one appsoach diiti butwerston conhol
ensuse thatt
a niitoy
Bejg That yo can SeL
boston cunswpin the qTesnS ansDes
This puld itRer Yequi ye the elien to hz b
ont Vfosi on tormp h toyies o7 the ses er
histoaie include thenm
chica o San FanCis Co ohen askdor datd.
dat sets in consistcntey pn We
See
ueni on Jtomp
nathe ot the has the. othoy in tair hetoieg
Ponto Alege AHhouq h Veasion contol attms kup se kinds
hitoie atto' aund in Mespl dota
o a CA hase
Aunila toility but Aample buth
CAR difnes ouoilabi lity
ot pasti
man.
prohlernoo appraadh
reir ved nn The mdin pzoblem bese is that it s cualy
in d. responae ensuse
Consisnt noton of havp
Amepoaeulo nls
updates Cun hopp en tapidlly
should
Can of tou bi!
Con'aot

oell for the lngle rmasey only


ngle

You might also like