You are on page 1of 23

Department of Computer Science and Engineering (CSE)

Database
Management
System

Course Outcome  Will be civered in


CO Title Level this lecture
Number
CO1 To perceive the significance and Remember
implementation of a commercial  
relational database system (Oracle)
by writing SQL using the system.
CO2 To understand the relational database Understand
theory, and be able to write
relational algebra expressions for
queries
CO3 To identify the basic issues of Analysis and
transaction processing and applicatin
concurrency control and find out its
solutions.

2
Department of Computer Science and Engineering (CSE)
Contents of the Syllabus

UNIT-I [10h]
Overview of Databases: Database concepts, DBMS, Data Base System Architecture (Three
Level ANSI-SPARC Architecture), Advantages and Disadvantages of DBMS, Data Independence,
DBA and Responsibilities of DBA, Relational Data Structure, Keys, Relations, Attributes, Schema and
Instances, Referential integrity, Entity integrity.
Data Models: Relational Model, Network Model, Hierarchical Model, ER Model: Design,
issues, Mapping constraints, ER diagram, Comparison of Models.
Relational Algebra & Relational Calculus: Introduction, Syntax, Semantics, Additional
operators, Grouping and Ungrouping, Relational comparisons, Tuple Calculus, Domain Calculus,
Calculus Vs Algebra, Computational capabilities.

UNIT-II [10h]
Functional dependencies and Normalization: Functional dependencies, Decomposition, Full
Functional Dependency (FFD), Transitive Dependency (TD), Join Dependency (JD), Multi-valued
Dependency (MVD), Normal Forms (1NF, 2NF, 3NF, BCNF), De-normalization.
Database Security: Introduction, Threats, Counter Measures.
Control Structures: Introduction to conditional control, Iterative control and sequential control
statements, Cursors, Views.

3
Department of Computer Science and Engineering (CSE)
Contents of the Syllabus

UNIT-III [10h]
Package, Procedures and Triggers: Parts of procedures, Parameter modes, Advantages of
procedures, Syntax for creating triggers, Types of triggers, package specification and package body,
developing a package, Bodiless package, Advantages of packages.
Transaction Management and Concurrency Control: Introduction to Transaction Processing,
Properties of Transactions, Serializability and Recoverability, Need for Concurrency Control, Locking
Techniques, Time Stamping Methods, Optimistic Techniques and Granularity of Data items.

Database Recovery of database: Introduction, Need for Recovery, Types of errors,


Recovery Techniques.

4
Department of Computer Science and Engineering (CSE)

Overview of Databases
ANSI-SPARC
Architecture

University Institute of Engineering 1


Department of Computer Science and Engineering (CSE)

OBJECTIVE
At the completionS
of this Chapter , students should be
able
to do the following:
• Understand DBMS Architecture
• Appreciate the evolution of ANSI SPARC (3 level
architecture)

University Institute of Engineering


Department of Computer Science and Engineering (CSE)

Introductio
n ANSI
American National Standards Institute
SPARC
Standards Planning And Requirements Committee

• It is an abstract design standard for a Database


Management System (DBMS), first proposed in 1975.

University Institute of Engineering


Department of Computer Science and Engineering (CSE)

University Institute of Engineering


Department of Computer Science and Engineering (CSE)

Three-level
architecture
• External level
• Conceptual level
• Internal level
• The Three Level Architecture has the aim of enabling users to
access the same data but with a personalized view of it. The
distancing of the internal level from the external level
means that users do not need to know how the data is
physically stored in the database. This level separation also
allows the Database Administrator (DBA) to change the
database storage structures without affecting the users'
views.

University Institute of Engineering


Department of Computer Science and Engineering (CSE)

Three-level
• architecture
External Level (User Views): A user's view of the database describes a part
of the database that is relevant to a particular user. It excludes irrelevant
data as well as data which the user is not authorized to access.
• Conceptual Level: The conceptual level is a way of describing what data
is stored within the whole database and how the data is inter-related.
The conceptual level does not specify how the data is physically stored.
Some important facts about this level are:
• DBA works at this level. • Only DBA can define this level.
• Global view of database.
• Describes the structure of all
• Independent of hardware and
users.
software.

• Internal Level: The internal level involves how the database is physically
represented on the computer system. It describes how the data is
actually stored in the database and on the computer hardware.

University Institute of Engineering


Department of Computer Science and Engineering (CSE)

Objective of the three-level


architecture
• It allows independent customized user views: Each user
should be able to access the same data, but have a different
customized view of the data. These should be independent:
changes to one view should not affect others.
• It hides the physical storage details from users: Users
should not have to deal with physical database storage
details.
• The database administrator should be able to change the
database storage structures without affecting the users’
views.
• The internal structure of the database should be unaffected
by changes to the physical aspects of the storage: For
example, a changeover to a new disk.
University Institute of Engineering
Department of Computer Science and Engineering (CSE)

