Click to edit Master title style
DATABASE MANAGEMENT
SYSTEMS I
21 MAY 2025
‹#›
Click to edit Master title style
LECTURE 2
DATABASE ARCHI TECTURE
‹#›
Outline
Click to edit Master title style
At the end of this lesson, students should be able to:
● Describe disadvantages of the File based Approach.
● Describe characteristics of a database.
● Discuss advantages and disadvantages of database.
● Describe roles of people dealing with databases.
● Understand the architecture of a database.
‹#›
3
1.1 Disadvantages of the File based approach
Click to edit Master title style
The pr eviouslesson highlighted that the File based appr oach hasa number of disadvantages. Her e ar e
some of them:
a) Data r edundancy and inconsistency
■ A good Database Design isone in which ther e isminimum Data Redundancy and Data I nconsistency.
i) Data r edundancy occur swhen the same piece of data existsin multiple places (duplicated).
Pr oblemslinked to data r edundancy include: wasted storage space, higher storage and access
costs, dif ficulty in updating the database.
I t leadsto data inconsistency, which can pr ovide a company with unr eliable and/ or meaningless
inf or mation. Example, a changed customer account in a bank may be r ef lected in fixed- deposit
r ecor ds but not elsewher e in the system.
Nor malization can be used to minimise data r edundancy.
ii) Data inconsistency iswhen the same data existsin dif f er ent f or matsin multiple tables. This means
that dif f er ent filescontain dif f er ent inf or mation about a par ticular obj ect or per son. This can cause
unr eliable and meaninglessinf or mation.
Constraintscan be used on the database to minimize data inconsistency. ‹#›
4
1.1 Disadvantages
Click to edit Masteroftitle
thestyle
File based approach
b) Dif ficulty in accessing the data
■ Dif ficulty in accessing data ar iseswhenever ther e isno application pr ogram f or a specific task.
● For example in a banking system, an of ficer may r equest all customer swho live within a
par ticular postal- code ar ea.
The of ficer asksthe data pr ocessing depar tment to generate thislist. Since designer snever
anticipated such a r equest when designing the database, ther e isno application pr ogram f or
such
a r equest.
Ther e ishowever no pr ogram to generate the list of all customer s. The of ficer then hastwo
choices, either to obtain the list of all customer sand extract the needed inf or mation manually, or
ask a system pr ogrammer to wr ite the necessar y application. Both solutionsar e tediousand
unsatisf actor y.
■ Conventional file pr ocessing of ten doesnot allowneeded data to be r etr ieved in a convenient and
ef ficient manner thusthe need f or r esponsive data- r etr ieval systems. ‹#›
5
1.1 Disadvantages
Click to edit Masteroftitle
thestyle
File based approach
c) Data isolation
■ Thispr oblem ar isesdue to the scatter ing of data in var iousfileswith var iousf or matsmaking it
dif ficult to wr ite application pr ogramsto r etr ieve appr opr iate data.
d) I ntegr ity pr oblems
■ Data integr ity meansthat the data valuesin the data base should be accurate in the sense that the
value must satisf y some r ules. The data valuesstor ed must satisf y cer tain typesof consistency
constraints.
‹#›
6
1.1 Disadvantages of the File based
Click to edit Master title style
approach
e) Atomicity pr oblems
■ Atomicity isa f eatur e of database systemsdictating that a transaction must be all- or - nothing
(complete). That is, the transaction must either f ully happen, or not happen at all.
■ I t must not complete par tially. Atomicity ispar t of the ACI D model (Atomicity, Consistency,
I solation, Durability), which isa set of pr inciplesused to guarantee the r eliability of database
transactions.
■ Atomicity isusually achieved by complex mechanismssuch asj our naling or logging, or via operating-
system calls.
■ A guarantee of atomicity pr eventsupdatesto the database occur r ing only par tially, which can
cause gr eater pr oblemsthan r ej ecting the whole ser iesoutr ight. Asa consequence, the transaction
cannot be obser ved to be in pr ogr essby another database client.
‹#›
7
1.1 Disadvantages of the File based
Click to edit Master title style
approach
f ) Concur r ent accessanomalies
■ Concur r ent accessto data meansmor e than one user isaccessing the same data at the same time.
Anomaliesoccur when changesmade by one user get lost because of changesmade by another user.
The file system doesnot pr ovide any pr ocedur e to stop anomalies.
g) Secur ity pr oblems
■ Not ever y user of the database system should be able to accessall the data.
● Example, in a univer sity database, lectur er smay be denied accessto student’sfinancial
r ecor ds.
■ I n file- based pr ocessing systems, application pr ogramsmay be added in ad- hoc manner, r esulting
in non enf or cement of such constraints.
Due to the above disadvantagesof the ear lier data pr ocessing system, the necessity f or an ef f ective
data pr ocessing system ar ises. Only at that time the concept of DBMSemer gesf or the r escue of a lar ge
number of or ganizations.
‹#›
8
1.2 Character istics of a database
Click to edit Master title style
Listed belowar e some of the character istic f eatur esof a database.
1.Self - descr ibing natur e of a database system
● A database system isr ef er r ed to asself - descr ibing because it not only containsthe database itself ,
but also metadata which definesand descr ibesthe data and r elationshipsbetween tablesin the
database.
● Thisinf or mation isused by the DBMSsof twar e or database user sif needed.
● Thisseparation of data and inf or mation about the data makesa database system totally dif f er ent
f r om the traditional file- based system in which the data definition ispar t of the application
pr ograms.
‹#›
9
1.2 Character istics of a database
Click to edit Master title style
2.I nsulation between pr ogramsand data
● I n the file- based system, the str uctur e of the data filesisdefined in the application pr ogramsso if a
user wantsto change the str uctur e of a file, all the pr ogramsthat accessthat file might need to be
changed aswell.
● On the other hand, in the database appr oach, the data str uctur e isstor ed in the system catalogue
and not in the pr ograms. Ther ef or e, one change isall that isneeded to change the str uctur e of a
file. Thisinsulation between the pr ogramsand data isalso called pr ogram- data independence.
3. Suppor t f or multiple viewsof data
● A database suppor tsmultiple viewsof data.
● A viewisa subset of the database, which isdefined and dedicated f or par ticular user sof the
system.
● Multiple user sin the system might have dif f er ent viewsof the system. Each viewmight contain
only the data of inter est to a user or gr oup of user s. ‹#›
10
1.2 Character istics of a database
Click to edit Master title style
4. Concur r ent Use
● Cur r ent database systems ar e designed f or multiple user s. That is, they allowmany user s to access the
same database at the same time.
● This access is achieved thr ough f eatur es called concur r ency contr ol str ategies. These str ategies ensur e
that the data accessed ar e always cor r ect and that data integr ity is maintained.
● The design of moder n multiuser database systems is a gr eat impr ovement f r om those in the past which
r estr icted usage to one per son at a time.
5. Contr ol of data r edundancy
● I n the database appr oach, ideally, each data item is stor ed in only one place in the database.
● I n some cases, data r edundancy still exists to impr ove system per f or mance, but such r edundancy is
contr olled by application pr ogr amming and kept to minimum by intr oducing as little r edundancy as
possible when designing the database.
‹#›
11
1.2 Character istics of a database
Click to edit Master title style
6. Data shar ing
● The integr ation of all the data, f or an or ganization, within a database system has many advantages.
● Fir st, it allows f or data shar ing among employees and other s who have access to the system.
● Second, it gives user s the ability to gener ate mor e inf or mation f r om a given amount of data than would be
possible without the integr ation.
7. Enf or cement of integr ity constr aints
● Database management systems must pr ovide the ability to define and enf or ce cer tain constr aints to ensur e
that user s enter valid inf or mation and maintain data integr ity.
● A database constr aint is a r estr iction or r ule that dictates what can be enter ed or edited in a table such as
a postal code using a cer tain f or mat or adding a valid city in the City field.
● Data integr ity ensur es quality and r eliability of the data in a database system. I t includes the pr otection of
the database f r om unauthor ised access and unauthor ised changes. ‹#›
12
1.2 Character istics of a database
Click to edit Master title style
8. Tr ansaction pr ocessing
● A database management system must include concur r ency contr ol subsystems.
● This f eatur e ensur es that data r emains consistent and valid dur ing tr ansaction pr ocessing even if sever al
user s update the same inf or mation.
9. Restr iction of unauthor ized access
● Not all user s of a database system will have the same accessing pr ivileges.
● For example, one user might have r ead- only access ( i.e., the ability to r ead a file but not make changes) ,
while another might have r ead and wr ite pr ivileges, which is the ability to both r ead and modif y a file.
● For this r eason, a database management system should pr ovide a secur ity subsystem to cr eate and contr ol
dif f er ent types of user accounts and r estr ict unauthor ized access.
‹#›
13
1.2 Character istics of a database
Click to edit Master title style
10. Data independence
● Another advantage of a database management system is howit allows f or data independence.
● I n other wor ds, the system data descr iptions or data descr ibing data ( metadata) ar e separ ated f r om the
application pr ogr ams.
● This is possible because changes to the data str uctur e ar e handled by the database management system
and ar e not embedded in the pr ogr am itself .
11. Data Per sistence
● This means that data in a DBMS is maintained as long as it is not deleted explicitly.
● The lif espan of data in a DBMS must be dir ectly or indir ectly user dependent and not depend on system
f eatur es.
● Once data is stor ed in the system it must not be lost. Changes of a database, which ar e done by a
tr ansaction , ar e per sistent. When a tr ansaction is finished even a system cr ash cannot put the data in
danger. ‹#›
14
1.2 Character istics of a database
Click to edit Master title style
12. Str uctur ed and Descr ibed Data
● Another f eatur e of a database is that the database does not only contain data but also the complete
definition and descr iption of the stor ed data.
● This is metadata which is data about the stor ed data. This include details about the extent, the str uctur e,
the type and the f or mat of all the data and the r elationship between the data.
‹#›
15
1.3 People dealing with databases
Click to edit Master title style
There are several people involved in the design, creation, use and maintenance of a database. Here we discusssome of them.
1.The Database Administrator (DBA)
● Database Administrator (DBA) isa person/ team which definesthe schema and also controlsthe 3 levelsof database. The
DBA createsaccount I Ds and passwords f or the usersto accessthe database.
● DBA isalso responsible f or providing security to the database and allowsonly the authorized usersto access/ modif y the
data base. DBA also monitorsthe recovery and back up and provide technical suppor t .
● The DBA hasa DBA account in the DBMS which iscalled a system or super- user account.
DBA repairsdamage caused due to hardware and/ or sof tware f ailures.
‹#›
16
1.3 People dealing with databases
Click to edit Master title style
1.The Database Administrator (DBA)
Listed belowar e some the r esponsibilitiesof the DBA.
a) Design of the conceptual and physical schemas
– The DBA isr esponsible f or interacting with the user sof the system to
under stand the data stor ed in the DBMSand howit isto be used.
● S/ he cr eateswr itesa set of definitionswhich ar e per manently stor ed in the Data
Dictionar y.
b) Secur ity and Author isation
- The DBA isr esponsible f or ensur ing that unauthor ised data accessisnot
per mitted.
● Dif f er ent typesof accessar e granted to dif f er ent user sof the system to enable
the DBA r egulate which par tsof the database user scan access.
‹#›
17
1.3 People dealing with databases
Click to edit Master title style
1.The Database Administrator (DBA)
Listed belowar e some the r esponsibilitiesof the DBA.
c) Storage str uctur e and Accessmethod definition
- The DBA cr eatesappr opr iate str uctur esand accessmethodsby wr iting a
set of definitionswhich ar e translated by the DDL compiler.
d) Data Availability and Recover y f r om Failur es
- The DBA must take stepsto ensur e that if the system f ails, user scan
continue to accessasmuch of the uncor r upted data aspossible.
- The DBA also wor k to r estor e the database to its consistent state.
‹#›
18
1.3 People dealing with databases
Click to edit Master title style
1.The Database Administrator (DBA)
e) Database Tuning
– The DBA isr esponsible f or modif ying the database to ensur e adequate
per f or mance asr equir ements.
f ) I ntegr ity Constraint Specification
● The integr ity constraintsar e kept in a special system str uctur e that isconsulted by
the DBA whenever an update takesplace in the system.
‹#›
19
1.3 People dealing with databases
Click to edit Master title style
2.End Users
These ar e people who wish to stor e and use data in the database. They ar e people whose j obsof ten
r equir e accessto the database f or quer ying, updating and generating r epor ts. These include:
a) Casual User s/ Temporar y User s:
√ Casual User sar e the user swho occasionally use/ accessthe database but each time when they
accessthe database they r equir e the newinf or mation possibly added. Example, Middle or higher
level manager s.
b) Naive / Parametr ic End User s:
√ Parametr ic End User sar e the unsophisticated user swho don’t have any DBMSknowledge but they
f r equently use the data base applicationsin their daily lif e to get the desir ed r esults.
Example: Railway’sticket booking user sand Cler ksin any bank ar e naive user sbecause they don’t
have any DBMSknowledge but they still use the database and per f or m their given tasks.
‹#›
20
1.3 People dealing with databases
Click to edit Master title style
2.End Users
c) Sophisticated User s:
√ Sophisticated user scan be engineer s, scientists, businessanalyst, who ar e f amiliar with the
database.
√ They can develop their own database applicationsaccor ding to their r equir ements.
√ They don’t wr ite the pr ogram code but they interact with the database by wr iting SQL quer ies
dir ectly thr ough the quer y pr ocessor.
3.Data Base Designers :
√ Data Base Designer sar e the user swho design the str uctur e of data base which includestables,
indexes, views, constraints, tr igger s, stor ed pr ocedur es.
√ They contr ol what data must be stor ed and howthe data itemsmust be r elated .
‹#›
21
1.3 People dealing with databases
Click to edit Master title style
4.System Analyst:
√ System Analyst isa user who analysesthe r equir ementsof parametr ic end user s. They check
whether all the r equir ementsof end user sar e satisfied.
5.Application Programmer/ Sof tware Engineers :
√ Application Pr ogrammer sar e the back end pr ogrammer swho wr itesthe code f or the application
pr ograms.
√ They ar e the computer pr of essionals. These pr ogramscould be wr itten in Pr ogramming languages
such asVisual Basic, Developer, C, FORTRAN, COBOL etc. They test, debug, document, and maintain
the specified transactions.
‹#›
22
1.3 People dealing with databases
Click to edit Master title style
6.Workers behind the scene:
a) Database designer sand implementer s
These ar e people who design and implement the DBMSmodulesand inter f acesasa sof twar e package.
b) Tool developer s
These design and implement tools consisting of the packagesf or design, per f or mance monitor ing,
pr ototyping and test data generation.
c) Operator sand maintenance per sonnel
These ar e system administration per sonnel who ar e r esponsible f or the actual r unning and
maintenance of the har dwar e and sof twar e envir onment f or the database system.
‹#›
23
1.4 Database Architecture
Click to edit Master title style
■ A Database Architecture is a representation of DBMSdesign. I t helps to design, develop,
implement, and maintain the database management system.
■ A DBMSarchitecture allows dividing the database system into individual components that
can be independently modified, changed, replaced, and altered. I t also helps to
under stand the components of a database.
■ Database standardization is beneficial in ter ms of f uture growth as the system is
designed to f ollowa specific standard which provide a par ticular ease of use.
■ Fir stly, if a company is to create a newsystem of the same usage, it shall create the
system according to the standards and so making easier to develop.
‹#›
24
1.4 Database Architecture
Click to edit Master title style
■ Secondly, if the company is to create an application sof tware to provide an additional
suppor t to the system, it will be an easy task as standards are already developed and easy to
f ollow. I t would be easy to integrate such an application to the system.
■ Users will be comf or table with the system because a system built on predefined standards is
easy to understand and use compared to understanding, learning and using a new system
altogether, especially if designed and built without f ollowing any standards.
■ Expansion to systems not built on standards is very hard as there is no defined expansion
path to f ollow.
‹#›
25
1.4 Standard Database Architecture
Click to edit Master title style
■ A Standard Architecture called the Three Level Schema is the most popular standard f or
database systems and widely used by enterprises worldwide.
■ I t allows dif f erent users to access the database at dif f erent levels.
■ I t allows database administrators to separate the physical representation of data f rom
users’ views of data.
■ I t allows users to access the data in dif f erent f ormats at the external level, which is stored
in a specific f ormat at the internal level.
■ The Three- level architecture is usef ul in hiding the details of internal systems. The process
if hiding unwanted data to the user is called Data Abstraction.
‹#›
26
1.4 Standard Database Architecture
Click to edit Master title style
■ There are three main levels of data abstraction. The three levels of data abstraction
enf orces Data I ndependence.
■ Data I ndependence means users and data should not directly interact with each other.
The user must be at a dif f erent level and the data at another level.
■ The three levels of data abstraction are:
1. The View Level
2. The Conceptual Level
3. The Physical Level
‹#›
27
1.4 Database Architecture
Click to edit Master title style
‹#›
28
1.4 Database Architecture
Click to edit Master title style
a) View or External Schema/ Level
● An external schema describes the par t of the database which specific user is interested in.
● I t hides the unrelated details of the database f rom the user. There may be a number of
external views f or each database.
● Each external view is defined using an external schema, which consists of definitions of
various types of external record of that specific view.
● An external view is j ust the content of the database as it is seen by some specific par ticular
user. For example, a user f rom the sales depar tment will see only sales related data.
‹#›
29
1.4 Database Architecture
Click to edit Master title style
a) View or External Schema/ Level
Facts about external schema:
● An external level is only related to the data which is viewed by specific end users.
● This level includes some external schemas.
● External schema level is nearest to the user.
● The external schema describes the segment of the database which is needed f or a cer tain
user group and hides the remaining details f rom the database f rom the specific user group.
‹#›
30
1.4 Database Architecture
Click to edit Master title style
b) Conceptual Schema/ Level
● The conceptual schema describes the database structure of the whole database f or the
community of users.
● This schema hides inf ormation about the physical storage structures and f ocuses on
describing data types, entities, relationships, etc.
● This logical level comes between the user level and physical storage view. However, there is
only single conceptual view of a single database.
‹#›
31
1.4 Database Architecture
Click to edit Master title style
b) Conceptual Schema/ Level
Facts about Conceptual schema:
● Defines all database entities, their attributes, and their relationships.
● Specifies security and integrity inf ormation.
● I n the conceptual level, the data available to a user must be contained in or derivable
f rom the physical level.
‹#›
32
1.4 Database Architecture
Click to edit Master title style
c) I nternal Level/ Schema
● The internal schema defines the physical storage structure of the database.
● The internal schema is a very low- level representation of the entire database.
● I t contains multiple occurrences of multiple types of internal records. I t is also called
“stored record’.
‹#›
33
1.4 Database Architecture
Click to edit Master title style
c) I nternal Level/ Schema
Facts about I nternal schema:
● The internal schema is the lowest level of data abstraction.
● I t helps you to keeps inf ormation about the actual representation of the entire database.
Like the actual storage of the data on the disk in the f orm of records.
● The internal view tells us what data is stored in the database and how.
● I t never deals with the physical devices. I nstead, internal schema views a physical device
as a collection of physical pages.
‹#›
34
Click to edit Master title style
END …
Thank You.
‹#›
35