Database Management System: Dr. Neha Gulati University Business School Panjab University
Database Management System: Dr. Neha Gulati University Business School Panjab University
Information
Data processed to reveal meaning
Accurate, relevant and timely information is key to good decision making.
Good decision making is the key to survival in a global environment.
Introduction - Database and DBMS
Database
A database is a collection of information that is organized, so that it can be easily
accessed, managed and updated.
It stores: End user data (raw facts) and Metadata (data about data).
Any change in one file affects all the files, putting burden on programmer / database
administrator.
Problems with File System
Data Management
Time-consuming, high-level activity required.
File structure changes require modifications in all programs that use data in that file.
Modifications are likely to produce errors, requiring additional time to “debug” the
program.
Security features are hard to program and therefore were often omitted.
DBMS
DBMS provides better access to more and better-managed data to end users
Promotes integrated view of organization’s operations
Probability of data inconsistency is greatly reduced
Possible to produce quick answers to adhoc queries
These three foundational elements help provide concurrency, security, data integrity and
uniform administration procedures.
Database System Environment
Database system is composed of the following five main parts:
Hardware
Software
Operating system software
DBMS software
Application programs and utility software
People
Procedures
Data
ACID Properties
ACID properties are an important concept for databases with respect to transactions.
A transaction is a single logical unit of work which accesses and possibly modifies
the contents of a database.
Consistency : This means that integrity constraints must be maintained so that the
database is consistent before and after the transaction.
Isolation : This property ensures that multiple transactions can occur concurrently
without leading to inconsistency of database state.
Durability: This property ensures that once the transaction has completed
execution, the updates and modifications to the database are stored in and written to
disk and they persist even is system failure occurs.
Uses of DBMS
To say that the databases are everywhere would be an understatement.
They virtually permeate our lives: Online stores, health care providers, clubs,
libraries, video stores, beauty salons, travel agencies, phone companies,
government agencies like FBI, INS, IRS, and NASA — they all use databases.
These databases can be very different in their nature and usually have to be
specifically designed to cater to some special customer needs. Here are some
examples.
Real Life Examples and Use of DBMS
Railway Reservation System : Database is required to keep record of ticket booking,
train’s departure and arrival status. Also if trains get late then people get to know it
through database update.
Library Management System : There are thousands of books in the library so it is very
difficult to keep record of all the books in a copy or register. So DBMS used to maintain
all the information relate to book issue dates, name of the book, author and availability
of the book.
Military : Military keeps records of millions of soldiers and it has millions of files that
should be keep secured and safe. As DBMS provides a big security assurance to the
military information so it is widely used in militaries. One can easily search for all the
information about anyone within seconds with the help of DBMS.
Banking : We make thousands of transactions through banks daily and we can do this
without going to the bank. So how banking has become so easy that by sitting at home
we can send or get money through banks. That is all possible just because of DBMS that
manages all the bank transactions.
Universities and colleges : Examinations are done online today and universities and
colleges maintain all these records through DBMS. Student’s registrations details,
results, courses and grades all the information are stored in database.
Social Media Sites : Daily millions of users signed up for these social media accounts
like Facebook, twitter, Pinterest and Google plus. But how all the information of users
are stored and how we become able to connect to other people, yes this all because
DBMS.
Advantages of DBMS
Data can be shared : The applications may be developed without having to create any
new stored files
The DBMS can offer both logical and physical data independence :
That means it can protect users and applications from needing to know where data is
stored or having to be concerned about changes to the physical structure of data
(storage and hardware).
Inconsistency can be avoided : When the same data is duplicated and changes are
made at one site, which is not propagated to the other site, it gives rise to inconsistency
and the two entries regarding the same data will not agree.
Standards can be enforced : Since DBMS is a central system, so standard can be enforced
easily may be at Company level, Department level, National level or International level. The
standardized data is very helpful during migration or interchanging of data.
Restricting unauthorized access : When multiple users share a database, it is likely that some
users will not be authorized to access all information in the database.
Solving Enterprise Requirement than Individual Requirement : Since many types of users
with varying level of technical knowledge use a database, a DBMS should provide a variety of
user interface. So, the DBA can structure the database system to provide an overall service that
is "best for the enterprise".
Providing Backup and Recovery : A DBMS must provide facilities for recovering from
hardware or software failures. The backup and recovery subsystem of the DBMS is responsible
for recovery.
Complexity : The provision of the functionality that is expected of a good DBMS makes the
DBMS an extremely complex piece of software. Database designers, developers, database
administrators and end-users must understand this functionality to take full advantage of it.
Size : The complexity and breadth of functionality makes the DBMS an extremely large piece
of software, occupying many megabytes of disk space and requiring substantial amounts of
memory to run efficiently.
Cost of DBMS : The cost of DBMS varies significantly, depending on the environment and
functionality provided. There is also the recurrent annual maintenance cost.
Additional Hardware costs : The disk storage requirements for the DBMS and
the database may necessitate the purchase of additional storage space.
Cost of Conversion : In some situations, the cost of DBMS and extra hardware
may be insignificant compared with the cost of converting existing applications to
run on the new DBMS and hardware.
Hierarchical databases
Network databases
Relational databases
Object-oriented databases
Hierarchical Database
A hierarchical database is a design that uses a one-to-many relationship for data
elements.
It uses a tree structure that links a number of disparate elements to one "owner," or
"parent," primary record.
In this structure Data follows a series of records, It is a set of field values attached to it.
It collects all records together as a record type.
These record types are the equivalent of tables in the relational model, and with the
individual records being the equivalent of rows. To create links between these record
types, the hierarchical model uses these type Relationships
Example of Hierarchical Database
Network Database
Refines hierarchical model.
The multiple linkages which this information allows the network database model to be
very flexible.
the relationship that the information has in the network database model is defined as
many-to-many relationship because one owner file can be linked to many member files
and vice versa.
A network database looks more like a cobweb or interconnected network of records.
Example of Network Database
Relation Database
These databases connect to the data in different files by using common data numbers or a key
field.
Data in relational databases is stored in different access control tables, each having a key field
In relational databases, tables or files filled up with data are called relations (tuples) designates
Relational databases work on each table has a key field that uniquely indicates each row, and
that these key fields can be used to connect one table of data to another.
Object Oriented Database
It uses the functionality of the object oriented Programming.
Object-oriented databases use small, recyclable separated of software called objects. Each
Instructions, or software programs called methods, for what to do with the data.
A poorly designed database can lead to bad decision making, and bad decision making
can lead to the failure of an organization.