Database Management Systems




Introduction


Data:
Data are the raw facts that can be obtained after some experiments or observations. Raw data is of no use until and unless we process it to find some useful information form it.

Database:
A database is the collection of related persistent data and contains information relevant to an enterprise. The database is also called the repository or container for a collection of data files. For example, university database for maintaining information about students, courses and grades in university

Database Management System:
Management of data involves a way to store data and also provides a mechanism for manipulation of that data. Database management systems are basically designed to manage large volume of information.
A database system is basically just a computerized record-keeping system. A database system involves four major components: data, hardware, software, and users. The database management system (DBMS) is the software that handles all access to the database. It is defined as the collection of interrelated data and a set of programs to access those data. The primary goal of DBMS is to store and retrieve data in both convenient (easy method) and efficient (capable of performing well) manner. Some of the examples of DBMS are Oracle, SQL-Server, MySQL, MS Access etc.

Applications of DBMS:

· Banking:
To store information about customers, their account number, balance etc.
· Airlines:
For reservations and schedule information.
· Telecommunication:
To keep records of customers, call made, balance left, generating monthly bills etc.
· Universities:
To keep records of students, courses, marks of students etc.
· Sales:
To keep information of customers, products list, purchase information etc.
· Manufacturing:
To store orders, tracking production of items etc.
· Human Resources:
To keep records of employee, their salary, bonus etc.

Characteristics of database approach:
The main characteristics of database approach are discussed below:
1. Self describing nature of database system:
The fundamental characteristic of the database approach is that the database system contains not only the database itself but also complete definition or description of the database structure. This definition is stored in the DBMS catalog which contains the information such as the structure of each file, the type and storage format of each data item. Eg.

2. Insulation between programs and data :
In traditional file processing system, the structure of data file is embedded in the application program. Hence if we have to make any changes in the format of the data, the whole application program will also have to be changed. But in the case of DBMS, database and the application program are separately situated. The structure of data files is stored in the DBMS catalog separately from the access programs. Hence in most cases DBMS access programs do not need such changes. We call this property as program-data independence.
For example, a file access program may be written in such a way that it can just access the name of a customer of any company but if we want to add another field, say, address of the customer, then in such a case this program will no longer be useful. But in the case of the DBMS, we just have to add the new field “address” in the catalog and the next time DBMS refers to the catalog, the new structure of the records will be accessed and hence we do not have to make change in the program.

3. Support of multiple view of the data:
Let us consider an example of student information system of a college, where all the data of student, courses, information of college etc are stored in a database. It is obvious that there is more than one user of this system and also their interest is different. i.e. student are generally interested in finding out the marks obtained, whereas teachers are able to put marks, view information about students, similarly, visitors are able to find the information of the college.
A database typically has many users, and their perspective of viewing the database is different. In the example given above, every user is accessing data from the same database but what they see and can access is different. A view may be subset of the database or it may contain virtual data that is derived from the database files but is not stored explicitly.

4. Sharing of data and multi user transaction processing:
Database system should allow multiple users to access same database at the same time. For example, in online air ticket reservation system many users are accessing the same site at the same time. Hence for every seat, DBMS should ensure that only one user should be given access to reserve the seat.
Hence to ensure the correctness of this type of transaction DBMS must include concurrency control software to ensure that several users trying to update same data do so in a controlled manner so that the result of the updates is correct. In order to do so, DBMS uses lock based protocol and time stamp based protocol.

Purpose of Database System:
Traditionally, file processing system was used to manage information. It stores data in various files of different application programs to extract or insert data to appropriate file. File processing system has several drawbacks due to which database management system is required. Database management system removes problems found in file processing system. Some of the major problems of file processing systems are:
1. Data redundancy and inconsistency:
In file processing system, different programmer creates files and writes application programs to access it. After a long period of time files may exist with different formats and application programs may be written in many different programming languages. Moreover, same information may be duplicated in several files. We have to pay for higher storage and access cost for such redundancy. It may leads database in inconsistent state because update made may be reflected in one file but it may not be reflected in another files where same information exist in another files.

2. Difficulty in accessing data:
In file processing system, we can not easily access required data stored in particular file.
For each new task we have to write a new application program. File processing system can not allow data to be retrieve in convenient and efficient manner.

3. Integrity problem:
In database, we required to enforce certain type consistency constraints to ensure the database correctness or to enforce certain business rules. It is in fact called integrity constraints (e.g. account balance > 0), integrity of database need not to be violated. In file processing system, integrity constraint becomes the part of application program. Programmer need to write appropriate code to enforce it. When new constraints are required to add or change existing one, it is difficult to change program to enforce it.

4. Atomicity problem:
Failures may lead database in an inconsistent state with partial updates. For example, failure occurs while transferring fund from account A to B. There would be the case that certain amount from account A is retrieved and it is updated but failure occurs just before it is deposited to account B, such case may lead database in inconsistent state.

5. Concurrent access problem:
Concurrent accessed increase the overall performance of system providing fast response time but uncontrolled concurrent accesses can lead inconsistencies in system. File processing system allow concurrent access but it is unable to coordinate different application programs so database may lead in inconsistent state. E.g. two people reading a balance and updating it at the same time.

6. Security problem:
Since file processing system consist large no. of application programs and it is added in ad hoc manner. So it is difficult to enforce security to each application to allow accessing only part of data/database for individual database users.


Download the pdf file to get all the unit wise notes.
Try to save your valueable time!