Dbms Unit1 Notes Part1
Dbms Unit1 Notes Part1
insertion and deletion of data from database and organizes the data in the form of tables, views,
schemas, reports etc. For Example, university database organizes the data about students, faculty,
and admin staff etc. which helps in efficient retrieval, insertion and deletion of data from it.
The database management system (DBMS) is the software that interacts with end users,
applications, and the database itself to capture and analyze the data.
A DBMS is a software that allows creation, definition and manipulation of database, allowing
users to store, process and analyse data easily. DBMS provides us with an interface or a tool, to
perform various operations like creating database, storing data in it, updating data, creating tables
in the database and a lot more.DBMS also provides protection and security to the databases. It
also maintains data consistency in case of multiple users.
Here are some examples of popular DBMS used these days:
MySql
Oracle
SQL Server
IBM DB2
PostgreSQL
Applications of DBMS
There are various fields where a database management system is used. Following are
some applications which make use of the database management system:
1. Railway Reservation System: In the railway reservation system, the database is required
to store the record or data of ticket bookings, status about train’s arrival, and departure. Also
if trains get late, people get to know it through database update.
2. Library Management System: There are lots of books in the library so; it is tough to
store the record of all the books in a register or copy. So, the database management system
(DBMS) is used to maintain all the information related to the name of the book, issue date,
availability of the book, and its author.
3. Banking: Database management system is used to store the transaction information of the
customer in the database.
4. Education Sector: Presently, examinations are conducted online by many colleges and
universities. They manage all examination data through the database management system
(DBMS). Inspite that student’s registrations details, grades, courses, fee, attendance, results,
etc. all the information is stored in the database.
5. Credit card transactions: Database Management system is used for purchasing on credit
cards and generation of monthly statements.
6. Social Media Sites: We all use of social media websites to connect with friends and to
share our views with the world. Daily, millions of peoples sign up for these social media
accounts like Pinterest, Facebook, Twitter, and Google plus. By the use of the database
management system, all the information of users are stored in the database and, we become
able to connect with other people.
7. Telecommunications: Without DBMS any telecommunication company can’t think. The
Database management system is necessary for these companies to store the call details and
monthly postpaid bills in the database.
8. Finance: The database management system is used for storing information about sales,
holding and purchases of financial instruments such as stocks and bonds in a database.
9. Online Shopping: These days, online shopping has become a big trend. No one wants to
visit the shop and waste their time. Everyone wants to shop through online shopping websites
(such as Amazon, Flipkart, snapdeal) from home. So all the products are sold and added only
with the help of the database management system (DBMS). Invoice bills, payments, purchase
information all of these are done with the help of DBMS.
10. Human Resource Management: Big firms or companies have many workers or
employees working under them. They store information about employee’s salary, tax, and
work with the help of database management system (DBMS).
11. Manufacturing: Manufacturing companies make different types of products and sale
them on a daily basis. In order to keep the information about their products like bills,
purchase of the product, quantity, supply chain management, database management system
(DBMS) is used.
12. Airline Reservation System: This system is the same as the railway reservation system.
This system also uses a database management system to store the records of flights departure,
arrival, and delay status.
Data Definition
The DBMS provides functions to define the structure of the data in the application. These
include defining and modifying the record structure, the type and size of fields and the various
constraints/conditions to be satisfied by the data in each field.
Data Manipulation
Once the data structure is defined, data needs to be inserted, modified or deleted. The functions
which perform these operations are also part of the DBMS. These function can handle planned
and unplanned data manipulation needs. Planned queries are those which form part of the
application. Unplanned queries are ad-hoc queries which are performed on a need basis.
The DBMS contains functions which handle the security and integrity of data in the application.
These can be easily invoked by the application and hence the application programmer need not
code these functions in his/her programs.
Recovery of data after a system failure and concurrent access of records by multiple users are
also handled by the DBMS.
Maintaining the Data Dictionary which contains the data definition of the application is also one
of the functions of a DBMS.
Performance
Optimizing the performance of the queries is one of the important functions of a DBMS. Hence
the DBMS has a set of programs forming the Query Optimizer which evaluates the different
implementations of a query and chooses the best among them.
File System :
File system is basically a way of arranging the files in a storage medium like hard disk. File
system organizes the files and helps in retrieval of files when they are required. File systems
consists of different files which are grouped into directories. The directories further contain other
folders and files. File system performs basic operations like management, file naming, giving
access rules etc.
Example:
1. Backup:
It is possible to take faster and automatic back-up of database stored in files of computer-
based systems.
computer systems provide functionalities to serve this purpose.it is also possible to
develop specific application program for this purpose.
2. Compactness:
3. Data Retrieval:
4. Editing:
5. Remote Access:
6. Sharing:
1. Data Redundancy:
It is possible that the same information may be duplicated in different files.this leads to
data redundancy results in memory wastage.
2. Data Inconsistency:
Because of data redundancy,it is possible that data may not be in consistent state.
Data are scattered in various files.also different files may have different formats and these
files may be stored in different folders may be of different departments.
So, due to this data isolation, it is difficult to share data among different applications.
5. Integrity Problems:
Data integrity means that the data contained in the database in both correct and
consistent.for this purpose the data stored in database must satisfy correct and constraints.
6. Atomicity Problems:
Multiple users are allowed to access data simultaneously.this is for the sake of better
performance and faster response.
8. Security Problems:
Database Management System is basically a software that manages the collection of related data.
It is used for storing data and retrieving the data effectively when it is needed. It also provides
proper security measures for protecting the data from unauthorized access. In Database
Management System the data can be fetched by SQL queries and relational algebra. It also
provides mechanisms for data recovery and data backup.
A database system is referred to as self-describing because it not only contains the database
itself, but also metadata which defines and describes the data and relationships between tables in
the database. This information is used by the DBMS software or database users if needed. This
separation of data and information about the data makes a database system totally different from
the traditional file-based system in which the data definition is part of the application programs.
In the file-based system, the structure of the data files is defined in the application programs so if
a user wants to change the structure of a file, all the programs that access that file might need to
be changed as well.
On the other hand, in the database approach, the data structure is stored in the system catalogue
and not in the programs. Therefore, one change is all that is needed to change the structure of a
file. This insulation between the programs and data is also called program-data independence.
A database supports multiple views of data. A view is a subset of the database, which is defined
and dedicated for particular users of the system. Multiple users in the system might have
different views of the system. Each view might contain only the data of interest to a user or
group of users.
Current database systems are designed for multiple users. That is, they allow many users to
access the same database at the same time. This access is achieved through features
called concurrency control strategies. These strategies ensure that the data accessed are always
correct and that data integrity is maintained.
The design of modern multiuser database systems is a great improvement from those in the past
which restricted usage to one person at a time.
In the database approach, ideally, each data item is stored in only one place in the database. In
some cases, data redundancy still exists to improve system performance, but such redundancy is
controlled by application programming and kept to minimum by introducing as little redudancy
as possible when designing the database.
Data sharing
The integration of all the data, for an organization, within a database system has many
advantages. First, it allows for data sharing among employees and others who have access to the
system. Second, it gives users the ability to generate more information from a given amount of
data than would be possible without the integration.
Database management systems must provide the ability to define and enforce certain constraints
to ensure that users enter valid information and maintain data integrity. A database constraint is
a restriction or rule that dictates what can be entered or edited in a table such as a postal code
using a certain format or adding a valid city in the City field.
There are many types of database constraints. Data type, for example, determines the sort of data
permitted in a field, for example numbers only. Data uniqueness such as the primary key ensures
that no duplicates are entered. Constraints can be simple (field based) or complex
(programming).
Not all users of a database system will have the same accessing privileges. For example, one user
might have read-only access (i.e., the ability to read a file but not make changes), while another
might have read and write privileges, which is the ability to both read and modify a file. For this
reason, a database management system should provide a security subsystem to create and control
different types of user accounts and restrict unauthorized access.
Data independence
Another advantage of a database management system is how it allows for data independence. In
other words, the system data descriptions or data describing data (metadata) are separated from
the application programs. This is possible because changes to the data structure are handled by
the database management system and are not embedded in the program itself.
Transaction processing
A database management system must include concurrency control subsystems. This feature
ensures that data remains consistent and valid during transaction processing even if several users
update the same information.
By its very nature, a DBMS permits many users to have access to its database either individually
or simultaneously. It is not important for users to be aware of how and where the data they
access is stored
Backup and recovery are methods that allow you to protect your data from loss. The database
system provides a separate process, from that of a network backup, for backing up and
recovering data. If a hard drive fails and the database stored on the hard drive is not accessible,
the only way to recover the database is from a backup.
If a computer system fails in the middle of a complex update process, the recovery subsystem is
responsible for making sure that the database is restored to its original state. These are two more
benefits of a database management system.
Easy to access the data: In DBMS all data are stored in database in same format, so to
retrieve the data from the database is easy because we use same application programs to
retrieve data from database whereas in file system data are stored in files and each file has its
own format. So each file need separate application programs to retrieve data. This is also
called Data Isolation.
Providing Multiple user interfaces: Because lot of users who are used the database have
different types of computer skills or knowledge . Some users are technically strong and some
are weak. So to make easy to use a database to all type of users DBMS provides many type
of interfaces. It provides query languages for casual users, Programming language for
application users, forms and command interfaces for parametric users and menu driven
interfaces for stand alone users. Both forms and menu driven interfaces are called GUI.
Restricted Unauthorized access: When multiple users use a database then it is not sure that
every user have the permission to access that database . For ex: Financial data are always be
confidential and only limited users can access that data . So in DBMS DBA(Database
Administrator ) is responsible to restrict and authorized the users to use the database.
Use Specific Storage to easily processed the query: In DBMS a specific storage medium
is used to store the data because when we processed any query to retrieve data then its
processed time is depend on ,how much time take data to be searched. So to processed the
query efficiently DBMS used special type of storage medium auxiliary file or index file . By
index file data searching can be fast.
Data Integration: Integration means combined different types of data with different length
in a unit. In DBMS we can store all the data with different data types and length . For ex: In any
table bca we can use four data types. These are: char, varchar, numeric or number and date.
So DBMS provides this facilities to integrate complex data types in one table or database.
Disadvantages of DBMS
1. Increased Cost
a.) Cost of Hardware and Software
To store huge amount of data, one needs huge amount of space. Additionally, it will require
more memory and fast processing power to run the DBMS. So, an expensive hardware and
software will be needed that can provide all these facilities. As a result, old file-based system
needs to be upgraded. These sophisticated hardware and software require maintenance which is
very costly.
DBMS requires high initial investment for hardware and software. A significant investment
based upon size and functionality of organization is required. Also, organization has to pay
concurrent annual maintenance cost.
b.) Increased Cost of Staff
DBMS staff includes database administrator, application programmers, Database designers,
System analyst and maintenance personals. All of these are highly educated and experienced in
the field of DBMS. To get this level of experienced people, one needs to spend a lot of money.
Also training of DBMS is very costly.
Also See: Types of Database Users in DBMS
c.) Cost of Data Conversion
Data conversion may require at any time and organization has to take this step. It is unbelievable
that data conversion cost is more than the costs of DBMS hardware and machine combined.
Trained staff is needed to convert data to the new system. It is a key reason that most of the
organizations are still working on their old DBMS due to high cost of data conversion.
2. Complexity
A DBMS fulfil lots of requirement and it solves many problems related to database. But all these
functionalities make DBMS an extremely complex software. Developers, designers, DBA and
End users of database must have complete skills of DBMS if they want to use it properly.
If they don’t understand this complex system then it may cause loss of data or database failure.
As it requires lots of management, so its complexity becomes an issue and very big disadvantage
of DBMS.
4. Database Failure
Data is the key for any organization, if data is lost then whole organization will collapse. And as
we know that in DBMS, all the files are stored in single database so chances of database failure
become more.Any accidental failure of component may cause loss of valuable data. This is really
a big question mark for big firms and they are continuously working to solve this issue.
5. Huge Size
DBMS is made to handle extremely huge data and queries, but due its complexity, DBMS has
become huge in size. Also, it becomes bigger in size as data is fed in it. As a result, it requires
lots of space and memory to run its application efficiently.
.
6. Performance
Traditional files system was very good for small organizations as it gave splendid performance.
But DBMS gives poor performance for small scale firms as its speed is slow and due that it is
well suited for big firms.
2. Redundant data can be present in a file system. In DBMS there is no redundant data.
File systems provide less security in comparison DBMS has more security mechanisms as compared to file
7. to DBMS. system.
8. It is less expensive than DBMS. It has a comparatively higher cost than a file system.