Professional Documents
Culture Documents
What is a Database?
A database is a collection of related data which represents some aspect of the real world. A
database system is designed to be built and populated with data for a certain task.
What is DBMS?
Database Management System (also known as DBMS) is a software for storing and retrieving
users' data by considering appropriate security measures. It allows users to create their own
databases as per their requirement.
It consists of a group of programs which manipulate the database and provide an interface
between the database. It includes the user of the database and other application programs.
The DBMS accepts the request for data from an application and instructs the operating system to
provide the specific data. In large systems, a DBMS helps users and other third-party software to
store and retrieve data.
Example of a DBMS
Let us see a simple example of a university database. This database is maintaining information
concerning students, courses, and grades in a university environment. The database is organized
as five files:
We need to specify the structure of the records of each file by defining the different types
of data elements to be stored in each record.
We can also use a coding scheme to represent the values of a data item.
Basically, your Database will have 5 tables with a foreign key defined amongst the
various tables.
Users in a DBMS environment
Following, are the various category of users of a DBMS system
End-Users The end users are the people who interact with
the database management system. They conduct
various operations on database like retrieving,
updating, deleting, etc.
MySQL
Microsoft Access
Oracle
PostgreSQL
dBASE
FoxPro
SQLite
IBM DB2
LibreOffice Base
MariaDB
Microsoft SQL Server etc.
Application of DBMS
The traditional file oriented approach to information processing has for each application a
separate master file and its own set of personal file. In file oriented approach the program
dependent on the files and files become dependent on the files and files become dependents upon
the programs
1) Data redundancy and inconsistency: The same information may be written in several files.
This redundancy leads to higher storage and access cost. It may lead data inconsistency that is
the various copies of the same data may longer agree for example a changed customer address
may be reflected in single file but not else where in the system.
2) Difficulty in accessing data : The conventional file processing system do not allow data to
retrieved in a convenient and efficient manner according to user choice.
3) Data isolation : Because data are scattered in various file and files may be in different formats
with new application programs to retrieve the appropriate data is difficult.
4) Integrity Problems: Developers enforce data validation in the system by adding appropriate
code in the various application program. How ever when new constraints are added, it is difficult
to change the programs to enforce them.
6) Concurrent access: In the file processing system it is not possible to access a same file for
transaction at same time
7) Security problems: There is no security provided in file processing system to secure the data
from unauthorized use.
DATABASE ADMINISTRATOR
the people responsible for managing databases are called database administrators. Each database
administrator,dubbed DBA for the sake of brevity may be engaged in performing various
database manipulation tasks such as
archiving, testing, running, security control etc. all related to the environmental side of the
databases.
4. Data backup
5. Database recovery
If there are back up facilities, are there also journalizing, checkpoint, and recovery facilities?
Yes
USERS IN DBMS
Users are of 4 types:
1. Application programmers or Ordinary users
2. End users
3. Database Administrator (DBA)
4. System Analyst
1. Application programmers or Ordinary users: These users write application programs to
interact with the
database. Application programs can be written in some programming language such a COBOL,
PL/I, C++,
JAVA or some higher level fourth generation language. Such programs access the database by
issuing the
appropriate request, typically a SQL statement to DBMS.
End Users: End users are the users, who use the applications developed. End users need not
know about the
working, database design, the access mechanism etc. They just use the system to get their task
done. End users
are of two types:
a) Direct users b) Indirect users
a) Direct users: Direct users are the users who se the computer, database system directly, by
following
instructions provided in the user interface. They interact using the application programs already
developed, forgetting the desired result. E.g. People at railway reservation counters, who directly
interact with database.
b) Indirect users: Indirect users are those users, who desire benefit form the work of DBMS
indirectly. Theyuse the outputs generated by the programs, for decision making or any other
purpose. They are just concerned
with the output and are not bothered about the programming part.
3. Database Administrator (DBA): Database Administrator (DBA) is the person which makes
the strategicand policy decisions regarding the data of the enterprise, and who provide the
necessary technical support for
implementing these decisions. Therefore, DBA is responsible for overall control of the system at
a technicallevel. In database environment, the primary resource is the database itself and the
secondary resource is the DBMS and related software administering these resources is the
responsibility of the Database Administrator(DBA).
4. System Analyst: System Analyst determines the requirement of end users, especially naive
and parametric
end users and develops specifications for transactions that meet these requirements. System
Analyst plays a
major role in database design, its properties; the structure prepares the system requirement
statement, which
involves the feasibility aspect, economic aspect, technical aspect etc. of the system.
Figure:
Example
Internal level: It is the lowest level of data abstraction that deals with the physical representation
of thedatabase on the computer and thus, is also known as physical level. It describes how the
data is physicallystored and organized on the storage medium. At this level, various aspects are
considered to achieve optimalruntime performance and storage space utilization. These aspects
include storage space allocationtechniques for data and indexes, access paths such as indexes,
data compression and encryption techniques,and record placement.
Conceptual level: This level of abstraction deals with the logical structure of the entire
database and it is
also known as logical level. It describes what data is stored in the database, the relationships
among the dataand complete view of the user’s requirements without any concern for the
physical implementation. It hidesthe complexity of physical storage structures. The conceptual
view is the overall view of the database and itincludes all the information that is going to be
represented in the database.
External level: It is the highest level of abstraction that deals with the user’s view of the
database and it isalso known as view level. Most of the users and application programs do not
require the entire data stored inthe database. The external level describes a part of the database
for a particular group of users. It permitsusers to access data in a way that is customized
according to their needs, so that the same data can be seenby different users in different ways at
the same time. It provides a powerful and flexible security mechanism by hiding the parts of the
database from certain users, as the user is not aware of existence of any attributes
that are missing from the view.
Types of
DBMS
Typ
es of DBMS
Relational database – This is the most popular data model used in industries. It is based on the
SQL. They are table oriented which means data is stored in different access control tables, each
has the key field whose task is to identify each row. The tables or the files with the data are
called as relations that help in designating the row or record, and columns are referred to
attributes or fields. Few examples are MYSQL(Oracle, open source), Oracle database (Oracle),
Microsoft SQL server(Microsoft) and DB2(IBM).
Object oriented database – The information here is in the form of the object as used in object
oriented programming. It adds the database functionality to object programming languages. It
requires less code, use more natural data and also code bases are easy to maintain. Examples are
ObjectDB (ObjectDB software).
Images Source: Free Coloring Pages
Object relational database – Relational DBMS are evolving continuously and they have been
incorporating many concepts developed in object database leading to a new class called extended
relational database or object relational database.
Hierarchical database – In this, the information about the groups of parent or child
relationships is present in the records which is similar to the structure of a tree. Here the data
follows a series of records, set of values attached to it. They are used in industry on mainframe
platforms. Examples are IMS(IBM), Windows registry(Microsoft).
Network database – Mainly used on a large digital computers. If there are more connections,
then this database is efficient. They are similar to hierarchical database, they look like a cobweb
or interconnected network of records. Examples are CA-IDMS(COMPUTER associates),
IMAGE(HP).
Data dictionary
Introduction
At this point, everyone would have an idea of what is data dictionary. It is a dictionary about the
data that we store in the database. It contains all the information about the data objects. It is like
storing all up-to-date information about the objects like tables, columns, index, constraints,
functions etc. It makes us easily identify access and understand the factors about the object. One
can imagine data dictionary as storing information about house like house name, address, how
many live in the house, who is the eldest/youngest person, responsibilities of each member in the
house etc. or a personal details of an employee in the company.
In the case of a table, data dictionary provides information about
Its name
Security information like who is the owner of the table, when was it created, and when it
was last accessed.
Physical information like where is the data stored for this table
Structural information like its attribute names and its datatypes, constraints and indexes.
Below is the sample data dictionary view of the tables. (Only few of the columns are shown
below to get an idea of data dictionary). Since it is from USER view, it will list only those tables
which are created by current user. Hence no owner column is displayed below.
From above example it is clear that any data dictionary would contain
The definitions of all database objects like tables, views, constraints, indexes, clusters,
synonyms, sequences, procedures, functions, packages, triggers etc
It stores the information about how much space is allocated for each object and how
much space has been used by them
Any default values that a column can have are stored
Database user names - schemas
Access rights for schemas on each of the objects
Last updated and last accessed information about the object
Any other database information
All these informations are stored in the form of tables in the data dictionary.
Any changes to the database object structure via DDLs will have to be reflected in the data
dictionary. But updating the data dictionary tables for the changes are responsibility of database
in which the data dictionary exists. If the data dictionary is created in the same database, then the
DBMS software will automatically update the data dictionary. Hence there will not be any
mismatch between the actual structure and the data dictionary details. Such data dictionary is
called active data dictionary.
In some of the databases, data dictionary is created separately from the current database as
entirely new database to store only data dictionary informations. Sometimes it is stored as xml,
excels or in any other file format. In such case, an effort is required to keep data dictionary in
sync with the database objects. This kind of data dictionary is called passive data dictionary. In
this case, there is a chance of mismatch with the database objects and the data dictionary. This
kind of DD has to be handled with utmost care.