Module 1
Module 1
Academic Calendar
Syllabus
Evaluation Pattern
Abridged Lesson Plan
Introduction
• Databases play a critical role in almost all areas where computers are
used.
• A database is a collection of related data.
• By data, we mean known facts that can be recorded and that have
implicit meaning.
• For example, consider the names, telephone numbers, and addresses of
the people.
• Data can also be recorded in an indexed address book or stored on a
hard drive, using a personal computer and software such as Microsoft
Access or Excel.
• This collection of related data with an implicit meaning is a database.
Introduction
• Database has the following implicit properties:
• A database represents some aspect of the real world,
sometimes called the miniworld or the universe of discourse
(UoD).
• A database is a logically coherent collection of data with some
inherent meaning. A random assortment of data cannot correctly
be referred to as a database.
• A database is designed, built, and populated with data for a
specific purpose. It has an intended group of users and some
preconceived applications in which these users are interested.
Introduction
• For a database to be accurate and reliable at all times, it must be
a true reflection of the miniworld that it represents.
• Therefore, changes must be reflected in the database as soon as
possible.
• A database can be of any size and complexity.
• A database may be generated and maintained manually, or it may
be computerized.
• A database management system (DBMS) is a computerized
system that enables users to create and maintain a database.
Introduction
• 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 involves specifying the data types,
structures, and constraints of the data to be stored in the
database.
• The database definition or descriptive information is also stored
by the DBMS in the form of a database catalog or dictionary; it is
called meta-data.
Introduction
• Constructing the database is the process of storing the data on
some storage medium that is controlled by the DBMS.
• Manipulating a database includes functions such as querying the
database to retrieve specific data, updating the database to
reflect changes in the miniworld, and generating reports from the
data.
• Sharing a database allows multiple users and programs to access
the database simultaneously.
Introduction
• An application program accesses the database by sending
queries or requests for data to the DBMS.
• A query typically causes some data to be retrieved; a transaction
may cause some data to be read and some data to be written into
the database.
• We will call the database and DBMS software together a database
system.
Characteristics of database approach
• In traditional file processing, each user defines and implements
the files needed for a specific software application as part of
programming the application.
• 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 repeatedly
through queries, transactions, and application programs.
Characteristics of database approach
• The main characteristics of the database approach versus the file-
processing approach are the following:
• Self-describing nature of a database system
• Insulation between programs and data, and data abstraction
• Support of multiple views of the data
• Sharing of data and multiuser transaction processing
Characteristics of database approach
Self-Describing Nature of a Database System
• Database system contains not only the database itself but also a
complete definition or description of the database structure and
constraints.
• This definition is stored in the DBMS catalog, which contains
information such as the structure of each file, the type and storage
format of each data item, and various constraints on the data.
• The information stored in the catalog is called meta-data
Characteristics of database approach
Self-Describing Nature of a Database System
• Some newer types of database systems, known as NOSQL systems, do
not require meta-data.
• Rather the data is stored as self-describing data that includes the data
item names and data values together in one structure.
• The DBMS software must work equally well with any number of
database applications. (University, Banking, E-Commerce, etc.)
• In traditional file processing, data definition is typically part of the
application programs themselves.
• Hence, these programs are constrained to work with only one specific
database, whose structure is declared in the application programs.
Characteristics of database approach
Insulation between Programs and Data, and Data Abstraction
• 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.
Characteristics of database approach
Insulation between Programs and Data, and Data Abstraction
• In some types of database systems (object-oriented database
systems), users can define operations on data as part of the database
definitions.
• An operation (a function or method) is specified in two parts. The
interface of an operation includes the operation name and the data
types of its arguments.
• The implementation of the operation is specified separately and can be
changed without affecting the interface.
• User application can operate on the data by invoking these operations
through their names and arguments, regardless of how the operations
are implemented. This is termed as program-operation independence.
Characteristics of database approach
Insulation between Programs and Data, and Data Abstraction
• The characteristic that allows program-data independence and
program-operation independence is called data abstraction.
• A DBMS provides users with a conceptual representation of data
that does not include many of the details of how the data is stored
or how the operations are implemented.
• Informally, a data model is a type of data abstraction that is used
to provide this conceptual representation.
Characteristics of database approach
Insulation between Programs and Data, and Data Abstraction
• The data model uses logical concepts, such as objects, their
properties, and their interrelationships, that may be easier for
most users to understand than computer storage concepts.
• Hence, the data model hides storage and implementation details
that are not of interest to most database users.
Characteristics of database approach
Support of Multiple Views of the Data
• A database typically has many types of 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.
• A multiuser DBMS whose users have a variety of distinct
applications must provide facilities for defining multiple views.
Characteristics of database approach
Sharing of Data and Multiuser Transaction Processing
• A multiuser DBMS must allow multiple users to access the
database at the same time.
• This is essential if data for multiple applications is to be integrated
and maintained in a single database.
• 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.
• Online transaction processing (OLTP) applications.
Characteristics of database approach
Sharing of Data and Multiuser Transaction Processing
• A transaction is an executing program or process that includes
one or more database accesses, such as reading or updating of
database records.
• The isolation property ensures that each transaction appears to
execute in isolation from other transactions, even though
hundreds of transactions may be executing concurrently.
• The atomicity property ensures that either all the database
operations in a transaction are executed or none are.
Advantages • These capabilities are in addition to the
four main characteristics discussed.
of using the • The DBA must utilize these capabilities to
DBMS accomplish a variety of objectives related
to the design, administration, and use of a
approach large multiuser database.
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
Advantages times leads to several problems.