Professional Documents
Culture Documents
What is Database
Database is a collection of related data and data is a collection of facts and figures
that can be processed to produce information.
Mostly data represents recordable facts. Data aids in producing information, which is
based on facts.
For example, if we have data about marks obtained by all students, we can then
conclude about toppers and average marks.
For example: The college Database organizes the data about the admin, staff, students
and faculty etc.
Using the database, you can easily retrieve, insert, and delete the information.
Some well-known DBMSs are MySQL, Microsoft SQL Server, Microsoft Access, Oracle,
SAP, and others are a very popular commercial database which is used in different
applications.
DBMS gives an abstract view of data File system provides the detail of the data
that hides the details. representation and storage of data.
DBMS provides a good protection It is very difficult to protect a file under the
mechanism. file system.
DBMS contains a wide variety of File system can't efficiently store and
sophisticated techniques to store and retrieve the data.
retrieve the data.
DBMS takes care of Concurrent access In the File system, concurrent access has
of data using some form of locking. many problems like redirecting the file
while other deleting some information or
updating some information.
1. Data Security
The data stored in the flat file(s) can be easily accessible and hence it is not secure.
Example:
Consider an online banking application where we store the account related information of
all customers in flat files. A customer will have access only to his account related details.
However from a flat file, it is difficult to put such constraints. It is a big security issue.
2. Data Redundancy
In this storage model, the same information may get duplicated in two or more files. This
may lead to higher storage and access cost. It also may lead to data inconsistency.
Suppose the same data is repeated in two or more files. If a change is made to data
stored in one file, other files also needs to be change accordingly.
Example: imagine employee details such as firstname, lastname, email-id are stored in
employee_details file and employee_salary file. If a change needs to be made to email-id,
both employee_details file and emplyee_salary file need to be updated otherwise it will
lead to inconsistent data.
4. Program/Data Dependence
In traditional file approach, application programs are closely dependent on the files in
which data is stored. If we make any changes in the physical format of the file(s), like
addition of a data field , etc, all application programs needs to be changed accordingly.
Consequently, for each of the application programs that a programmer writes or
maintains, the programmer must be concerned with data management. There is no
centralized execution of the data management functions. Data management is scattered
among all the application programs.
Example: Consider the banking system. An employee_salary file exists which has details
about the salary of employees. An employee_salary record is described by employee_id,
firstname, lastname, salary_amount.
An application program is available to display all the details about the salary of all
employees. Assume a new data field, the date_of_joining is added to the
employee_salary file. Since the application program depends on the file, it also needs to
be altered.
If the physical format of the employee_salary file for example the field delimiter, record
delimiter, etc. are changed, it necessitates that the application program which depends
on it, also be altered.
5. Lack of Flexibility
The traditional systems are able to retrieve information for predetermined requests for
data. If we need unanticipated data, huge programming effort is needed to make the
information available, provided the information is there in the files. By the time the
information is made available, it may no longer be required or useful.
Example : Consider a personal information system which has the data of all employees.
Now there may be an employee updating his address details in the system and at the
same time, an administrator may be taking a report containing the data of all employees.
This is called concurrent access. Since the employee's address is being updated at the
same time, there is a possibility of the administrator reading an incorrect address.
These difficulties lead to the development of database systems.
Characteristics of DBMS
o It uses a digital repository established on a server to store and manage the
information.
o It can provide a clear and logical view of the process that manipulates data.
o DBMS contains automatic backup and recovery procedures.
o It contains ACID properties which maintain data in a healthy state in case of failure.
o It can reduce the complex relationship between data.
o It is used to support manipulation and processing of data.
o It is used to provide security of data.
o It can view the database from different viewpoints according to the requirements
of the user.
Characteristics
Traditionally, data was organized in file formats. DBMS was a new concept then, and all
the research was done to make it overcome the deficiencies in traditional style of data
management.
A modern DBMS has the following characteristics −
o Real-world entity − A modern DBMS is more realistic and uses real-world entities to
design its architecture. It uses the behavior and attributes too. For example, a
school database may use students as an entity and their age as an attribute.
o Relation-based tables − DBMS allows entities and relations among them to form
tables. A user can understand the architecture of a database just by looking at the
table names.
o Isolation of data and application − A database system is entirely different than its
data. A database is an active entity, whereas data is said to be passive, on which
the database works and organizes. DBMS also stores metadata, which is data about
data, to ease its own process.
o Less redundancy − DBMS follows the rules of normalization, which splits a relation
when any of its attributes is having redundancy in values. Normalization is a
mathematically rich and scientific process that reduces data redundancy.
o Consistency − Consistency is a state where every relation in a database remains
consistent. There exist methods and techniques, which can detect attempt of
leaving database in inconsistent state. A DBMS can provide greater consistency as
compared to earlier forms of data storing applications like file-processing systems.
o Query Language − DBMS is equipped with query language, which makes it more
efficient to retrieve and manipulate data. A user can apply as many and as different
filtering options as required to retrieve a set of data. Traditionally it was not
possible where file-processingsystem was used.
o ACID Properties − DBMS follows the concepts of Atomicity, Consistency, Isolation,
and Durability normally shortened as ACID. These concepts are applied on
transactions, which manipulate data in a database. ACID properties help the
database stay healthy in multi transactional environments and in case of failure.
o Multiuser and Concurrent Access − DBMS supports multi-user environment and
allows them to access and manipulate data in parallel. Though there are
restrictions on transactions when users attempt to handle the same data item, but
users are always unaware of them.
o Multiple views − DBMS offers multiple views for different users. A user who is in the
Sales department will have a different view of database than a person working in
the Production department. This feature enables the users to have a concentrate
view of the database according to their requirements.
o Security − Features like multiple views offer security to some extent where users
are unable to access data of other users and departments. DBMS offers methods to
impose constraints while entering data into the database and retrieving the same
at a later stage. DBMS offers many different levels of security features, which
enables multiple users to have different views with different features. For example,
a user in the Sales department cannot see the data that belongs to the Purchase
department. Additionally, it can also be managed how much data of the Sales
department should be displayed to the user. Since a DBMS is not saved on the disk
as traditional file systems, it is very hard for miscreants to break the code.
Database Users
A typical DBMS has users with different rights and permissions who use it for different
purposes. Some users retrieve data and some back it up. The users of a DBMS can be
broadly categorized as follows −