DBMS Introduction
DBMS Introduction
A Database Management System (DBMS) is a set of computer programs that controls the creation,
maintenance, and the use of a database. It allows organizations to place control of database development
in the hands of database administrators (DBAs) and other specialists. A DBMS is a system software
package that helps the use of integrated collection of data records and files known as databases. It allows
different user application programs to easily access the same database.
A database management system is a suite of software applications that together make it possible for
people or businesses to store, modify, and extract information from a database. Sound like something
found only in bank vaults? It's not. You can find database management systems many places in your
everyday life.
A collection of programs that enables you to store, modify, and extract information from a database.
There are many different types of DBMSs, ranging from small systems that run on personal computers to
huge systems that run on mainframes.
DBMS is used to overcome the problems caused due to the file-processing approach.
The DBMS (Database Management System) is preferred ever the conventional file processing system due
to the following advantages:
2. Elimination of Inconsistency
In the file processing system information is duplicated throughout the system. So changes made in one
file may be necessary be carried over to another file. This may lead to inconsistent data. So we need to
Warehouse of Information
The database management systems are warehouses of information, where large amount of data can be
stored. The common examples in commercial applications are inventory data, personnel data, etc. It often
happens that a common man uses a database management system, without even realizing, that it is being
used. The best examples for the same, would be the address book of a cell phone, digital diaries, etc. Both
these equipments store data in their internal database.
Defining Attributes
The unique data field in a table is assigned a primary key. The primary key helps in the identification of
data. It also checks for duplicates within the same table, thereby reducing data redundancy. There are
tables, which have a secondary key in addition to the primary key. The secondary key is also called
'foreign key'. The secondary key refers to the primary key of another table, thus establishing a relationship
between the two tables.
Systematic Storage
The data is stored in the form of tables. The tables consists of rows and columns. The primary and
secondary key help to eliminate data redundancy, enabling systematic storage of data.
Changes to Schema
The table schema can be changed and it is not platform dependent. Therefore, the tables in the system can
be edited to add new columns and rows without hampering the applications, that depend on that particular
database.
No Language Dependence
The database management systems are not language dependent. Therefore, they can be used with various
languages and on various platforms.
Table Joins
The data in two or more tables can be integrated into a single table. This enables to reduce the size of the
database and also helps in easy retrieval of data.
Data Security
Data is the most important asset. Therefore, there is a need for data security. Database management
Chapter1 - DBMS Fundamentals: 3
systems help to keep the data secured.
Privileges
Different privileges can be given to different users. For example, some users can edit the database, but are
not allowed to delete the contents of the database.
Data Consistency
Data consistency ensures a consistent view of data to every user. It includes the accuracy, validity and
integrity of related data. The data in the database must satisfy certain consistency constraints, for
example, the age of a candidate appearing for an exam should be of number datatype and in the range of
20-25. When the database is updated, these constraints are checked by the database systems.
The major purpose of a database system is to provide users with an abstract view of the system.
The system hides certain details of how data is stored and created and maintained. Complexity should be
hidden from database users.
Physical Level:
How the data are stored.
E.g. index, B-tree, hashing.
Lowest level of abstraction.
Complex low-level structures described in detail.
Conceptual Level:
Next highest level of abstraction.
Describes what data are stored.
Describes the relationships among data.
Database administrator level.
View Level:
Highest level.
Describes part of the database for a particular group of users.
Can be many different views of a database.
E.g. tellers in a bank get a view of customer accounts, but not of payroll data.
Fig. 1.1 (figure 1.1 in the text) illustrates the three levels.
Data models are a collection of conceptual tools for describing data, data relationships, and data
semantics and data constraints.
A data model in software engineering is an abstract model that describes how data are represented and
accessed. Data models formally define data elements and relationships among data elements for a
domain of interest.
According to Rao (1994), "The object-oriented database (OODB) paradigm is the combination of object-
oriented programming language (OOPL) systems and persistent systems. The power of the OODB comes
from the seamless treatment of both persistent data, as found in databases, and transient data, as found in
executing programs."
In contrast to a relational DBMS where a complex data structure must be flattened out to fit into tables or
joined together from those tables to form the in-memory structure, object DBMSs have no performance
overhead to store or retrieve a web or hierarchy of interrelated objects. This one-to-one mapping of object
programming language objects to database objects has two benefits over other storage approaches: it
provides higher performance management of objects, and it enables better management of the complex
interrelationships between objects. This makes object DBMSs better suited to support applications such
as financial portfolio risk analysis systems, telecommunications service applications, World Wide Web
document structures, design and manufacturing systems, and hospital patient record systems, which have
complex relationships between data.
x. Associative Model
The associative model divides the real-world things about which data is to be recorded into two sorts:
Entities are things that have discrete, independent existence. An entity’s existence does not depend on any
other thing. Associations are things whose existence depends on one or more other things, such that if any
of those things ceases to exist, then the thing itself ceases to exist or becomes meaningless.
An associative database comprises two data structures:
1. A set of items, each of which has a unique identifier, a name and a type.
2. A set of links, each of which has a unique identifier, together with the unique identifiers of three other
things, which represent the source, verb and target of a fact that is recorded about the source in the
database. Each of the three things identified by the source, verb and target may be either a link or an item.
Database Instance
The term instance is typically used to describe a complete database environment, including the RDBMS
software, table structure, stored procedures and other functionality. It is most commonly used when
administrators describe multiple instances of the same database. The information in a database at a
particular point in time is called an instance of the database.
Database Schema
Database schema is a description of the structure of a database or a directory (file systems).
There are 3 kind of schemas in Databases -
* conceptual schema which is a map of concepts and their relationships
* logical schema which is a map of entities and their attributes and relations
* physical schema which is a particular implementation of a logical schema
The ability to modify a scheme definition in one level without affecting a scheme definition in a higher
level is called data independence.
There are two kinds:
Scheme definition: the creation of the original database scheme. This involves writing a set
of definitions in a DDL (data storage and definition language), compiled by the DDL
compiler into a set of tables stored in the data dictionary.
Storage structure and access method definition: writing a set of definitions translated by
the data storage and definition language compiler
Scheme and physical organization modification: writing a set of definitions used by the
DDL compiler to generate modifications to appropriate internal system tables (e.g. data
dictionary). This is done rarely, but sometimes the database scheme or physical organization
must be modified.
Granting of authorization for data access: granting different types of authorization for data
access to various users
Integrity constraint specification: generating integrity constraints. These are consulted by
the database manager module whenever updates occur.
1-Tier Architecture
It is a simple form of standalone application architecture where everything resides in a single program. -
Tier Architecture is the simplest, single tier on single user, and is the equivalent of running an application
on a personal computer. The entire required components to run the application are located within it. User
interface, business logic, and data storage are all located on the same machine. They are the easiest to
design, but the least scalable. Because they are not part of a network, they are useless for designing web
applications.
2-Tier Architecture
2-Tier Architectures supply a basic network between a client and a server. For example, the basic web
model is a 2-Tier Architecture. A web browser makes a request from a web server, which then processes
the request and returns the desired response, in this case, web pages. This approach improves scalability
and divides the user interface from the data layers. However, it does not divide application layers so they
can be utilized separately. This makes them difficult to update and not specialized. The entire application
must be updated because layers aren’t separated.
N-Tier Architecture
Usually N-Tier Architecture begins as a 3-Tier model and is expanded. It provides finer granularity.
Granularity is the ability of a system, in this case, an application, to be broken down into smaller
components or granules. The finer the granularity, the greater is the flexibility of a system. It can also be
referred to as a system’s modularity. Therefore, it refers to the pulling apart of an application into separate
layers or finer grains.
N-Tier (Multi-Tier) architecture is a client-server architecture in which, the presentation, the application
processing and the data management are logically separate processes. For example, an application that
uses middleware to service data requests between a user and a database employs multi-tier architecture.
The most widespread use of "multi-tier architecture" refers to three-tier architecture.
Database systems are partitioned into modules for different functions. Some functions (e.g. file systems)
may be provided by the operating system.
Components include:
File manager manages allocation of disk space and data structures used to represent information
on disk.
Database manager: The interface between low-level data and application programs and queries.
Query processor translates statements in a query language into low-level instructions the
database manager understands. (May also attempt to find an equivalent but more efficient form.)
DML precompiler converts DML statements embedded in an application program to normal
procedure calls in a host language. The precompiler interacts with the query processor.
DDL compiler converts DDL statements to a set of tables containing metadata stored in a data
dictionary.
In addition, several data structures are required for physical system implementation: