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

Module-: |NTRODä CTiON to DATABAsE SysTtMs

Dota 9 is aw and isolated/ norganized facts Jhat con ke


ecOrde d (in Jhe form f text , Audio, video, mage etc)
Ly bata. needs to be þooces sed Oheol se it is o6 no use
Ly Infosmahon ! pooce ssed, meoning fl and (Usabe data
Ly Data and informahon Used intenchanyelouy
L eg' In Youhube clalciba se, Jhene milion o6 ideos. Pertson
A cd B' have eXam lomomw and Ohey e Se rchin DBM
Videos on Youuloe . Jhy got 'x', 'y, z ' channel, an Sugses ha
'A' is u0atthtng tom x is oalehin from
fo A! X in (oYinOicn Y, is data
for 8! Y is nGomah on X, Z is data
for Youhbe. evey hing dak only
Database: Database is Collechon Telated data Jhat

Tepresents SOme world enh hes.

L Meaning of el ated data ta Ke an eXample IRCTC, it hay


OLon dalabase. wshen you log in to IRCTC wht
inkormahons oi40 RCTC hawe Trains inkormchan pasengen
in foYmakcn , hotel, in (omahon in fomain. No w Buses

Passenge infomahcn contin in fomahon


Jhose passengeas sho have booked icket any ine,
lgcTC
not have infomahn about cUe pSSenGens
IRCTC Contun nly Jhe in ormahon
Anothen example,
Jhose horel usiich has Some tied
O6
not Con)oin infomahen oo l l hotely e .
Dotabase 0s not Colleci cn Ob any data 9t should be
Collechon related daas So Jha We. Can Temeve
cnd Solve Some
Some infomahon feChvely prble
Database is used o Teeve , in sent cand delote Jhe
cdaB estienty Cmodity also).
Newspoper is iso collec hcn o clata but not dalba se
because you cant mociy Jhe cdata about an eniy.

typialy stored . elechenically (Strucwyed/unstuchwveo)


Jhat 9 dijfeont
Comforts
Iheydata^s. tor
o6 an dalabase
oftype exeniv
daabas
Cdalabano)Cmpony
se. pes Dalabase
is
sualuy
danohed time
databa
elated ty datebase.
(dajabane)
Pixabey
daalsane) clireent gg .sysem
response
steret Aateu
se,Oononls this NOTE applicakona
pi asey
( Seng enter Conjainkand study Jhe Stoved
isSt Cenralized maÀntained
incye an
Youkube Jheir
undeas Such
il
each tho. Sevenol ’
update
’ We Oñented
dalabase
: data
the
fechin
consisBency
is Datcbase’l
daabane! all :databaseacceSS
databane!
database
dalclbane dalabase
dolcbase: understand dhrugh to
daleban database
database: at
dalabase
(image.Cdaa)
Song dalabano.
daabase Nor
eay
Videos
(daka)
daJa) Jhis Hieraschical daa
to
dala
fomm
is Cenraized
USers Poos!
Dala
a Nehuoyk ocah
ons
hashas wncdersood Cenhraiged
) Disibuted
Relahonal biey
a has databases
!. NOSQL
cloudObjec
stores
the
CONS:
hashas flipKut
faobookNetflix
lwhen
the lkeTC Having us
OLA
Let
i) j v) V) Vi) và) Vit)
L
and
heued
dis
Cahon
muni
Com (tupla/ecord) but
is
Seweel
velahonal
data
model 1970. wrde
ange
of
dfenent Heteogeneows of
in
diffeant form
in Docunmon-
omenled
databane.
enform Cselahon!
togeth fovm
tabulan
Cenhalized dasabase
in
aning
anons o res.
doabace
Gaph
systemn data sloing sto
cted
Conne Key
Vaue
storage..
of mn
bured
disbi distibuted use
Same.
ArpliCc«hon forme Stoyetables Colu
On for
used databQ9e.
Unike Same
operahng
handuoave. cand the not
only vau \ide
based
CUle
dalabane invented key
Jhe Columy
(atthbute
) Call
we
isdata,
:dalabase organlzahon Homoseneo
us Relakonal
database. : lahonal
daBabases Same
Dalabase stoes
data @ (D
daa
in
talabase elahonal
A dd
technically
Co re
Distibuked
on system
A
execas
E.F.
Typos
daabase Jhe
se
an
StoTes Sal L
not
a
itL
Jhis
No L>
i)
V) Cloud dabae, , A daoba se uhene ddata is Slored n
Vixal enionmon t and execulis Uen (ho cloud
Compubng ystems/ piatfma. S- pronce use1
S+
Vamos Cloud Compubng Sesvio, (SaaS
vancus ( PaaS, laa Se)
for accening tha database, cloud platfo e.
Amozon web enwico, (Aw)
Micosogt CIZZUYe

Cioogk cloud SQL et


v)
vi object -oniented database Jhe type ot database that
Uses object-based dadata modaly
moolely ppronch for storing daa
in dotaloona. ysler

vi) HiesaYchical dalabase : # selk shudy

