Dbms Notes1-1
Dbms Notes1-1
It is a collection of programs that enables users to create and maintain a database. The
DBMS is a general purpose software system that facilitates the processes of defining,
constructing, manipulating and sharing databases among various users and applications.
Defining a database…..
It involves specifying the data types, structures and constraints of the data to be stored in
the database. Meta data or data about data is also stored here.
Constructing a database…..
It is the process of storing the data on some storage medium that is controlled by the DBMS.
Manipulating a database…..
It includes functions such as querying the database to retrieve specific data, updating the
database to reflect changes in the environment and generating reports from the data.
Sharing a database…..
It allows multiple users and programs to access the database simultaneously.
Database examples:
Some DBMS examples include MySQL, PostgreSQL, Microsoft Access, SQL Server,
FileMaker, Oracle, RDBMS, dBASE, Clipper, and FoxPro etc.
A simplified database system environment
Users/Programmers
Application Programs/Queries
Software to process Queries/Programs
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.
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.
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-
processing system was used.
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.
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.
1. Controlling redundancy:
In traditional software development utilizing file processing, every user group maintains
its own files for handling its data processing applications. This redundancy in storing
the same data multiple times leads to several problems. Firstly, there is a duplication of
effort. Secondly, storage space is wasted when the same data is stored repeatedly. Also
inconsistency can arise among files containing same data.
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 only authorized persons are allowed to access such data. A
DBMS should provide a security and authorization subsystem, which the DBA uses to
create accounts and to specify account restrictions. New user accounts can be created
by only specialized users having privileges as that of the DBA.
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.
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.
A DBMS must provide facilities for recovering from hardware or software failures. The
backup and recovery subsystem of the DBMS is responsible for recovery. 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.
Because many types of users with varying levels of technical knowledge use a database,
a DBMS should provide a variety of user interfaces. These include query languages for
casual users, programming language interfaces for application programmers, menu
driven interfaces for standalone users. In general, GUI means menu driven and forms
driven user interfaces.
Most database applications have certain integrity constraints that must hold for the data.
A DBMS should provide capabilities for defining and enforcing these constraints. The
simplest type of integrity constraint involves specifying a data type for each data item.
The main aim of the 3 Schema architecture is to separate the user applications and the
physical database. The different levels are:
1. Internal level:
The internal level has an internal schema which describes the physical storage structure
of the database. The internal schema uses a physical data model and describes the
complete details of data storage and access paths for the database.
2. Conceptual level:
It has a conceptual schema which describes the structure of the whole database for a
community of users. The conceptual schema hides the details of physical storage
structures and concentrates on describing entities, data types, relationships, user
operations and constraints.
3. External level:
It includes a number of external schemas or user views. Each external schema describes
the part of the database that a particular user group is interested in and hides the rest
of the database from that user group.
The 3 schema architecture is a convenient tool with which the user can visualize the
schema levels in a database system. It has an important place in database technology
development because it separates the users’ external level, the system’s conceptual
level and the internal storage level for designing a database.
Data Independence
The 3 schema architecture can be used to further 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. There are two different types of
data independence: