Assgynment I
Qrau the neat dagrath of Databaje
explan rty
yrtem Structure and.
components in detal
he databaje system strocture describes houa databait
managenert sytem (DeMS) vorki inttetnallyy and how
ditferent components nteract to manage data effcienty
Application End ser DDL
DML compler DDL conplier
uery optimizer
Stored data manaaer
Data fles | Complier DML Data Dictionary
Qoery Proce S5or
Lrterprets and parses SOL ayeries entered by the vser
Converts hioh-level SQL into lownlevet nstroctont lquery
plan)
ptnizes the query tor best performance
2 Execution Engne
Executes the optm2ed query plan
Lhteracts wrth storage manager to fetch data and.
pertorn operations
3 Storage Manager
Core component that nanages data on dik
Coordinates between the buffer manager, dk storage
and acce ss methods
Viclyalekhar
FAGE
4 Boffer Manager.
Temporarly loas data blocks nto main memoru fre
dK for procesin
Lnprovesperforn ance by reducng freqsent dsk T%
Transacton Manager
Ensures that all transactions are proce55ed reliablu
(ACLD pro perties
: Manages concorrency and ollback during falores
6 Catalog Manager
Maintans metadata (schema defintions, table
ete ) structores,
Sopports system catalog or data dctionary q9eries
7 Authorzation Manager
Checks f the user has the reqired privileges to acces
nodify data
Lnglements GRANT/REVOKE ules
Ical storagg of all oectabase files, indexes, logs, ete
Managed through fle sustem intertuce or raw storaoe
wst the man characterstics ot the oaTabase approach ond
exolain how it ditfers trom the Tradtional file sustem
Mak Characteristics of the Databare Approach
The database approach ojes a Detabase Managenent
Systemn (DBMS) to manage cots cetrally and
CGicienty t oiffers from the tile systen by provàng
better control over data oreanization, access, and inteory
1. Data Lndependence
. The structure ot data iS independent of the apl1catan
programs
. Chanaes in the schema do not reeire cthanges in
applicaton code
Vpla
2 Reduced Data Redundancy
Data s stored n a centralzeo
Kedundant data is min m/2ed by syten
nornalzation an
ntegration
3 Lnproved Data Sharina
Votiple osers and applicattions can acce55 The sa me
database Jtmuttane avsly wrth cortrolled acces
4 Data Lntegrty and Consistency
DBMS entorces rules such as primary keys toreign keyir
and constraints to ensure data correctness
(03 How the Dotabase Approach pifferent from the
Tradrtional Fle System
Centralzed Data Management
Ln the databaje approach, all data is stored and
tnanageo centrally by a DBMS, onlike the file systen
Where e ach application has ts own files
Butt-in Data Lnteority and Valdation
beMS enforces roles lke prim ary keys, toreigakeasr
and constraits to ensure data corre ctness, which is nanuall
handleen file systems
Data Sharing and Mott-user Accesi
Databases allow molttiple ujers to access and mangulate
data simotaneougly ojing concorrency control Tradrtional
file systens do not sopport ths relably
Stroctored Query Language (SQL
DBMS prouides a powertul query languaqe (S0L) to
retrieve and manipulate datahere as fle systens reqoire
coStom proaramn ing
Reduced Redundancy and Better Consstency
DBMS min imi2es data duplication by nocmalization
ingroving consistency le systens offen soffer fron
redundancy and inconsutent data
VicdyaBear
9 3 Write a short note on Kelational Data Model
Network Data Model 3 Hierarchical Data Model urt
evample.
|Relational Data Model
The Relational Data Model oraanizes data into table.
(re lations) conssting ot rows (foples) and columnS
tattributes). Each table represents one
entity Tiy2e,
relationshps between entities are repreiented ing keus
ang
g prinary key ano foreign key
" Feature s.
Data s stored in tabular form
Uses SL for qyery and manpulation
Enjores data independence and integrty
Example:
Student
Roll o
The Rol _No s the pritnany Key
2 Netyork Data Model:
The Netuork Model represeats data sing recoro
(nodés types
and relationships Cedyes, forming, a graph-like
stfocto re. Each chilo can have moiele parent records,
Aaloung many-to-many relationsbips
featores
Supports complex re lationships
More Ae kible than hierarchical model
es pointers. epresent relationships
mple
Soppose we have.
Stodent 2 linked to multiple Coories
" Coorses z linked to mottiple Stodents
lhs torms a many-to many relationship, in. a network madel
Vilyaekhan
DATE
Construct an ER Diagran for Company having to llo ying
detals
Company organzed into DEPAR TIMENT Each
department has vnigue name and a particular employeewho
manages the departnent Start date for the manager is
recorded Department ma have several locations
A department controls a nonber of PROJECT Projects
nave ca uniGve name, number and a Sngle location
Company's EMPLOYEE name, sino, adoress, salary sex
and birth date are recorded An empleyee is
assigneo.
one departnent, but may botk for several pcojecty laot
-necesjarliy coatzalled bu hec degt) Number of hoursleek
an enployeeworks on each project s cecorded, The
-m mediate superusor for the employee
Englayee' DEPENDENT are tracked fac health
nsurace Purpuses (dependent name, birthdate, relationship
to
enployee Tdent1fu the relationship among the entities
aloag wíth The mn apping card1nalties, keys n the EiK
Cloudiors
NGme NUMer
N<Worlks tor
Depoae
Manaoe Corro
Nom
locatin
khalekab
-or
the catabase
Jata effenty The uyten t be usable,
need for
to oje complex data stovcteres teetfueny has led Q6
repreient data n \he
databaje Developers hde thu conpleity Iro jerg
Jeveral levels of abytractien Explan
abstraction n detad oth those levela of (hre
evanple
5La a databaje yten, leve ls ot
hide the complexites ot how abrtractwn are ed t
ata s
nternally Thy allows drtterent wers tored an) anitane
developers, end sers, advnstrators fo lenteract
9 applcaton
database at the appropnate level without with the
nderstand t ternal detaly needngy t
There are three levels of abstraction detned
ANSTSPAK Carchitectore by the
Physcal atvel (Lokest Leve)
Defaction Describs how the data s phyically stored on
storage deviçes le g, hard duk, SSD)
It inclodes data structores like Bt trees,
ndexing
hashng blocks, etc
tis only vsble to database adinstrutors (DBA) and
DgMS software
Example
A table of stodents is sterein bna files vsng Bt trees
for indexing he ser ne ver jeei or how the fle
arranged on dsk
2 Logcal Leuel (Conceptoal Leve)
Defastion Describes_ what datas stored and the
re lationghpamong thoje data.
.Ths level defaes schemaj, data types, tables,
constrants, and relationships
Visble to database designers and application developers
O6 Draw an EK dagram for the bank ng te Rsloe the
banking reqorements are a gyuen below
he bank oroanized nte branchesEach branch
located in a particular cit
The bank efers to types of accoont avng and
current ecount can be held b nare Tthan one coTORer
and a CoTomer can have mare than ane accounT
* loan orionates at a particular branch and can be
held by ne r ore costomerl
Ldertty the relatonship amorna the entities aleng th
The nappng cardinalties, keys in the K diagram
Constrsct appreprate tables for E-R dagram desgned wth
above requirement
Custume.nae
aceeunt
Warks
Crgloute
idephencbr
Vidyalelhar
SATE
Q1What Specual 2ation and generalzation in rterien a
iagram? What s the difference between them?
L Specialization in EEK Diagran
Defnition
Specialization s the process of detning sobdases of e
entty set based on some dstingoshing charactert
t a top-doun approach, where ahoher-leuel ent
duded nto tuo or more lower-level
specialeedentter
To reprejent differeaces ainong sobaraupi in an
nore precise ly entty set
Synbal in ERD
A trianale labeled TSA pauting dawn troasuper dass.
ivb claSe S
Example
Superclass Enployee
Sobclasses Manager, Engneer, Accoontant
2 eneral1zation in EEK Diagram
Defaton
9eneralzation is the process of combining two or nore
Mower-level entrty sets nto a Single hiaher-level s9perclas
based on common attrbutes
It is a bottomup approach, where cOmnOn fe atores of
muttiple entities are abstracted into a sinale qeneralzed
entty
Why sed
To elim1nate redundancy and group snlar entries
Synbol in ERD
A triangle labeled LSA" pointing op fron swb dases to
Super class
Exanple
Sobclasses Car, Tock
Superclass Vehicle
Vtyalekthri
Feature Spevalzation Generalizatien
Drection Top-doun (general 2
Jpecrfc)
Bottomup (specife L
genera)
Divdes an entty into Combines multple cnttties
Porpose Sob-entties
D.ferences between Simlarities among entties
tocus Jobgrovps
Exanple Enployee Manager,Car, Bke 2 Vehicle
Clerk
Vic caje Add nore specific Abstract cOmmon
attrbutes attributes
ERD Ponts dowa to sobclasse Points vp to superclas