vi) Nehoyk databaue # Selk Shudy.

. Why Use databa se ?


Ly Databases ase ed able to Stoye Vast mo, of beCords in
L ince di bly simple and quick to l9cate dala e(fecive man
grs Simple to add neuw dota, moci4y or delet also
LDala Can be easiy Seonched by datalsase techinques
ing, binau Seanch et.
indexing
yDae Can be and easily Sorted
qyickiy
L Daabase pronce. Secumlý of dala.
3

daba)
Having undensiood Jhe Concept o6 database (collecion of velahed
and ushy do We need database (fer esfcienty Solviy a problem
Nlow We,
oiu shedy what is DBMS.

DBMs): - Shands for daabace managemon ysk


also se fenied an daabase Syslems.
-the database.
St is SOtuoaie used to manaye
examples ! Oyacle MySQL, lBM DB 2 etc.
Now
gain,
hay to mangye
IRCTC caabase ue have, DBMS tach Compony uo20 hawe Jheiy
han to manaye
Netflix s database we hcves, DBNS database and to manaye
to manye Jhe. ewey company
flipKant han database we hove DBS wiee hawe Jheir Own dalcbane
manapemor sysem (DBMS)

B Data
Data
M Daa
(usen Daba
4sey Comnnicate to S Daba
bBMS interfac. for
efhient and faster
Diff Progpam
Cocle to in sert Daabase
way os Guil th Aling his dalet, update
Crd quoy dateubane
Tequivemont
infovmahon

prvides Qn
intonface to þei7otm vasous operchbny
liKe daabase Creahon, Serinr data updakns, doleiny data,
L poonden rolechon nd Secuihy to Jhe databane
DeMS’sohuane /managemont of daabase
Allows usen the follootng tas Ks.
(a)
CDaa. definahon : Used for cieahon , modiffcaion cand
that doGnes dhe
definihon -hat 7anizohen t
Temova o
Ihe daa
(o) Dala up daion.. Used for insenhon modifaakon ond cdeleion
aChual dala database
Tehievent data fom cdakaban
Daa retieval: used for

(a) Usen Adminsahca: used for monibin and regisheing


Usens matainy dala integiy, dalabase SecumlG ek.

ReLATIONAL DATABASE MANACtMENT sysTEM ( RDBMS

L All MOdean bBMS hke SQL, MYSQL ^eve , lBs DB2 yacle and
micYosot aC Ces based On ROMS
Based on, selahonal data model DBMS for veahonal(table)
L Al opeyahono liKe in Sert dolota "ane þergomed on
tables
Data is Depre Sented in tesm ok tuply CoLos) n RDBMS
Due. o a Collechon of oYganized Ser oG tables, dae
Can be accened eanily in RDBMS
4

Temin ot RDBNS Columns oy Atibute &

Records
Emp_i E Name Post Salay
tuples Rahul Cleik D0,000
E2
Rows
or Kapil Managen 80, o00
E3 Mukesh clenk 20, o00
E4
Manoj leon Lo, od0
E5
Radha 80, o00
E6
Shweta Manajea
Clik 20, o00

whole Table is called Relahon',


Rouws' called uples Re Covds.
Columns' CUle Callod AHilouheg.
Jhe. Telahon a 4 (n0.06 athibuhes)

Ihe Yelohon = 6 (no. of tuples)


Candinatiy of
Next topic is
File System Vs DBMS
File syshem is
Gke., abasicny
me dium cny o! aTmonging the files in a
shorage
had disk eg. NTEs, EXT
y
Before
File
DBMS
b ased
toadihonal
file syskem was used.
System Wete an eatly aHempt o Compuhen3e Jhe
manul Syskem. Also called Somahme FPs CRle proce sysem)
Vsen USen 2 Usen3
|Roli No)
Stud- fle Sub ile Resutt fle Nam
LCouy Lavecu
Roll No
Name Name mals
CouYse Ld
Credit
DBMS
U
Sen 2
Vsenl
eg- 4 ile syslem. DBMS.
Some impor tant diffeenc b/u Jhem:
Data Tedundoncy and Consiseny:
File Procenj Syslem (FPs) ’ Shing Same daa if. Gomats
and in diff progran'y Canjuage is þossible.
DBMS ’ Conols Kedundanuy in ado i on Swes a
Cot o Stoaye spaca.
it) Conc uvvency !
L mulhple USo1S
accomins tro clata Jhe. Samo me
Can Led toinconsisleny Fps but Jhero ane
Sore prorocols cdegined in DBMS
for
FPs. avoldinN
in conss.
Jhen is Such pobcola in
Secuiby'
L DBNS proiden Secuny
Role ba sed pe1m)ssjor, Ge have in DBMS
A Ccerm Conhoe prorocals
We CAn acce big amont 0f data and ufich
datc as pen youY wi' sh.
All Jhe info. o)l not be Visible to VSeny in D&MS.
File sy stem is handle by opevaing yshem
Which Paicen Secumw at al
iv) Data independence: A fPs does not þende data independeno
utile DBMS onces tuo ty pe, ot Dia in dopencdence
physical data indapendena
data indopendene
v)
Digpeulky in
Acaig data:
DBMS: Random quony
F Ps
Can give instont owtput
Seanch Youvsel 6 (Usen wi! Seaclh mGnualy)
w) Inteçhy Conshraints difhi cutt to apply in Fps
easy to opply
DBMS
Topc : Fle Based Syshem Vs
DBMS
when you open a Cempwen Jhe
cpesoing Sy sten has aieady a
file gstern use d to Store
nd mana data
Your Cormputen
for exam ple. Suppo You want to Store. Jhe date
Sudent tulleuing aaut
gnde youy Computen
’file Reot di vectory
Ar A
2 sahiL
3 Puja
Rai Cdive D- dve E-dive
docx

