Chapter 1 - Databases and Database Users: Prepared For II/IV B.Tech CSE of RVRJCCE
Chapter 1 - Databases and Database Users: Prepared For II/IV B.Tech CSE of RVRJCCE
Introduction
File-Based Systems
Database Systems
Since data resides in different private data files, there are chances of
redundancy and resulting inconsistency. For example, in the above example
shown, the same customer can have a savings account as well as a mortgage
loan. Here the customer details may be duplicated since the programs for the
two functions store their corresponding data in two different data files. This
gives rise to redundancy in the customer's data. Since the same data is
stored in two files, inconsistency arises if a change made in the data in one
file is not reflected in the other.
Unanticipated Queries
Data Isolation
In large multi-user systems the same file or record may need to be accessed
by multiple users simultaneously. Handling this in a file-based systems is
difficult.
Security Problems
Integrity Problems
In any application, there will be certain data integrity rules which needs to be
maintained. These could be in the form of certain conditions/constraints on
the elements of the data records. In the savings bank application, one such
integrity rule could be “Customer ID, which is the unique identifier for a
customer record, should be non-empty”. There can be several such integrity
rules. In a file-based system, all these rules need to be explicitly programmed
in the application program.
It may be noted that, we are not trying to say that handling the above issues like
concurrent access, security, integrity problems, etc., is not possible in a file-based
• A DBMS catalog stores the description of the database. The description is called
meta-data .
• 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, and hence 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 university database, a banking database, or a company
database—as long as the database definition is stored in the catalog.
• For example, a PASCAL program may have record structures declared in it; a C++
program may have "struct" or "class" declarations; and a COBOL program has Data
Division statements to define its files.
In a database
The structure of data files is stored in the DBMS catalog separately from
the access programs.
Changes to the structure of data files will not lead to changes to the
access programs, this property is called program-data independence.
• A database typically has many users, each of whom may require a different
perspective or view of the database.
• For example, one user of the database of Figure 2 may be interested only in the
transcript of each student; the view for this user is shown in Figure (a).
• A second user, who is interested only in checking that students have taken all the
prerequisites of each course they register for, may require the view shown in Figure
(b).
• A multi-user DBMS, as its name implies, must allow multiple users to access the
database at the same time.
• The DBMS must include concurrency control software to ensure that several users
trying to update the same data do so in a controlled manner so that the result of the
updates is correct.
• For example, when several reservation clerks try to assign a seat on an airline
flight, the DBMS should ensure that each seat can be accessed by only one clerk at a
time for assignment to a passenger.
These apply to "large" databases, not "personal" databases that are defined,
constructed, and used by a single person via, say, Microsoft Access.
A DBMS should provide the capability to automatically enforce the rule that
no inconsistencies are introduced when data is updated. (Figure 1.5 again.)
Active database systems go one step further by allowing "active rules" that can
be used to initiate actions automatically.