Professional Documents
Culture Documents
College of Engineering
(An Autonomous Institution Affiliated to VTU, Belagavi)
Course Aim:
DATA BASE MANAGEMENT SYSTEM (P15IS51)
The Database is the fundamental component for all the people in daily life in
all over world. The aim of this course is to gain an understanding of the importance of
Database Management Systems (DBMS) in business, research; to acquire the knowledge
and skills to design, develop, implement and use a commercial relational database
management system for a simplified real-world application.
The courses presuppose a basic knowledge of conceptual modeling for data base systems and
implementation using relational DBMS and SQL. The course aims to a more profound
understanding of database theories, models, and methods and an ability to use these in different
situations.
The aim of the course is to make student how to use these database concepts in real world
applications.
Course Objectives:
The objective of the course is to present an introduction to
database management systems, with an emphasis on how to organize, maintain and
retrieve - efficiently, and effectively - information from a DBMS.
Learning Outcomes:
Upon successful completion of this course, students should be able to:
1. Describe the fundamental elements of relational database management systems
2. Explain the basic concepts of relational data model, entity-relationship model,
relational database design, relational algebra and SQL.
3. Design ER-models to represent simple database application scenarios
4. Convert the ER-model to relational tables, populate relational database and formulate
SQL queries on data.
5. Improve the database design by normalization.
Introduction:
An example: Characteristics of Database approach; Advantages of using DBMS approach; A brief
history of database applications; Data models, schemas and instances; Three-schema architecture and
data independence; Database languages and interfaces; The database system environment.
Introduction:
Databases and database systems are an essential component of almost every
person daily routine in modern society. Most of the people doing into several activities every day
that involve some interaction with a database.
In a daily life, some situations occur to maintain or store data. For example maintaining daily
household bills (such as electricity bills, water bills news paper bill etc.), bank account details,
salary details, payment details, student information, student reports, books in the library etc.
We are using it every day in different situations like Food storage, Medical store, Cloths
storeroom, Bank Deposit and Withdraw funds, Hotel or Airline or Bus Reservation etc. all these
activities are use database to complete works. So, database is most important component of
almost every person daily routine in modern society. In other words, database is just like a
container.
1. If we go to the bank to deposit or withdraw funds.
2. If we make a hotel or airline reservation.
3. If we access a computerized library catalog to search for a bibliographic item.
4. If we purchase something online - such as a book, toy, or computer.
All the activities will involve someone or some computer program accessing a database. Even
purchasing items at a supermarket often automatically updates the database that holds the
inventory of grocery items.
What is Data?
In simple words, Data is the collection of raw facts and figures that are
related to any object in consideration.
For example: - your name, age, height, weight, etc are some data related to you. A picture,
image, file, pdf etc can also be considered data.
Example: - If I told you john, 25, 5 8.5 consider as data because you would not have learned
anything. But consider as a data.
Actually data is unprocessed, that is why data is called collection of raw facts and figures.
We collect data from different resources. After collection, data is entered into computer for
processing. Data may be collection of words, numbers, pictures, or sounds etc.
Examples of Data
What is Information?
Processed data is called information. When raw facts and figures
are processed and arranged in some proper order then they become information.
Example:
Student name is John, age is 25, semester is 5 and grade points is 8.5
Information has proper meanings. Information is useful in decision-making. Actually we process
data to convert it into information
Examples of Information:
1) Student Address Labels
Stored data of students can be used to print address labels of
students. These address labels are used to send any intimation / information to students at their
home addresses.
2) Census Report (Total population, Literacy Rate, Male / Female ratio etc.)
Census data
is used to get report/information about total population of a country and literacy rate, total
population of males, females, children, aged persons, persons in different categories line cast,
religion, age groups etc.
3) Survey Reports and Results
Survey data is summarized into reports/information to present
to management of the company. The management will take important decisions on the basis of
data collected through surveys and the reports prepared on the basis of these data.
4) Result Cards of Individual Students, Result sheets of a particular Class
In examination
system collected data (obtained marks in each subject) is processed to get total obtained marks of
a student. Total obtained marks are Information. It is also used to prepare result card of a student.
5) Merit List
After collecting admission forms from candidates, merit is calculated on the basis
of obtained marks of each candidate. Normally, percentage of marks obtained is calculated for
each candidate. Now all the candidates’ names are arranged in descending order by percentage.
This makes a merit list. Merit list is used to decide whether a candidate will get admission in the
college or not.
Data represents facts before processing Information represents results (obtained after processing).
Data is not helpful in decision-making Information is helpful in decision-making
Data is raw material for information Information is the final product of data
Data are unprocessed records Information contains processed records
Data is in large amounts Information is in small amounts
If data is lost, it is very difficult (or even If information is lost, it is easily derived from stored data,
impossible in some situations) to re collect again
Data is collected by observations, Now we will process these temperatures data to find useful
recordings, interview or survey etc. For information. For example if we arrange temperatures in
example, if we ascending order, then we will find the information
record the temperature of each hour like:
recorded in a particular day is called
temperature data. Minimum Temperature of the day= 15 C and Maximum
Temperature of the day = 25 C.
Data is the asset of an organization and is Normally, information is available for sale to general public.
not available for sale to public
Data depends upon the sources for Information depends upon data.
collecting data, the collection methods
adopted and the people who will collect
data.
Knowledge
The ability of the person recalls or uses his information and experience is known as knowledge.
For example, "386" is data, "your marks are 386" is information, and "It is result of your hard
work" is knowledge.
How to keep or store the data or information at one place, is it possible easy to get it back when
required? Some questions are;
1. Should be able to get the data any point in time latter
2. Should be able to add details to it whenever required
3. Should be able to modify stored information, as needed
4. Should also be able to delete them
In traditional approach, before to computer, all information’s were stored in papers. When we
need information, we used to search through the papers. If we know particular date or category
of information we are searching, we go to that particular session in the papers. When we want
update or delete some data, we search for it and modify them or strike off them. If the data is
limited, then all these tasks are easy. Imagine library information or information about a student
in School, or baking system! How do we search for single required data in papers? It is a never
ending task! Yes, Computers solved our problems.
File Processing System:
When computers came, all these jobs become easy. But initial
days, these records were stored in the form of files. The way we stored in files is similar to
papers, in the form of flat files – to be simpler, in notepad. Yes, the information’s where all in
the notepads with each fields of information separated by space, tab comma, semicolon or any
other symbol.
All the files were grouped based on their categories; file used to have only related information’s
and each file are named properly. As we can see in the above sample file has Student
information. Student files for each class were bundled inside different folders to identify it
quickly.
Now, if we want to see a specific Student detail from a file, what do we do? We know which file
will have the data, we open that file and search for his details. Fine, here we see the files; we can
open it and search for it. But imagine we want to display student details in a UI. Now how will
we open a file, read or update it? There different programs like C, C++, COBOL etc which helps
to do this task. Using these programming languages, we can search for files, open them, search
for the data inside them, and go to specific line in the file, add/update/delete specific information.
Disadvantages of file processing:
change it entire programs. That is smallest change in the file affect all the programs and need
changes in all them.
4. Data inconsistency: - Imagine Student and Student_Report files have student’s address in it,
and there was a change request for one particular student’s address. The program searched
only Student file for the address and it updated it correctly. There is another program which
prints the student’s report and mails it to the address mentioned in the Student_Report file.
What happens to the report of a student whose address is being changed? There is a
mismatch in the actual address and his report is sent to his old address. This mismatch in
different copies of same data is called data inconsistency. This has occurred here, because
there is no proper listing of files which has same copies of data.
5. Data Isolation: - Imagine we have to generate a single report of student, who is studying in
particular class, his study report, his library book details, and hostel information. All these
informations are stored in different files. How do we get all these details in one report? We
have to write a program. But before writing the program, the programmer should find out
which all files have the information needed, what is the format of each file, how to search
data in each file etc. Once all these analysis is done, he writes a program. If there is 2-3 files
involved, programming would be bit simple. Imagine if there is lot many files involved in it?
It would be require lot of effort from the programmer. Since all the datas are isolated from
each other in different files, programming becomes difficult.
6. Security: - Each file can be password protected. But what if have to give access to only few
records in the file? For example, user has to be given access to view only their bank account
information in the file. This is very difficult in the file system.
7. Integrity: - If we need to check for certain insertion criteria while entering the data into file
it is not possible directly. We can do it writing programs. Say, if we have to restrict the
students above age 18, then it is by means of program alone. There is no direct checking
facility in the file system. Hence these kinds of integrity checks are not easy in file system.
8. Atomicity: - If there is any failure to insert, update or delete in the file system, there is no
mechanism to switch back to the previous state. Imagine marks for one particular subject
needs to be entered into the Report file and then total needs to be calculated. But after
entering the new marks, file is closed without saving. That means, whole of the required
transaction is not performed. Only the totaling of marks has been done, but addition of marks
not being done. The total mark calculated is wrong in this case. Atomicity refers to
completion of whole transaction or not completing it at all. Partial completion of any
transaction leads to incorrect data in the system. File system does not guarantee the
atomicity. It may be possible with complex programs, but introduce for each of transaction
costs money.
9. Concurrent Access: - Accessing the same data from the same file is called concurrent
access. In the file system, concurrent access leads to incorrect data. For example, a student
wants to borrow a book from the library. He searches for the book in the library file and sees
that only one copy is available. At the same time another student also, wants to borrow same
book and checks that one copy available. First student opt for borrow and gets the book. But
it is still not updated to zero copy in the file and the second student also opt for borrow! But
there are no books available. This is the problem of concurrent access in the file system.
To overcome all drawbacks of file processing system, a new system called database system is
developed.
What is Database?
A database is a collection of interrelated data or information that is
organized in the form of tables, views, schemas, reports etc. for efficient retrieval (easy
accessed), easy insertion and deletion and easy to update and effectively manage the data.
Databases support storage and manipulation of data. Databases make data management easy.
(Database means systematically organized or structured repository of indexed information
(usually as a group of linked data files) that allows easy retrieval, updating, analysis, and output
of data).
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.
An online telephone directory would definitely use database to store data pertaining to people,
phone numbers, other contact details, etc.
Your electricity service provider is obviously using a database to manage billing, client related
issues, to handle fault data, etc.
Let's also consider the Face book. It needs to store, manipulate and present data related to
members, their friends, member activities, messages, advertisements and lot more.
All the files in the file processing system are known as tables in the database. The contents of
files form records of the table. In database, each of column values are known as attribute and
each row of information is known as record. There no difference in the data being stored. But it
is different from the file system by the way data is stored and accessed in the database.
In the database, each set of information is stored in the form of rows and columns. We define a
unique key column for each record known as primary key. Using primary key, we can access the
data much faster than file system. We can also define a mapping between any two related tables.
This helps in reducing unnecessary data storage and faster retrieval of data.
Below is the example how the data is stored in the database tables logically.
How do we access these data from the database? For this purpose, database defines a collection
of programs that allows the users to insert, delete, update and retrieve the data from the database
based on user’s requirement. These set of programs are known as database management system-
DBMS.
Apart from basic transactions, it allows the users to perform complex transaction; it helps to
maintain consistency, atomicity, security, and controls concurrency. Oracle, MySQL, SQL
Servers, DB2, FoxPro, dBase etc are some of the DBMS available in the market. Though they
are manufactured by different manufacturer, basic functionalities of all them are same.
What is Data Base Management System (DBMS)?
DBMS stands for Database Management System.
Database Management System is software which is used to manage database is called Database
Management System (DBMS).
Database Management System (DBMS) is a collection of programs which enables its users to
access database, manipulate data, reporting / representation of data. It also helps to control access
to the database.
For Example:
MySQL, Oracle etc. are popular commercial DBMS used in different applications.
Other database systems are
#1) Oracle RDBMS:
Oracle database is the most widely used object-relational database management software. The
latest version of this tool is 12c where c means cloud computing.
It supports multiple Windows, UNIX, and Linux versions.
Few features of Oracle RDBMS are as follows:
It is secured, occupies less space, supports large databases, and reduces CPU time to process
data.
Cost: It’s a commercial tool.
See more details and download here: Oracle RDBMS
#2) IBM DB2:
Latest release 11.1.Developed in the year 1983.The language used is Assembly Language, C, C+
+ for writing it.
It is very easy to install and set up and data is easily accessible, we can save the huge amount of
data almost up to pet bytes.
Costs: It’s a commercial tool.
See more details and download here: IBM DB2
#3) Microsoft SQL Servers:
Developed in the year 1989.Latest updated version came in 2016.The language used is Assembly
C, Linux, C++ for writing it.
Works on Linux and windows operating system.
Few features of MS SQL server include:
Compatible with Oracle provides efficient management of workload and allows multiple users to
use the same database.
Costs: It’s a commercial tool.
See more details and download here: Microsoft SQL server
#4) SAP Sybase ASE:
ASE means adaptive server enterprise. It’s the latest version is 15.7. It was started in the middle
of eighties.
Few features of these are:
They can perform millions of transactions in a minute, with the use of cloud and even mobile
devices can be synchronized with the database.
Costs: It’s a commercial tool.
See more details and download here: SAP Sybase ASE
#5) Teradata:
Started in 1979
Works on Linux and windows operating system.
Data importation and exportation is easy, multiple processing is possible at the same time, data
can be easily distributed, useful for very large databases.
Costs: It’s a commercial tool.
See more details and download here: Teradata
#6) ADABAS:
It has an ability to be connected across platforms like connections to SQL are possible,
information sharing is easier because of the cloud.
Costs: It’s a commercial tool.
See more details and download here: Filemaker
#9) Microsoft Access:
It’s a database which can process large data simultaneously and uses internal memory so the data
is easily accessible, use of very complex joins is not there, scaling is easily possible.Queries can
be easily optimized for output.
Costs: It’s an open source tool
Advantages of DBMS:
DBMS is developed to cover the drawbacks of the traditional file
system.
1. Data Mapping and Access: - DBMS defines the way to map any two related tables by
means of primary key –foreign key relationship. Primary key is the column in the table which
responsible for uniquely identifying each record in the table. Foreign key is the column in the
table which is a primary key in other table and with which the entries in the current table are
related to other table.
For example, in the new database system, we can Student and Student_Report table as follows.
STUDENT_ID is the unique using which we can identify each student and hence it forms a
primary key in STUDENT table. Similarly, REPORT_ID is the primary key in the
STUDENT_REPORT table. STUDENT_ID in the STUDENT_REPORT table is the foreign
key. It links STUDENT and STUDENT_REPORT tables.
Because of such mapping, it becomes each for the programmer to search for related tables, join
them, and fire the query as per the requirement. This reduces the time consumed while
searching and mapping these tables. Even when there is large amount of data, the time
consumed to retrieve, insert, update or delete is very less. Hence there is no data isolation in
the system.
Note: Mapping of tables is usually done when they are created.
2. Data Redundancy: - By the introduction of primary key in the table, data redundancy
problem is reduced to great extent. As we saw, primary key is the unique column for each
record, when there is a re-entry of same record, it does not allow saving such records.
DBMS has strong designing techniques like normalization which makes sure the same copy of
data is not stored in same table or in multiple tables. It makes sure all the informations are
stored only once in the database tables.
We can see the difference in the way data is being stored in the file and database system. Primary
key, foreign keys are defined; unnecessary columns are removed from the
STUDENT_REPORT table in the database system. These are missing in the file processing
system.
3. Data Independence and Consistency: - DBMS defines a standard to represent the data in
the form of rows and columns. It also stores the information about the tables, columns, keys,
storage space, used space, available space etc separately from the logical data. Hence they
totally independent of the way they are stored and the data being stored. Any changes to the
physical storage (like disks, tapes etc) or structure, does not harm the data being stored. Since
DBMS defines each columns and rows at the beginning itself and controls the way data being
entered, there is no affect on the programs or any other tables or data. Hence the consistency
of the data also maintained.
If there is a change in the address of any student, we just have to update it in the Student table.
There is no other place his information is being stored. Hence it maintains the consistent data
in the database.
Suppose there is a new column addition to STUDENT table, say DOB. This will change the
metadata to reflect additional column in the table structure. It will hardly affect the
application unless until there is a new requirement to have transaction with DOB. Hence data
independence is also assured in the database.
4. Security: - DBMS allows different levels of access to different users based on their roles. In
the school database, individual students will have access to their data alone, while their
teachers will have access to all the students whom they are teaching and for the subjects that
they are teaching. Class teacher will be able to see the reports of all the students in that class,
but not other classes.
Similarly, in a banking system, individual account holder will have Read-Only access to their
account. While accountant can update, individual account details for each of their
transaction.
All these levels of security and access are not allowed in file system.
5. Integrity: - DBMS allows having restrictions on individual columns. It would be defined
while designing the table itself. If we want to enter salary of an employee within the range
10000 to 40000, we can impose this while designing the table by using CHECK constraint.
When salary is entered, it will automatically check for the range specified.
CREATE TABLE EMPLOYEE ……….. CONSTRAINT chk_salary CHECK (salary>10000
AND salary <40000)
6. Atomicity: - DBMS makes sure either the transaction is fully complete or it is rolled back to
the previous committed state. It does not allow the system to be in a partially committed
state. In our example above, DBMS commits marks change transaction before calculating the
total. If there is any crash or shutdown of the system, before committing the marks, then
updated marks will be rolled back to the original marks. Hence it makes sure atomicity of the
transaction is achieved.
7. Concurrent Access: - DBMS provide access to multiple users to access the database at the
same time. It has its own mechanism to have concurrency accesses and hence avoid any
incorrect data in the system.
Disadvantages of DBMS
1. It is bit complex. Since it supports multiple functionality to give the user the best, the
underlying software has become complex. The designers and developers should have
thorough knowledge about the software to get the most out of it.
2. Because of its complexity and functionality, it uses large amount of memory. It also needs
large memory to run efficiently.
3. DBMS system works on the centralized system, i.e.; all the users from all over the world
access this database. Hence any failure of the DBMS, will impact all the users.
4. DBMS is generalized software, i.e.; it is written work on the entire systems rather specific
one. Hence some of the application will run slow.
An Example
Illustration of a Database (with a Conceptual Data Model):
• Mini-world for the example:
Component of a UNIVERSITY environment.
• A few mini-world entities:
STUDENTs
COURSEs
SECTIONs (of COURSEs)
(Academic) DEPARTMENTs
INSTRUCTORs
Example of a Database (with a Conceptual Data Model):
• Some mini-world relationships:
SECTIONs are of specific COURSEs
STUDENTs take SECTIONs
COURSEs have prerequisite COURSEs
INSTRUCTORs teach SECTIONs
COURSEs are offered by DEPARTMENTs
STUDENTs major in DEPARTMENTs
Example of a simple Database:
File System versus DBMS – Difference between File System and DBMS
User locates the physical address of the files to In Database Management System,
access data in File Management System. user is unaware of physical address
where data is stored.
2. That mechanism will make sure the same record will not be modified by multiple users at the
same time, thus keeping the data integrated.
3. Additionally, DBMS provide backup and other facilities as well.
What's the conclusion?
In File System, files are used to store data while collections of
databases are utilized for the storage of data in DBMS. Although File System and DBMS are two
ways of managing data, DBMS clearly has many advantages over File Systems. Typically when
using a File System, most tasks such as storage, retrieval and search are done manually and it is
quite tedious whereas a DBMS will provide automated methods to complete these tasks. Because
of this reason, using a File System will lead to problems like data integrity, data inconsistency,
and data security, but these problems could be avoided by using a DBMS. Unlike File System,
DBMS are efficient because reading line by line is not required and certain control mechanisms
are in place.
Characteristics of the Database Approach:
A number of characteristics distinguish
the database approach from the much older approach of programming with files.
In traditional file processing, each user defines and implements the files needed for a specific
software application as part of programming the application.
For example:-
One user, the grade reporting office, may keep files on students and their
grades. Programs to print a student’s transcript and to enter new grades are implemented as part
of the application.
A second user, the accounting office, may keep track of students’ fees and their payments.
Although both users are interested in data about students, each user maintains separate files and
programs to manipulate these files-because each requires some data not available from the other
user’s files. This redundancy in defining and storing data results in wasted storage space and in
redundant efforts to maintain common up-to-date data.
In the database approach, a single repository maintains data that is defined once and then
accessed by various users. In file systems, each application is free to name data elements
independently. In contrast, in a database, the names or labels of data are defined once, and used
repeatedly by queries, transactions, and applications.
The main characteristics of the database approach versus the file-processing approach are the
following:
1. Self-describing nature of a database system
2. Insulation between programs and data, and data abstraction
3. Support of multiple views of the data
4. Sharing of data and multiuser transaction processing
The catalog is used by the DBMS software and also by database users who need information
about the database structure. A general-purpose DBMS software package is not written for a
specific database application. Therefore, it must refer to the catalog to know the structure of the
files in a specific database, such as the type and format of data it will access. The DBMS
software must work equally well with any number of database applications—for example, a
In traditional file processing, the structure of data files is embedded in the application programs,
so any changes to the structure of a file may require changing all programs that access that file.
By contrast, DBMS access programs do not require such changes in most cases.
The structure of data files is stored in the DBMS catalog separately from the access programs.
We call this property program-data independence.
For example:
A file access program may be written in such a way that it can access only
STUDENT records of the structure shown in Figure 1.4.
If we want to add another piece of data to each STUDENT record, say the Birth_date , such a
program will no longer work and must be changed. By contrast, in a DBMS environment, we
only need to change the description of STUDENT records in the catalog (Figure 1.3) to reflect
the inclusion of the new data item Birth_date ; no programs are changed. The next time a
DBMS program refers to the catalog, the new structure of STUDENT records will be accessed
and used.
3. Support of Multiple Views of the Data
A database typically has many users, each of whom may require a different perspective or view
of the database. A view may be a subset of the database or it may contain virtual data that is
derived from the database files but is not explicitly stored. Some users may not need to be aware
of whether the data they refer to is stored or derived. A multiuser DBMS whose users have a
variety of distinct applications must provide facilities for defining multiple views.
For example:
One user of the database of Figure 1.2 may be interested only in accessing and
printing the transcript of each student; the view for this user is shown in Figure 1.5(a). A second
user, who is interested only in checking that students have taken all the prerequisites of each
course for which they register, may require the view shown in Figure 1.5(b).
characterize a DBMS. First, however, we categorize the different types of people who work in a
database system environment.
Characteristics and Benefits of a Database
There are a number of characteristics that distinguish the database approach from the file-based
system or approach. This chapter describes the benefits (and features) of the database system.
Self-describing nature of a database system
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.
Insulation between program and data
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.
Support for multiple views of data
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.
Sharing of data and multiuser system
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.
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.
Provision for multiple views of data
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 facilities
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.
Actors on the scene in DBMS:
We identify the people whose jobs involve the day-to-day
use of a large database which are called as the actors on the scene. In large organizations, many
people are involved in the design, use and maintenance of a large database with hundred of users.
o Those who actually use and control the database content, and those who design, develop
and maintain database applications (called “Actors on the Scene”).
o Those who design and develop the DBMS software and related tools, and the computer
systems operators (called “Workers behind the Scene”).
Database Administrators:
In an organization where many people use the same resources,
there is a need of chief administrator to oversee and manage these resources. In database
environment, the primary resource is the database itself and the secondary resource is the DBMS
and related software. The DBA is responsible for authorizing access to the database,
coordinating and monitoring its use and acquiring software and hardware resources as needed.
Database Designers:
PUTTASWAMY B.S. Assistant Professor, Dept. of IS&E, PESCE Mandya. Page 36
DATA BASE MANAGEMENT SYSTEM (P15IS51)
These are responsible for identifying the data to be stored in the database
and for choosing appropriate structures to represent and store this data. It is the responsibility of
database designers to communicate with all prospective database users in order to understand
their requirements and to create a design that meets these requirements.
End Users:
These are the people whose jobs require access to the database for querying,
updating, and generating reports, the database primarily exist for their use. Various categories of
end users are:
Casual End users: Occasionally access the database, but they may need different
information each time (use database occasionally, needing different information each time; use
query language to specify their requests; typically middle- or high-level managers.)
Sophisticated End Users: Include engineers, scientists, business analyst and others
who thoroughly familiarize themselves with the facilities of DBMS inorder to implement their
applications to meet complex requirements.( engineers, scientists, business analysts who
implement their own applications to meet their complex needs.)
Stand-alone users: Use "personal" databases, possibly employing a special purpose (e.g.,
financial) software package. Mostly maintain personal databases using ready-to-use packaged
applications.
System analyst and Application Programmers: System Analyst determines
the requirements of end users and specially naive and parametric end users and
develops specifications for canned transactions that meet these
requirements. Application Programmers, document an implement these specifications as
programs: then they test, debugged maintain these canned transactions.
Advantages of DBMS
PUTTASWAMY B.S. Assistant Professor, Dept. of IS&E, PESCE Mandya. Page 38
DATA BASE MANAGEMENT SYSTEM (P15IS51)
1. Controlling of Redundancy:
Data redundancy refers to the duplication of data (i.e storing same data multiple
times). In a database system, by having a centralized database and centralized control
of data by the DBA the unnecessary duplication of data is avoided. It also eliminates
the extra time for processing the large volume of data. It results in saving the storage
space.
In traditional file processing, every user group maintains its own files
for handling its data-processing applications. Each group independently keeps files on students.
The accounting office also keeps data on registration and related billing information, whereas the
registration office keeps track of student courses and grades.
In traditional file processing, much of the data is stored twice: once in the files of each user
group. Additional user groups may further duplicate some or all of the same data in their own
files. This redundancy in storing the same data multiple times leads to several problems.
First, there is the need to perform a single logical update-such as entering data on a new student-
multiple times: once for each file where student data is recorded. This leads to duplication of
effort.
Second, storage space is wasted when the same data is stored repeatedly, and this problem may
be serious for large databases.
Third, files that represent the same data may become inconsistent. This may happen because an
update is applied to some of
the files but not to others. Even if an update-such as adding a new student-is applied to all the
appropriate files, the data concerning the student may still be inconsistent because the updates
are applied independently by each user group.
For example:
One user group may enter a student's birth date erroneously as JAN-19-1984,
whereas the other user groups may enter the correct value of JAN-29-1984.
In the database approach, the views of different user groups are integrated during database
design. Ideally, we should have a database design that stores each logical data item-such as a
student's name or birth date-in only one place in the database. This ensures consistency, and it
In a database system, the data is managed by the DBMS and all access to the data is
through the DBMS providing a key to effective data processing
7. Enforcements of Standards:
With the centralized of data, DBA can establish and enforce the data standards which
may include the naming conventions, data quality standards etc.
8. Data Independence:
In a database system, the database management system provides the interface between
the application programs and the data. When changes are made to the data
representation, the meta data obtained by the DBMS is changed but the DBMS is
continues to provide the data to application program in the previously used way. The
DBMs handles the task of transformation of data wherever necessary.
9. Reduced Application Development and Maintenance Time:
DBMS supports many important functions that are common to many applications,
accessing data stored in the DBMS, which facilitates the quick development of
application.
Disadvantages of DBMS
1. Increased Complexity
2. Requirement of New and Specialized Manpowers
3. Large Size of DBMS
Restricting Unauthorized Access
When multiple users share a large database, it is likely that
most users will not be authorized to access all information in the database.
For example: financial data is often considered confidential and hence only authorized persons
are allowed to access such data. In addition, some users may be permitted only to retrieve data,
whereas others are allowed both to retrieve and to update. Hence, the type of access operation-
retrieval or update-must also is controlled.
Providing Storage Structures for Efficient Query:
Processing Database systems must
provide capabilities for efficiently executing queries and updates. Because the database is
typically stored on disk, the DBMS must provide specialized data structures to speed up disk
search for the desired records. Auxiliary files called indexes are used for this purpose. Indexes
are typically based on tree data structures or hash data structures, suitably modified for disk
search.
In order to process the database records needed by a particular query, those records must be
copied from disk to memory. Hence, the DBMS often has a buffering module that maintains
parts of the database in main memory buffers. In other cases, the DBMS may use the operating
system to do the buffering of disk data.
The query processing and optimization module of the DBMS is responsible for
choosing an efficient query execution plan for each query based on the existing storage
structures. The choice of which indexes to create and maintain is part of physical database design
and tuning, which is one of the responsibilities of the DBA staff.
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.
For example: if the computer system fails in the middle of a complex update transaction, the
recovery subsystem is responsible for making sure that the database is restored to the state it was
in before the transaction started executing. Alternatively, the recovery subsystem could ensure
that the transaction is resumed from the point at which it was interrupted so that its full effect is
recorded in the database.
time of data entry. A data item may be entered erroneously and still satisfy the specified integrity
constraints. For example, if a student receives a grade of A but a grade of C is entered in the
database, the DBMS cannot discover this error automatically, because C is a valid value for the
Grade data type. Such data entry errors can only be discovered manually (when
the student receives the grade and complains) and corrected later by updating the database.
However, a grade of Z can be rejected automatically by the DBMS, because Z is not a valid
value for the Grade data type.
Permitting Inference and Actions Using Rules:
Some database systems provide capabilities for
defining deduction rules for inference new information from the stored database facts. Such
systems are called deductive database systems. For example, there may be complex rules in the
miniworld application for determining when a student is on probation. These can be specified
declarative as rules, which when compiled and maintained by the DBMS can determine all
students on probation. In a traditional DBMS, an explicit procedural prof-,Jmm code would have
to be written to support such applications. But if the miniworld rules change, it is generally more
convenient to change the declared deduction rules than to re-code procedural programs. More
powerful functionality is provided by active database systems, which provide active rules that
can automatically initiate actions when certain events and conditions occur.
Flexibility:
It may be necessary to change the structure of a database as requirements change. For
example, a new user group may emerge that needs information not currently in the database. In
response, it may be necessary to add a file to the database or to extend the data elements in an
existing file. Modern DBMSs allow certain types of evolutionary changes to the structure of the
database without affecting the stored data and the existing application programs.
Availability of Up-to-Date Information:
A DBMS makes the database available to all users. As
soon as one user's update is applied to the database, all other users can immediately see this
update. This availability of up-to-date information is essential for many transaction-processing
applications, such as reservation systems or banking databases, and it is made possible by the
concurrency control and recovery subsystems of a DBMS. Economies of Scale. The DBMS
approach permits consolidation of data and applications, thus reducing the amount of wasteful
overlap between activities of data processing personnel in different projects or departments. This
enables the whole organization to invest in more powerful processors, storage devices, or
communication gear, rather than having each department purchase its own (weaker) equipment.
This reduces overall costs of operation and management.