F-A f-0 f-E f-f

|File syslem
f-J

disk

File Syshem allos yow to Stose Jhe daa


4 ype ot SOthJoe enly to n Jhis ay
mage small amourt of
data C4. NTFS, EXt, PAT)
ohen you & istall any DeMs Csshave ) in yeuy Compule,St
Now,

uy sÙL >data shyed

file sysla

Hand dis
fle Syston but we ane wsiny D8MS
not emoved
We hawe
Jhe sota. moree etiieny.
to manaye
et take an eyample ! oc Shdont data in nvasiy

ACcount [AtAdon JHustee


Aost. Name. en vollad.
9rnde
iles Jhs
cbout shelont n
Lyevey depavmcn sto'y clat daseba apoael
b t in
Callopl (ile sysom a voach.
we have
DBM
Acco
ACodon

Shore ’databau aoach.

tneis O6 dBMS
what e dhe domeiG of Ale syslem
shucluved data pyecdetined ’ easy data
acle
File sysem daa ype is
( stuched data. ’
DBMS
Matl ilems arayemont
Road ije nalage Acodeni,
cifferent sechon ( Acco DD- MM- YYYY
Diff pepk Date’
kollow dif. (onak MMa DD -YYYY
may utich Con MM- yy- DD
ile bamed sysonm
inconsisleney qlso YY- DD- My
(ead to clala
have stuolned data
DBMS we
but in

Accan Secien. (le.


Suprose ALso 9 only to
Name fees Pad
Roll
A 20, D/
A 30, / no Yetet in oh
2
Bo, vo/. Places or tabu wtich j
Cye li dale et incoms
able. to clont
file cyslenn is
Jhe duut caein
Diyfcullg Qccenin Jhe. data.
fw g. (ind6ind ohe nome Shudon uske SCoYed A
and nYoled n Cicket fom Hosat 'AB'. gracda
ABove data acceniy is vey
difhut in Rle sty sleme ot eosy ia
ncolh.

9n file syslem we neod


6ile tocalien.
DBMs need to
No

Con (uny cdcnlaye in DeM S.


Secuily ’ DBMS þide s
Secwilg
Role based peA m) ss] ern
Accen conr. prohocols DBMs.
A| Jhe in fo. uoj 20 not be isible in
Rile sy slam handed by ufich doen not
Proide cny secuikg.
A file basecd Sy slem is a ty pe ot softwqre Jhat
Sumnagy
allo usens to Qcce SS and ovgari3e Smal 90up of data

9 is wnually integYaed into Compuleis 0s and Terpomube foy


and Tehies Gles sBorage meium
sonng digitad Vension ol paper bauad ( imy yem
File sysk
What are Data Models in DBMS?

Data models in DBMS help to understand the design at the conceptual, physical, and logical levels as it provides a clear
picture of the data making it easier for developers to create a physical database.

Data models are used to describe how the data is stored, accessed, and updated in a DBMS. A set of symbols and text
is used to represent them so that all the members of an organization can understand how the data is organized. It
provides a set of conceptual tools that are vastly used to represent the description of data.

Types of Data Models in DBMS

(a) Hierarchical Model

The hierarchical data model is one of the oldest data models, developed in the 1950s by IBM. In this data model, the
data is organized in a hierarchical tree-like structure. This data model can be easily visualized because each record in
DBMS has one parent and many children (possibly 0) as shown in the image given below.

(b) Network Model

A network model is nothing but a generalization of the hierarchical data model as this data model allows many to many
relationships therefore in this model a record can also have more than one parent.

The network model in DBMS can be represented as a graph and hence it replaces the hierarchical tree with a graph in
which object types are the nodes and relationships are the edges.
(c) Entity-Relationship Model (ER Model)

An Entity-Relationship model is a high-level data model that describes the structure of the database in a pictorial form
which is known as ER-diagram. In simple words, an ER diagram is used to represent logical structure of the database
easily.

ER model develops a conceptual view of the data hence it can be used as a blueprint to implement the database in the
future.

Developers can easily understand the system just by looking at ER diagram. Let's first have a look at the components
of an ER diagram.

Entity - Anything that has an independent existence about which we collect the data. To learn more about Entity in
DBMS click here.

They are represented as rectangles in the ER diagram. For example - Car, house, employee.

Entity Set - A set of the same type of entities is known as an entity set. For example - Set of students studying in a
college.

Attributes - Properties that define entities are called attributes. They are represented by an ellipse shape.

Relationships - A relationship in DBMS is used to describe the association between entities. They are represented as
diamond or rhombus shapes in the ER diagram.

In the above-represented ER diagram, we have two entities that are Employee and Company, and the relationship
among them. Also, in the above-represented ER diagram, we can see that both the employee and company have some
attributes and the relationship is of "works in" type, which means the employee works in a company.
(d) Relational Model

This is the most widely accepted data model. In this model, the database is represented as a collection of relations in
the form of rows and columns of a two-dimensional table. Each row is known as a tuple (a tuple contains all the data
for an individual record) while each column represents an attribute. For example -

The above table shows a relation "STUDENT" with attributes such as Stu. Id, Name, and Branch which consists of 4
records or tuples.

(e) Object-Oriented Data model

As suggested by its name, the object-oriented data model is a combination of object-oriented programming and
relational data model. In this data model, the data and their relationship are represented in a single structure which
is known as an object.

Since data is stored as objects we can easily store audio, video, images, etc in the database which was very difficult
and inconvenient to do in the relational model. As shown in the image below two objects are connected with each
other through links.

In the above image, we have two objects that are Employee and Department in which all the data is contained in a
single unit (object). They are linked with each other as they share a common attribute i.e. department_id
(f) Object Relational Data Model

Again as suggested by its name, the object-relational data model is an integration of the object-oriented model and
the relational model. Since it inherits properties from both of the models it supports objects, classes, etc like object-
oriented models, and tabular structures like the relational model.
Schona.
o6 Coect
aSeloct Comnicar
olaa
aCCos fer
tool
hendy Dhis
intenaci'
on pla
the
oncoos
opt clone d'Yectly
Con DBs
need
we for pialtesm
example
DBMS
wjh be ony
A (maion) infoahon
to uned
DBMS clisecty lnguoye
Usen Cen Fr ’
tontmanagement.
.claba,
impor Jawa
languaye
cny
(in
Conci
the on auchiechye&
de.
of Databne qpplicai Aexpcundimacine
client
any for
Data to oiee cloest
ibel,
94
local JDBeCinrochi
Arehieie it
Cihical available.
he91e for
DBMS/ a9chitechuve
Arei
techm o Seswer ne.
dalab
Java
is Av
ajsechve e dovelomeat Senu
en(client- ODBC1
trekilec done. se i
DBMS dotcba
og ctiyecHy for Ofhce
Ms
eq. Lwe
Can
use
ce fAient Jhe
3Tie Oot Hen Any
changes Suilabla dclaloou onlyWe
veVS far open
to
a DBMS|tie1
- her darabana aychitecwe
Syslemcho ^ecuvely. ie Dalabone
aachilecve
2Ties
ano inmducicn le store NO-
wed applicahong
todays AP's
for 2
3
ODBC
File
dalabse Same
-’ San and
quicuy Types
aMchilechYe
(a)
1-
tie
Lec-I -a
lec
Ly
Lot
w A
(0) 2)
Seswes
Serven
Sowe
aComecie cient Cnd
Cient
SeweN
oih
Senven Clieat
utich
rovlhen
cemuicat
cala
cat teracli
Comeni
esryishon Deskto
papplicaiony atni
|Applitaion in 1Appl
SeveN
S
DBM Dalaba Use
USe loyen end
no
hen web
clive
cty
aicaon ent
cli
lape
Can
h
side.
ey
ampleg
’ 3-
Tien
Arclilecue aken for
on
Applic
clien
Conlai
Seyen used
chent
L
L
L
enG colvefi.
velayonl
in
dalclane Canephod
Schene, stchne
clala
Ohone
uhia
Sysle
m dechni
dala ancd
name
of orgomized objec inced
held
o
vepvenonlei oG
pant to schema typically
Cyel
Snvolved.
dalabou
Schem
Schema
be Compan
teguivemo
projeck
ARCHITECTU
RE Schome dotonengm
Conshci
tubte Synax
luds
inc
logicad co
not
Cogical
databan ure Cne
Less
clean,
cbstact
aban
pic houwbu'snen
ruler
inkpiy
dal Ihey
DBMS physicad big wwually
iniil JheySueh
SchemaConcepul Cisntin
offers
phys'cal:
MonuE-9 y
Ls Conaphal Cogicad
Concept
(a)
Lec-3
Lec-4’ Lec-2 Lec
Schemna ’
for
Extenal
schema
aMchiechures D3MS
hhat is
ConcoptDBMS File
Quwshion
Aie Sys
Stou
chye ok lem
table
Slore Schema Vs
ue 20 Houo CEPTUAL
CoN
PHYsICAL tencQ Ex DBMS
soye SCHEMA
ScHEMA cro
table
Jhen Jha dhe
iim-acjn.
Anit Schema Lec-y
d wtich Jhyee
data data
above
(ouel
Cin yn
clale
(Etupkat,
çomaion) ER schona
o Ralaliaad Extesna
Can
in Schemos
Amozon, stuce anchece.
tables, whc cismbuta
Conwoli3el
con ke be. .

Pad
is s
tove CPhysiSntesnal
cleau)ue) togicadCaue
schema
Jhen Jhe Qm
ele:) in level)
yied
struchye to
Usig
Y)
6
to
lo
isinkomain
Lha acce
Cant
inteact
skoved ciff. uew
dat
isfer is lno)
do Afendonce (
indepencone
data
and
Usen ca
fenont Wedile.Schema
diyecHy vieos.
mls poic,
(ees
Ahoyh Cevel pasuoord Use
ale
for c
he
Mol
peon
on
sn
manu
physicoll, per exten
vole
Don 2e ot
Jhe w
data View
ord View
(for it
fomm uthee om: manls Shudet
foViecs yne
(heu to
or dau ys login
fepyesent
icd
(acug
Saefor cifforuntTfaculg login sJhat
is
the
Use)
utich mana. Unedin
pafe
knoe schoma kils Role
Selec
avels 9n stoved
is Shou.
toHo0 A shown is
evel
Jhvec Sloved, F8 shudent
coñ GnmaiL
f.
Unive1sil new
Jis
But
made wtonee
Extenal vieuhuder
S we
See
USen
is Take
when
we
No
#Why e
2 solaianhip
a /shems call, lo (reymen.
mauy
telaionlp. tieh Cie)
schema
Extenal
physi
fiw
Concenheel
viesschoma mods
fere to schoma
Physicod
alh
enhien
bu be Rolaicnal is data,dise,chjie le
DBMS)
(Cayen
bluepink daba eh cMow schema
Concephol
in
Tables istorad
ele
). INRo
Jhe decid,
Dnd
ondl
Schoma
ER
,Age. dale
stoyod
isdata male
atmin
Dabon
lelahonal
Moclel dala ia
DB’
Achl
Concopheal
schorna Roll
no)
Moclol o6 schoma inten
(au Admin
palabo
doisner
Bavah
an
deignen
Usen
See
exampe
dabab
an
HowSudont
Wehue
to ER cal bu
physi
she
So :NOTE
e. *
3
DBMS Architecture
• The DBMS design depends upon its architecture. So, DBMS architecture depends upon how users can connect
to the database to meet their requirements.
• The architecture of a database management system plays an important role in determining the actual design and
layout of the database
• To understand the DBMS architecture, you must have a clear idea about the client and server. The client is the
user requesting service, in this case, access to the data stored in the database. The server side is the side that
answers the request of the client.

• The architecture can be divided into the following three


categories based on the layers between the server and client
layer.
(a)1 tier Architecture
(b) 2 tier Architecture
(c) 3 tier Architecture
1-Tier Architecture
•1-tier architecture is a simplest architecture where the Client, Server, and Database all reside on the same
machine. So, anytime you install a database in your machine and access it through SQL queries. Therefore, This
type of architecture is an example of 1-tier architecture.

•The user directly interacts with the database itself, which means that it is accessible to the user to create, alter or
delete the data

•In simple words, in 1-tier architecture, the user can directly sit on the DBMS and uses it.

•1-tier architecture is rarely used in production. It is used where the quick response is required. For example,
development of the local application

• The user directly sits on the database, and there is no layer between
the user and the database. Therefore, there is no data abstraction; the
whole data is available. There is no interactive user interface.

Data Abstraction is a process of hiding unwanted or irrelevant details


from the end user. It provides a different view and helps in achieving data
independence which is used to enhance the security of data.
2-Tier Architecture
•In the two-tier architecture, applications on the client side(i.e. PC,
Mobile, Tablet, etc.) can directly communicate with the database (server
side).
•User interfaces (API’s like: ODBC, JDBC) and application programs
are run on the client-side, because to establish a connection with server

•The database server is responsible for query processing


and transaction management.

ODBC:

JDBC:

Real Life Example


When any person Go to bank or railway station. And Fill a manual application form for ticket reservation or bank
transaction. These forms are given to some operators. Operators are using client’s machines behind the window.
Then client’s machines access the database to verify details. So, this is example of 2-tier architecture.
2-Tier Architecture
Advantages of 2-Tier architecture
•It is simple and easy to use and maintain because it has limited or authorized clients.

Disadvantages of 2-Tier architecture

•But problem with this architecture is scalability. Scalability means when the number of users increased then two-
tier architecture does not work properly.

•Security is other main problem because It does not allow the role base access. It means author can work as
administrator because every client has direct and similar access to database.

•Traffic load on database server is high because it first processes the query and then provides the required data
as well.

Example of 2-TIER AND 3 TIER ARCHITECTURE: Ticket counter and IRCTC , Bank counter and online banking
3-Tier Architecture
•In 3-tier architecture, client cannot directly communicate with the database server. It contains another layer
(application layer) between the client and server.

•The user on the client-end interacts with an application server (also called business layer) which further
communicates with the database system.

•End user has no idea about database and database also has no idea about any end user. The 3-Tier architecture
mostly use in web application.

Advantages of 3-tier architecture

•High security because of role base


architecture.

•Highly flexibility (scalability)

Disadvantages of 3-tier architecture

•Tough to maintain as compare to 2-tier


architecture
3-Tier Architecture
• In this architecture, the user connects through the user application, and that user application interacts with the
application server that communicates with the databases.

• This provides ample layer to abstract the data.

• Any modification in the data done by the user does not directly affect the database itself. The changes are first
performed on the application layer. There is no real connection between the database and the user.

• The query processing and other functionalities of the database management system are performed at the server-
side application.

• It allows the DBA to manage the access of the various users. It also enables concurrent transactions on the
database.
3-Schema Architecture
The three schema architecture divides the database into three-level to create a separation between the physical
database and the user application. In simple words, this architecture hides the details of physical storage from the
user. The database administrator (DBA) should be able to change the structure of database storage without affecting
the user’s view.

This architecture contains three layers or levels of the database management system:

• External level
• Conceptual level
• Internal level

Three schema architecture hides the details of DB from the user. It’s other name is three Level of Abstraction.
The database administrator should be able to change the structure of database as according to need, without
affecting the user’s view. This effective three schema architecture holds 3-layers as below

1.External level (front end developer, user level)


2.Conceptual level (database designer, logical level)
3.Internal level (administrator, physical level)
3-Tier Architecture

1. External or View level


•This is the highest level of database abstraction.

•External or view level tells the actual view of data that is relevant to the particular user.

•View/External level provides different views of the same DB for a specific user or a group of users. For example
view for faculty student is different than faculty admin.

•External level develops with the help of front end programming (Javascript, HTML etc)

•An external view provides a powerful and flexible security by hiding some information of the database from a
particular user.
3-Tier Architecture
2. Conceptual or Logical level
•The logical/conceptual level tells the structure of the entire database.

•Conceptual level acts as a intermediate layer between the physical storage(DB) and external level.

•Database designer works on this layer which provides the structure of database.

•Database any model (i.e. Relational or ER Model) can use at this level which provides the structure of database.

3. Internal or Physical level


•This is the lowest level of database abstraction.
•Database administrator works on this layer where it has complete control over data
•It describes how the physical data is actually stored (in the form of file) in the database and provides methods to
access data from the database.
•It shows the physical representation of the database. As it exists actual on the computer system.
•It means that the changes in physical database storage devices (i.e. hard disks) and the files organization on
database storage devices, are hidden to application programs and users.
3-Tier Architecture
As we know Basic purpose of 3-level schema is to achieve the goal of, data
Independence. Data independence means, independent the data from user.
Therefore, It follows the 3-level of abstraction (3-schema architecture).

Types of Data Independence


There are two basic types of data independence, As explain below
1. Logical Data Independence
•Logical data independence separates the external level from the
logical/conceptual level.
•If any change is occur at conceptual schema then it will not affect the user
view.

2. Physical Data Independence


Physical data independence separates the physical level (internal) from the
conceptual view.
In the same way, if any change is require in physical schema then it will not
affect the conceptual schema.

i.e Gmail makes changes in conceptual and physical schema at regular basis without changing the user view.
Schema and Instance

•The collection of information stored in the database at a particular moment of time is called database
instance.
•The overall design or structure of the database is called database Schema

Types of Schema
The different types of schemas are as follows −
•Physical schema − It is a database design at the physical level.It is hidden below the logical schema and can be
changed easily without affecting the application programs.
•Logical schema − It is a database design at the logical level. Programmers construct applications using logical
schema.
•External − It is schema at view level. It is the highest level of a schema which defines the views for end users.
Schema and Instance
Database Languages
Database Languages
Database Languages
Database Key Features
Database Key Features

You might also like