Documente Academic
Documente Profesional
Documente Cultură
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.
By Imran Shaikh
By Imran Shaikh
By Imran Shaikh
By Imran Shaikh
By Imran Shaikh
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 leprocessing 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.
By Imran Shaikh
Application of database
1.
2.
3.
4.
5.
6.
7.
8.
Banking:
Airlines:
Universities:
Credit card transactions:
Telecommunication:
Finance:
Sales:
Manufacturing:
By Imran Shaikh
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:
In relational model, a row is called as tuple.
Attribute: A column header is called as an attribute.
Degree:
The degree of relation is number of attributes of the table.
Domain:
All permissible values of attributes is called as a domain.
Cardinality: Number of rows in the table is called as cardinality
By Imran Shaikh
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.
By Imran Shaikh
By Imran Shaikh
RDMS Software
Oracle
MySQL
SQL Server
By Imran Shaikh
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.
By Imran Shaikh
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
select command
DML : Data Manipulation Language
DML commands deal with instances of the database.
DML commands are used to insert, update and delete the actual data of database.
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.
Data Independence
It is the property of the database which tries to ensure that if we make any change in any
level of schema of the database, the schema immediately above it would require minimal
or no need of change.
What does this mean? We know that in a building, each floor stands on the floor below it.
If we change the design of any one floor, e.g. extending the width of a room by
demolishing the western wall of that room, it is likely that the design in the above floors
will have to be changed also. As a result, one change needed in one particular floor would
mean continuing to change the design of each floor until we reach the top floor, with an
increase in the time, cost and labour. Would not life be easy if the change could be
contained in one floor only? Data independence is the answer for this. It removes the
need for additional amount of work needed in adopting the single change into all the
levels above.
By Imran Shaikh
2 ) Storage Manager
4) Database Users
Data dictionary which stores metadata about the structure of the database,
in particular the schema of the database
Indices
By Imran Shaikh
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.
By Imran Shaikh
By Imran Shaikh
Fig.
Overall Structure of
DBMS
By Imran Shaikh
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)
By Imran Shaikh
By Imran Shaikh
Two-tier architecture: E.g. client programs using ODBC/JDBC to communicate with a database.
Three-tier architecture: E.g. web-based applications, and applications built using middleware.
By Imran Shaikh
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, instead of being
distributed across multiple clients. Three-tier applications are more appropriate for
large applications, and for applications that run on the World Wide Web.
By Imran Shaikh
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
Account
Section
DDBMS
By Imran Shaikh
Student
Personal
Data
Exam
Section
Student
Result
Analysis
Student
Fees
Record
By Imran Shaikh
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 in this case, makes the data warehouse subject oriented.
By Imran Shaikh
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.
By Imran Shaikh
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 organization of
database.
By Imran Shaikh
By Imran Shaikh