DBMS__-Unit-1
DBMS__-Unit-1
DATA:-Data is any collection of facts of figures. The data is the raw material to be processed by a
computer Example- Names of students, marks obtained in the examination, designation of employees,
addresses, quantity, rate, sales figures or anything that is input to the computer is data. Even pictures,
photographs, drawings, charts and maps can be treated as data. Computer processes the data and
produces the output or result.
INFORMATION:- A collection of data which conveys some meaningful idea is information. It may
provide answers to questions like who, which, when, why, what, and how. OR
The raw input is data and it has no significance when it exists in that form. When data is collated or
organized into something meaningful, it gains significance. This meaningful organization is information.
DATABASE : Collection of related data. By data, we mean known facts that can be recorded and that
have implicit meaning. The database system are designed to manage large bodies of information.
Data bases and database systems have become an essential component of everyday life in modern
society.
Examples for database Applications:
(1)Purchases from the supermarket (2)Purchases using your credit card
(3)Booking a holiday at the travel agents (4)Using the local library
(5)Taking out insurance (6)Using the Internet
(7)Studying at university (8)Banking
(9)Airlines and Railways (10)Sales
Need to store data :
(1)Data originates at one time and used later (2)Store registrations for grading later,
(3)Store for future information needs, (4)Governmental regulations requires access to past data,
(5) Used more than once
(3)Data integrity can be maintained – Integration means unification and sequencing of data. In other words
it can be defined as “the data contained in the data base is both accurate and consistent”. DBMS can enforce
integrity constraints on the data. Integrity constrains such as unique roll no for each students should be
identified. Data may be updated incorrectly, if integrity is not maintained. DBMS provide concept of primary
key and foreign key for integration of data. For example, before inserting salary information for an employee,
the DBMS can check that the department budget is not exceeded.
() Minimal Data Redundancy-
Since the whole data resides in one central database, the various programs in the application can access
data in different data files. Hence data present in one file need not be duplicated in another. This reduces
data redundancy.
(5)Increased Data Consistency-
Reduced data redundancy leads to better data consistency. DBMS can ensure that any change made to
one of the duplicate data entries is automatically applied to others.
(6)Controlling Redundancy -
In DBMS there is no redundancy (duplicate data).If any type of duplicate data arises, then DBA can control
and arranged data in non-redundant way. In traditional file system, each group of organization use to have
and maintain its own files, thus much of the data is stored twice and more, which is share wastage of
storage space and time leading to inconsistency. But in the Data base system all data is integrated , that
help in controlling redundancy .
(7)Data can be Shared-
In data base system data can be easily shared by different users. Since the data is stored in a centralized
manner. For example, student data can be shared by teacher department, account office , and library etc .
(8)Better Controls
Better controls can be achieved due to the centralized nature of the system.
(9)Security- Multiple users share database but all can’t have same access to all information. Thus DBA
enforces these restriction to allow certain user with certain privileges to use certain data. Like some users
allowed only to retrieve data , some users are allowed both to retrieve and to update database.
(10)Providing Backup and Recovery- The DBMS also provides backup and recovery features.Database
has backup so that recovery of data fron S/W and H/W failures can be made.
(11)Flexibility - DBMS allow change to the structure of the database, with emerging need without affecting
the stored data and currently existing application programs.
Disadvantages of a DBMS -
(1)Not for simple applications: For small and simple applications for single users a database system is
often not advisable.
(2)Complexity: A database system creates additional complexity and requirements. The supply and
operation of a database management system with several users and databases is quite costly and
demanding.
(3)Qualified Personnel: The professional operation of a database system requires appropriately trained
staff. Without a qualified database administrator nothing will work for long.
(4)Costs: Through the use of a database system new costs are generated for the system itselfs but also for
additional hardware and the more complex handling of the system.
(5)Lower Efficiency: A database system is a multi-use software which is often less efficient than
specialized software which is produced and optimized exactly for one problem.
Functions of a DBMS –
The functions performed by a typical DBMS are the following:
(1)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.
(2)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.
(3)Data Security & Integrity-
The DBMS contains functions which handle the security and integrity of data in the application. These can
be easily invoked by the application and hencethe application programmer need not code these functions
in his/her programs.
(4)Data Recovery & Concurrency-
Recovery of data after a system failure and concurrent access of records by multiple users are also
handled by the DBMS
(5)Data Dictionary Maintenance-
Maintaining the Data Dictionary which contains the data definition of the application is also one of the
functions of a DBMS.
(6)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. Thus the DBMS provides an environment that is both convenient
and efficient to use when there is a large volume of data and many transactions to be processed
TYPES OF DATABASE USERS-
(1)Database administrators- Centralized control of the database is exerted by a person or group of
persons under the supervision of a high-level administrator(called DBA). DBA is Responsible for
authorizing access to the database, for co-coordinating and monitoring its use, acquiring software, and
hardware resources, controlling its use and monitoring efficiency of operations.
(2) Database Designers- They are responsible for designing the database structure. They are used
different models and designing tools like algorithms, DFD, Flowcharts , E-R models to define the content,
the structure, the constraints, and functions.
(3)Application programmer – Professional programmers, who are responsible for developing application
programs and user interface. The application programmers could be written in general purpose language
such as VB, VB.net, C/C++/Java /VC++.
(4) End users - End users are the people whose jobs require access to the database for querying,
updating, and generating reports; the database primarily exists for their use. There are several
categories of end users:
(i)Casual End User-access database occasionally when needed. But they may need different information
each time. They are basically high level managers. EXample- director of institute, Managers of bank etc.
(ii) Naïve or Parametric End user – Naïve user are regular user and has no knowledge of database
system and its any supporting software . they make up a large section of the end-user population. They
use previously well-defined functions and they make up a sizable portion of a database
Example- ATM users , reservation clerks etc.
(iii)Sophisticated End User : These include business analysts, scientists, engineers, others thoroughly
familiar with the system capabilities. Many use tools in the form of software packages that work closely
with the stored database.
(iv)Stand-alone End User :Mostly maintain personal databases using ready-to-use package applications.
. They maintain personal database by using ready-made packages that provide easy to use menu and
graphical interface.
(4)Defining Backup / Recovery Procedures-The DBA also defines procedures for backup and recovery.
Defining backup procedures includes specifying what data is to backed up, the periodicity of taking
backups and also the medium and storage place for the backup data.
(5)Monitoring Performance-The DBA has to continuously monitor the performance of the queries and
take measures to optimize all the queries in the application.
(6)Updating the database- DBA is also responsible for updating database time to time.
(7)Selection of hardware and software- DBA selects all H/W and S/W which are necessary for database.
(8) Managing data dictionary- Data dictionary contains meta-data that describes the data and data
processing units.
Early information system or file oriented (Data processing )system Vs. Data
Management Systems-
The generalized architecture of a database system is called ANSI (American National Standard Institute)
and SPARC(standard Planning and Requirement Committee). According to this approach , three levels of
a database system were suggested and they are –
(i)External level (User View) (ii) Conceptual level (logical View) (iii)Internal Level(Physical View) .
Schema- The view at each of these level is described by a schema. The logical structure and description
of a database is called schema . The schema for the external and internal levels is kept by the database in
its data dictionary, also known as the catalogue or system tables.
(i)External level( User View)- The external or user view is at the highest level of database abstraction ,
where only those portions of the database included which is directly concerned with user/application
programmer.
Each external view is described by a schema called external schema. The external schema consist
of the definition of the logical records and the relationship in the external view or level.
The external level also called the user level is concerned with the way by which the data is seen by
individual user.
(ii)Conceptual level (Logical view)- It is the logical model of whole database and the DBA is responsible
for the maintenance of the conceptual schema. Its hides the details of physical storage structure. At the
conceptual level to describe the structure and constraints for the whole database for a community of users.
Uses a conceptual or an implementation data model.( describes data relationships among the data Logical
level).
Each Conceptual view is described by a schema called Conceptual schema.
(iii)Internal level (Physical view) – The lowest level of abstraction describes how the data are stored in
the database, and what relationship exist among those data. At the internal level to describe physical
storage structures and access paths.
Each Physical view is described by a schema called Physical or internal schema. Internal schema
defines the records , indexes , files and other physical attributes. The internal schema uses a physical data
model and describes the complete details of data storage and access path for the database.
Data independence-
One of the biggest advantage of database is data independence. The three-schema architecture can be
used to explain the concept of data independence, which can be defined as the capacity to change the
schema at one level of a database system without having to change the schema at the next higher level. We
can define two types of data independence:
Definition - “ Data independence the ability to change or modify schema definition in one
level without affecting schema definition in the next higher level is called data independence
“.
1. Logical data independence is the capacity to change the conceptual schema without having to
change external schemas or application programs. We may change the conceptual schema to expand
the database (by adding a record type or data item), or to reduce the database (by removing a record
type or data item). In the latter case, external schemas that refer only to the remaining data should
not be affected. Only the view definition and the mappings need be changed in a DBMS that supports
logical data independence. Application programs that reference the external schema constructs must
work as before, after the conceptual schema undergoes a logical reorganization. Changes to
constraints can be applied also to the conceptual schema without affecting the external schemas or
application programs.
2. Physical data independence is the capacity to change the internal schema without having to change
the conceptual (or external) schemas. Changes to the internal schema may be needed because some
physical files had to be reorganized—for example, by creating additional access structures—to
improve the performance of retrieval or update. If the same data as before remains in the database,
we should not have to change the conceptual schema.