Database Systems
Database Systems
Database Systems
Introduction
mywbut.com
Introduction
What is a Database? A collection of related pieces of data: Representing/capturing the information about a real-world enterprise or part of an enterprise. Collected and maintained to serve specific data management needs of the enterprise. Activities of the enterprise are supported by the database and continually update the database.
mywbut.com
An Example
University Database: Data about students, faculty, courses, researchlaboratories, course registration/enrollment etc. Reflects the state of affairs of the academic aspects of the university. Purpose: To keep an accurate track of the academic activities of the university.
mywbut.com
mywbut.com
mywbut.com
DBMS Approach
DBMS separation of data and metadata flexibility of changing metadata program-data independence Data access language standardized SQL ad-hoc query formulation easy System development less effort required concentration on logical level design is enough components to organize data storage process queries, manage concurrent access, recovery from failures, manage access control are all available
mywbut.com 6
Data Model
Collection of conceptual tools to describe the database at a certain level of abstraction. Conceptual Data Model a high level description useful for requirements understanding. Representational Data Model describing the logical representation of data without giving details of physical representation. Physical Data Model description giving details about record formats, file structures etc.
mywbut.com
SName
RollNumber
JoiningYear
BirthDate
ed ributes
V1
V2
VL
V3
Vm
Set of views
LL mapping
LDI
R1
LL
R2
Rn
Set of relations
PL mapping F2 Fp
PDI
Data: set of files/index files
F1
mywbut.com
11
Three-schema Architecture(1/2)
View Level Schema Each view describes an aspect of the database relevant to a particular group of users. For instance, in the context of a library database: Books Purchase Section Issue/Returns Management Section Users Management Section Each section views/uses a portion of the entire data. Views can be set up for each section of users.
mywbut.com
12
Three-schema Architecture(2/2)
Logical Level Schema Describes the logical structure of the entire database. No physical level details are given. Physical Level Schema Describes the physical structure of data in terms of record formats, file structures, indexes etc. Remarks Views are optional - Can be set up if the DB system is very large and if
easily identifiable user-groups exist
The logical scheme is essential Modern RDBMSs hide details of the physical layer
mywbut.com 13
mywbut.com
14
mywbut.com
15
mywbut.com
16
mywbut.com
17
Query optimizer
Buffer Manager
Recovery Manager
Log
Disk Storage
mywbut.com
18
mywbut.com
19
mywbut.com
21
mywbut.com
23