Database
schemas
There are three different types of schema corresponding to the three levels
in the ANSI-SPARC architecture.
Schema is the structure of the database that defines the objects in the database
• The external schemas describe the different external views of the
data and there may be many external schemas for a given
database.
• The conceptual schema describes all the data items and
relationships between them, together with integrity constraints
(later). There is only one conceptual schema per database.
• The internal schema at the lowest level contains definitions of
the stored records, the methods of representation, the data
fields, and indexes. There is only one internal schema per
database.
• The overall description of a database is called the database
University Institute of Engineering
Department of Computer Science and Engineering (CSE)

The way
users
perceive
the
data.

The way the


DBMS and OS
perceive the data.

University Institute of Engineering


Department of Computer Science and Engineering (CSE)

Mapping between
• views
Three view-levels are described by means of three schemas.
• These schemas are stored in the data dictionary.
• In DBMS, each user refers only to its own external schema.
• Hence, the DBMS must transform a request on. a specified external
schema into a request against conceptual schema, and then into a
request against internal schema to store and retrieve data to and
from the database.
• The process to convert a request (from external level) and the result
between view levels is called mapping.
• The mapping defines the correspondence between three view
levels.
• The mapping description is also stored in data dictionary.
• The DBMS is responsible for mapping between these three types of
schemas.
University Institute of Engineering
Department of Computer Science and Engineering (CSE)

Mapping between
There are two types of mapping.
(i) External-Conceptualviews
mapping
• An external-conceptual mapping defines the correspondence between a
particular
external view and the conceptual view.
• The external-conceptual mapping tells the DBMS which objects on the conceptual
level correspond to the objects requested on a particular user's external view.
• If changes are made to either an external view or conceptual view, then mapping
must be changed accordingly.
(ii) Conceptual-Internal mapping
• The conceptual-internal mapping defines the correspondence between the
conceptual view and the internal view, i.e. database stored on the physical
storage device.
• It describes how conceptual records are stored and retrieved to and from the
storage device.
• This means that conceptual-internal mapping tells the DBMS that how
the conceptual! records are physically represented.
• If the structure of the stored database is changed, then the mapping must be
changed accordingly.
University Institute of Engineering
Department of Computer Science and Engineering (CSE)
Exampl
e

University Institute of Engineering


Department of Computer Science and Engineering (CSE)

Data
• The ability to Independence
modify a scheme definition in one level without
affecting a scheme definition in a higher level is called data
independence.
There are two kinds:
• Logical data independence
• Physical data independence

University Institute of Engineering


Department of Computer Science and Engineering (CSE)

Data
Independence
Logical data independence
• The ability to modify the conceptual scheme without causing application
programs to be rewritten.
• Immunity of external schemas to changes in the conceptual schema.
• Usually done when logical structure of database is altered.
• The change would be absorbed by mapping between external
and conceptual levels.
Physical data independence
• The ability to modify the internal scheme or physical storage structures
and devices without affecting conceptual or external schemas .
• Modifications at this level are usually to improve performance.

Logical data independence is difficult to achieve than physical


data independence.

University Institute of Engineering


Department of Computer Science and Engineering (CSE)

Database Administrator
(DBA)
• A database administrator (DBA) is an IT professional
responsible for the installation, configuration, upgrading,
administration, monitoring, maintenance, and security of
databases in an organization.

University Institute of Engineering


Department of Computer Science and Engineering (CSE)

Responsibilities of
DBA
Makes decisions concerning the content of the database.
 Identify the entities of interest to the enterprise and to
identify
information to be recorded about those entities
Plans storage structures and access strategies.
 How the data is to be represented in the database.
 Specify the representation by writing the storage structure definition
(using the internal data definition language).
 The associated mapping between the storage structure definition and
the conceptual schema must also be specified.
Provides support to users.
 Ensure that the data users require is available, and to write
the necessary external schemas.
 The mapping between any given eA1ernal schema and the conceptual'
schema must also be specified.
University Institute of Engineering
Department of Computer Science and Engineering (CSE)

Responsibilities of
DBAsecurity and integrity checks.
Defines
 Providing the authorization and authentication checks such that
no
malicious users can access database and it must remain protected.
 DBA must also ensure the integrity of the database.
Interprets backup and recovery strategies.
 Define and implement an appropriate recovery strategy to recover
he
database from all types of failures.
Monitoring performance and responding to changes in requirements.
 DBA is responsible for so organizing the system as to get the performance
that is "best for the enterprise," and for making the appropriate
adjustments as requirements change.

University Institute of Engineering


Department of Computer Science and Engineering (CSE)

Outcome
s
• Analyze an information storage problem and derive an
information model expressed in the form of an entity
relation diagram and other optional analysis forms, such as a
data dictionary.
• Demonstrate an understanding of the relational data model.
• Appreciate the roles & responsibilities of DBA.

University Institute of Engineering


Department of Computer Science and Engineering (CSE)

Reference
s
• Database System Concepts by Abraham
Silberschatz (McGraw-
• Database System Concepts by Sudarshan, Hill
• Korth Education) of Database System By Elmasari
Fundamentals
&Navathe- Pearson Education
• http://ecomputernotes.com/database-system/rdbms
• https://www.tutorialspoint.com/sql/sql-rdbms-concepts.htm
• https://www.studytonight.com/dbms/rdbms-concept

University Institute of Engineering


Department of Computer Science and Engineering (CSE)

University Institute of Engineering

You might also like