Relational Database Management System (17332) : Theory Paper: 100 Marks Term Work: 50 Marks Sessional: 10 Marks
Relational Database Management System (17332) : Theory Paper: 100 Marks Term Work: 50 Marks Sessional: 10 Marks
REFERENCE BOOKS
Database System Concepts (4th Edition)
Author : Silberschatz, Korth, Sudarshan
DBMS
A database management system (DBMS) is a
collection of related data and programs that
enables users to create and maintain a database.
The DBMS is a general-purpose software system
that facilitates the processes of defining,
constructing, manipulating, and sharing databases
among various users and applications.
Atomicity Problem
In many applications, it is crucial that, if a failure occurs, the data be
restored to the consistent state that existed prior to the failure. It is difficult
to ensure atomicity in a conventional le-processing system.
Integrity problems
Data may need to satisfy certain conditions, called consistency constraints .
for example: account balances should never fall below $0 .
difficult to enforce/add/change such consistency constraints in a file
processing system.
Security Problems
Not all users have access permission to all type of data , but enforcing such
restrictions in FPS is difficult.
Application of database
1.
2.
3.
4.
5.
6.
7.
8.
Banking:
Airlines:
Universities:
Credit card transactions:
Telecommunication:
Finance:
Sales:
Manufacturing:
Introduction to RDMS
A DBMS that is based on relational model is called as RDBMS. RDBMS
Designed by E.F. Codd.
The relational model uses a collection of tables to represent both data and
the relationships among those data. Each table has multiple columns, and
each column has a unique name.
A table is a two dimensional array containing rows and columns. Each row
contains data related to an entity such as a student. Each column contains
the data related to a single attribute of the entity such as student name.
Basic Concepts of RDBMS are as follows
Tuple:
Attribute:
Degree:
Domain:
Cardinality:
Figure 1 shows how data is represented in relational model and what are the
terms used to refer to various components of a table. The following are the
terms used in relational model.
RDMS Software
Oracle
MySQL
SQL Server
Data Abstraction
Hiding Database Design complexities from users (which are not computer
professionals) is nothing but known as Data Abstraction.
Data Abstraction feature provide easy way to retrieve data, from database.
There are three levels of abstraction.
Physical level :
Hiding the detail about how the data is stored actually and where it is
stored in database from user is known as physical level abstraction.
The physical level describes complex low-level data structures in detail.
Logical level :
Hiding the detail about what data are stored in the database, and what
relationships exist among those data from user is known as logical level
abstraction.
The logical level describes simple data structures in detail.
View level
The view level of abstraction exists to simplify their interaction with the
system. The system may provide many views for the same database,
may they need to access only a part of the database.
Views can also hide information (e.g., salary) for security purposes.
Database Languages
DDL :
DQL :
DML :
select command
Data Manipulation Language
Instances
Information store in database at a particular point of time is known as Instance in
database.
Instances are not stable in nature and can be change frequently.
Instances denote the rows of table in RDBMS and represent the actual data of the
database.
We can add new instance in database by using insert command.
Data Independence
Storage Manager
Authorization and integrity manager
which tests for the satisfaction of integrity
constraints and checks the authority of users to access data.
Transaction manager,
which ensures that the database remains in a
consistent (correct) state despite system failures, and that concurrent
transaction executions proceed without conflicting.
File manager
which manages the allocation of space on disk
storage and the data structures used to represent information stored on
disk.
Buffer manager
which is responsible for fetching data from disk
storage into main memory, and deciding what data to cache in main
memory.
Fig.
Overall Structure
of DBMS
Database Users
Naive users
invoke one of the permanent application programs that have been written
previously.
E.g. people accessing database over the web, bank tellers, clerical staff
Application programmers
interact with system through DML calls.
Responsible to write application programs using DML commands.
Sophisticated users
form requests in a database query language.
Responsible to search required data from database (Data Mining)
Two-tier architecture
In a two-tier architecture, the application is partitioned into a
component that resides at the client machine, which invokes
database system functionality at the server machine through
query language statements. Application program interface
standards like ODBC and JDBC are used for interaction between the
client and the server.
Three-tier architecture
In contrast, in a three-tier architecture, the client machine acts as
merely a front
end and does not contain any direct database calls. Instead, the
client end communicates with an application server, usually
through a forms interface. The application server in turn
communicates with a database system to access data. The
business logic of the application, which says what actions to carry
out under what conditions, is embedded in the application server,
Distributed
Database
We can classify
database
into
two
categories as follows
Centralized Database :
The data reside in one single
location.
Distributed Database :
The data is distributed over
multiple locations.
Distributed Database
A distributed database is a
collection of partially independent
databases that (ideally) share a
common schema, and coordinate
processing
of transactions that
access nonlocal data. The processors
communicate with one another
through a communication network
that handles routing and connection
strategies.
Admission
Section
DDBM
S
Student
Personal
Data
Account
Section
Exam
Section
Student
Result
Analysis
Fig. Distributed
Database
Student
Fees
Record
DATA WAREHOUSE
Definition
A data warehouse is Integrated, Subject oriented, Time-variant,
Nonvolatile collection of data in support of management's decision making
process.
Integrated
Data warehouses must put data from disparate sources into a
consistent format. They must resolve such problems as naming
conflicts and inconsistencies among units of measure. When they
achieve this, they are said to be integrated.
Subject Oriented
Data warehouses are designed to help you analyze data. For example,
to learn more about your company's sales data, you can build a
warehouse that concentrates on sales. Using this warehouse, you can
answer questions like "Who was our best salesman for this item last
year?" This ability to define a data warehouse by subject matter, sales
Nonvolatile
Nonvolatile means that, once entered into the warehouse, data should
not change. This is logical because the purpose of a warehouse is to
enable you to analyze what has occurred previously.
Time Variant
In order to discover trends in business, analysts need large amounts of
historical data. So it is necessary to put data into warehouse time by
time.
DATA MINING
Data mining (knowledge discovery in databases): Extraction of
interesting (non-trivial, implicit, previously unknown and potentially
useful) information or patterns from data in large databases.
Data Independence
Data independence, which can be defined as the capacity to change the
schema at one level of a database system without having to change the
schema at the next higher level .
There are two types of data independence present
Logical data independence
Logical data independence is the capacity to change the conceptual
schema without having to change external schemas or application
programs.
Example : change in constraint at logical level should not affect the
application programs.
Physical data independence
Physical data independence is the capacity to change the internal
schema without having to change the conceptual schema. Hence, the
external schemas need not be changed as well.
Example: if physical files are reorganized , it should not affect logical
DCL :