Search This Blog

Wednesday, 4 January 2023

Introduction to Database Management System

0 comments

Database Management System is a general purpose software used to store and retrieve a collection of interrelated data in a centralized repository called database.  Each database managed by a DBMS can contain information relevant to an enterprise.  For instance, a database that stores information about sales done in an enterprise may contain data about proudcts, customers and the purchase made by them.


DBMS is one of the tools required for developing application software that stores and retrieves enterprise data.  In a client/server environment, DBMS acts as a server (back-end) and the application program as a client (frone-end).  The role of DBMS in application development is to enable the programmer to store and retrieve large volume of data from a database efficiently.

Some of the data management tasks that can be performed with the help of a DBMS are as follows:

  1. Defining the database:  This involves specifying the structure of data to be stored in a database.  This can be done by specifying the data type, width of the data field, constrains to be imposed on data in a database.
  2. Storing and manipulating data in a database: Data can be stored in a database by inserting new data or updating the existing data in a database.  Removal of undesired data can also be done in a database.  Retrieving data already stored in a database can be done by querying the database.
  3. Sharing the database by multiple users:  Sharing allows multiple users to access the data available in a database without any conflict.  Maintaing the consistency of data in a database while sharing is taken care by the DBMS by providing locks on data that are being accessed and updated by multiple users in a multi-user environment.
  4. Protecting the database:  Protection of database includes system protection against hardware and software malfunction (or crashes) and security protection against unauthorized or malicious access of data from a database.  Ensuring consistency of data even after a system crash is managed through backup and recovery system of the DBMS.
Some of the applications that uses databases managed by a DBMS are given below:
  1. Automated Teller Machine (ATM) or Online Banking for money transaction
  2. Online Reservation system for scheduling and reserving tickets for a travel
  3. University or College ERP for registering and pursuing a course of choice 
  4. Online Book store for searching and buying books online

File System and Database System

Prior to the introduction of Database System, data were stored in files maintained by the Operating System.  One or more application programs process the data stored in files to produce required information.  

For instance, in a banking application, data about the customers and their savings accounts are stored in files so that the following operations can be done using the data at a later stage:

  1. Debit or credit some amount with an account
  2. Finding the balance of an account
  3. Generate monthly statements of accounts
In a file-processing system, data are stored in one or more files.  It is the duty of the application program that accesses those files to define the structure of data to be stored in the file and to manage the file.  Following are some of the disadvantages of file systems that can be overcome by the database system:
  • Data stored in file systems might be redundant and inconsistent
  • Related data are isolated from each other by storing them in different files and locations
  • Maintaing integrity of data has to be done at program level
  • Automicity of data are not easy to be managed in file system
  • Consistency of data may not be possible in a multi-user environment

Data Redundancy and Inconsistency:

Storing data of an enterprise in flat files may result in data redundancy, i.e., the same information may be stored in multiple files.  For instance, when two different files are used for storing the details of Savings Account and Current Account of a customer, the address and phone number of that customer might be stored in both files.

In addition, data redundancy may lead to data inconsistency; i.e., the various copies of the same data may differ from each other.  For instance, a change in the customer address may be reflected in one file but not elsewhere.

Data Isolation:

Data belong to an enterprise are stored in multiple files and each file may store the data in different formats.  This makes it difficult to retrieve the appropriate data in a convenient and efficient manner.

Integrity Problems:

Integrity of data stored in a file is maintained by enforcing certain types of consistency constraints at the code level.  For instance, maintaining non-negative balance of a bank account or having unique values in certain fields such as Account Number are enforced by the programmer through code.  On the other hand, database systems provide the mechanism for enforcing such constraints at the database level itself.  Hence, data integrity is maintained at the database in database systems.

Automicity Problems:

Automicity refers to the consistency of data even after a failure that can occur during the storage and retrieval of data from a storage device.  It is difficult to achieve automicity if the data are stored in a file.  But, this is possible by ensuring that the changes made to a file must happen in its entirety or should not happen at all in a database through transaction control mechanism.

Concurrent-access Anomolies:

Concurrent access of data refers to accessing the data stored in a repository by multiple users at a time.  When a file is being accessed by multiple users for storage and retrieval, it may lead to the inconsistency of data when more than one user wants to modify the data at a time.

Managing the consistency of data in a file-system is diffcult as it doesn't provide the lock necessary to impose on data to ensure the integrity of data when accessed by multiple users.  On the other hand, database systems provide the necessary locks on records being accessed by multiple users. 

Leave a Reply