You are on page 1of 10

COMP401: DATABASE MANAGEMENT SYSTEM (DBMS)

UNIT I

Concept Outline:
• Data is the known fact that can be recorded and that have implicit meaning.
• A collection of data designed to be used by different people is called database.
• The collection of information stored in database at a particular time is known as instance.
Database Management System:
DBMS is a combination of hardware and software that can be used to set up and monitor
a database, and can manage the updation and retrieval of database that has been stored in it. The
database management system is the major software component of a database system. Some
commercially available DBMS are Ingress, ORACLE and Sybase.
Capabilities of database management system:
i) Creating a file, addition to data, deletion of data, modification of data, creation, addition and
d3eletion of entire files.
ii) Retrieving data collectively or selectively.
iii) The data stored can be sorted or indexed at the user’s discretion and direction.
iv) To maintain data integrity and database use.
v) Mathematical function can be performed and the data stored in the database can be
manipulated with these functions to perform the desire calculations.

Characteristics of database:
1. Self- describing nature of a database system
The information stored in the catalog is called meta-data. A DBMS should be of self
describing nature as it not only contains the database itself but also the metadata. A metadata
defines and describes not only the extent, type structure, and format of all data but also
relationship between data.
2. Sharing of data and multiuser transaction processing
A multiuser DBMS, as its name implies, must allow multiple users to access the database
at the same time. This is essential if data for multiple application is to be integrated and
maintained in a single database.
3. 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. Some users may not need to be aware of whether the data
they refer to is stored or derived.
4. Backup and Recovery
There are many chances of failure of the whole database. At that time no one will be able
to get the database back and for sure company will be in a big loss. The only solution is to take
backup of database and whenever it is needed, it can be stored back. A database must have this
characteristic to enable more effectiveness.
5. Data Integrity
This is one of the most important characteristics of database management system. Integrity
ensures the quality and reliability of database system. It protects unauthorized access to the
database and makes it more secure. It brings only consistent and accurate data into the database.
6. Stores Any Kind of Data
A database management system should be able to store any kind of data. It should not be
restricted to employee name, salary, and address. Any kind of data that exists in the real world
can be stored in DBMS because we need to work with all kinds of data that is present around us.

Application of DBMS:
There are different fields where a database management system is utilized. Following are a few
applications which utilize the information base administration framework –
1. Railway Reservation System –
In the rail route reservation framework, the information base is needed to store the record or
information of ticket appointments, status about train’s appearance. Additionally, if trains get
late, individuals become acquainted with it through the information base update.
2. Library Management System –
There are loads of books in the library so; it is difficult to store the record of the relative
multitude of books in a register or duplicate. Along these lines, the data set administration
framework (DBMS) is utilized to keep up all the data identified with the name of the book,
issue date, accessibility of the book, and its writer.
3. Banking –
Database the executive’s framework is utilized to store the exchange data of the client in the
information base.
4. Education Sector –
Presently, assessments are led online by numerous schools and colleges. They deal with all
assessment information through the data set administration framework (DBMS). In spite of
that understudy’s enlistments subtleties, grades, courses, expense, participation, results, and
so forth all the data is put away in the information base.
5. Social Media Sites –
We all utilization of online media sites to associate with companions and to impart our
perspectives to the world. Every day, many people group pursue these online media accounts
like Facebook, Twitter, and Google in addition to. By the utilization of the data set
administration framework, all the data of clients are put away in the information base and,
we become ready to interface with others.
6. Online Shopping –
These days, web-based shopping has become a major pattern. Nobody needs to visit the shop
and burn through their time. Everybody needs to shop through web based shopping sites, (for
example, Amazon, Flipkart, Snapdeal) from home. So all the items are sold and added
uniquely with the assistance of the information base administration framework (DBMS).
Receipt charges, installments, buy data these are finished with the assistance of DBMS.
7. Human Resource Management –
Big firms or organizations have numerous specialists or representatives working under them.
They store data about worker’s compensation, assessment, and work with the assistance of
an information base administration framework (DBMS).

Advantages of database management system:


1. Sharing data:
A database allows the sharing the sharing of data under its control by any number of
application programs or users.
2. Data integrity:
Data integrity means that the data contained in the database is both accurate and
consistent.
3. Data security:
Confidential data must not be accessed by unauthorized person.
4. Data independence:
Data independence is advantageous in the database environment since it allows for
changes at one level of the database without affecting other level.
5. Better Data Transferring:
Database management creates a place where users have an advantage of more and
better managed data. Thus making it possible for end-users to have a quick look and to
respond fast to any changes made in their environment.
6. Faster data Access:
The Data base management system (DBMS) helps to produce quick answers to
database queries thus making data accessing faster and more accurate. For example, to read or
update the data.

DBMS Three Level Architecture Diagram/ Three level of schema:


The three level architecture is also called three schema architecture. It is used to describe the
structure of a database system.

Fig : Three level architecture

This architecture has three levels:


1. External level/ View level
2. Conceptual level/ Logical level
3. Physical level/ Internal level
1. External Schema
External level is the highest level. It is also called view level. The reason this level is
called “view” is because several users can view their desired data from this level which is
internally fetched from database with the help of conceptual and internal level mapping.
The user doesn’t need to know the database schema details such as data structure, table definition
etc. user is only concerned about data which is what returned back to the view level after it has
been fetched from database (present at the internal level). How to represent data.
Eg: university website. It can be only viewed and not update or delete.

2. Conceptual Schema
This is the second level. It is also called logical level. The whole design of the database
such as relationship among data, schema of data etc. are described in this level.
Database constraints and security are also implemented in this level of architecture. This level is
maintained by DBA (database administrator). What is stored.

3. Internal level
This is the lowest level. This level is also known as physical level. This level describes
how and where the data is actually stored in the storage devices. This level is also responsible for
allocating space to the data. This is the lowest level of the architecture.

Data independence:
Data independence means that, when the logical structure of database changes,
application programs are only minimally affected and require very little modification. Data
independence programs need not be repeatedly revised, redesigned or rewritten as the database
involves to accommodate new requirement.
There are two levels of data independence: logical data independence and physical data
independence
1. Logical data independence
Logical data independence indicates that the conceptual schema can be changed without
affecting the existing external schema. The change would be absorbed by the mapping between
the external and conceptual level.
2. Physical data independence:
Physical data independence indicates that the physical storage structures or derived used
for storing could be changed without necessitating a change in the conceptual view of the
external views. The change would be absorbed by the mapping between the conceptual level and
internal levels.
Database states, instance and schema:
The data in the database at a particular moment in time is called a database state. The collection
of data/information stored in the database at a particular time is called an instance. The complete
design of the database is called the database schema schema. Design of a database is called the
schema. Schema is of three types: Physical schema, logical schema and view schema.
For example: In the following diagram, we have a schema that shows the relationship
between three tables: Course, Student and Section. The diagram only shows the design of the
database, it doesn’t show the data present in those tables. Schema is only a structural
view(design) of a database.
Definition of instance: The data stored in database at a particular moment of time is called
instance of database. Database schema defines the variable declarations in tables that belong to a
particular database; the value of these variables at a moment of time is called the instance of that
database.
For example, lets say we have a single table student in the database, today the table has
100 records, so today the instance of the database has 100 records. Lets say we are going to add
another 100 records in this table by tomorrow so the instance of database tomorrow will have
200 records in table. In short, at a particular moment the data stored in database is called the
instance, that changes over time when we add or delete data from the database.
DBMS Schema.

Database schema: A schema is a collection of database objects. A schema is owned by a


database user and has the same name as that user. Schema objects are logical structures created
by users.
A database schema or an intention gives a description of the database. The description
of a database is called database schema. This can be considered as a blueprint of a database, and
gives a list of fields in the database with their data types. In other words, it describes the
organization and structure of data in a database system, along with the relationships mapped
between the entities.

STUDENT
Name Student_number Class Major

COURSE
Course_name Course_number Credit_hours Department

SECTION
Course_number Semester Year Instructor

Figure: Schema diagram for database

A database state provides the present state of the database and its data. The data in the database
at a particular moment of time is called database state. It can be considered as an extension of
the database schema. When a database is newly defined, the corresponding database state is
empty. Factors that affect a database state are entering, deleting or modifying information in the
database.

What Is a Data Dictionary?


A Data Dictionary Definition
A Data Dictionary is a collection of names, definitions, and attributes about data elements
that are being used or captured in a database, information system, or part of a research project. It
describes the meanings and purposes of data elements within the context of a project, and
provides guidance on interpretation, accepted meanings and representation. A Data Dictionary
also provides metadata about data elements. The metadata included in a Data Dictionary can
assist in defining the scope and characteristics of data elements, as well the rules for their usage
and application.
Why Use a Data Dictionary?
Data Dictionaries are useful for a number of reasons. In short, they:
• Assist in avoiding data inconsistencies across a project
• Help define conventions that are to be used across a project
• Provide consistency in the collection and use of data across multiple members of a
research team
• Make data easier to analyze
• Enforce the use of Data Standards

Database Users:
Database users are the ones who really use and take the benefits of the database. There will be
different types of users depending on their needs and way of accessing the database.
1. Database Administrator (DBA) :
Database Administrator (DBA) is a person/team who defines the schema and also controls the
3 levels of database.
The DBA will then create a new account id and password for the user if he/she need to access
the data base.
DBA is also responsible for providing security to the data base and he allows only the
authorized users to access/modify the data base.
2. Naive / Parametric End Users :
Parametric End Users are the unsophisticated who don’t have any DBMS knowledge but they
frequently use the data base applications in their daily life to get the desired results.
For examples, Railway’s ticket booking users are naive users. Clerks in any bank is a naive
user because they don’t have any DBMS knowledge but they still use the database and
perform their given task.
3. System Analyst :
System Analyst is a user who analyzes the requirements of parametric end users. They check
whether all the requirements of end users are satisfied.
4. Sophisticated Users :
Sophisticated users can be engineers, scientists, business analyst, who are familiar with the
database. They can develop their own data base applications according to their requirement.
They don’t write the program code but they interact the data base by writing SQL queries
directly through the query processor.
5. Database Designers :
Data Base Designers are the users who design the structure of data base which includes tables,
indexes, views, constraints, triggers, stored procedures. He/she controls what data must be
stored and how the data items to be related.
6. Application Program :
Application Program are the back end programmers who writes the code for the application
programs.They are the computer professionals. These programs could be written in
Programming languages such as Visual Basic, Developer, C, FORTRAN, COBOL etc.
7. Casual Users / Temporary Users :
Casual Users are the users who occasionally use/access the data base but each time when they
access the data base they require the new information, for example, Middle or higher level
manager.
Database Administrator (DBA) :
Database administrator is a person who creates updates and maintains the database. It is more
of a wide role as a data administrator might be someone who is hired to create, maintain, and
backup the database, optimize the database for high performance, or someone who helps in
integrating databases into applications. The major skills required to be an excellent database
administrator are troubleshooting, logical thought process, and a strong will to learn as it
involves a vast area. This role is also known as Database Coordinator or Database
Programmer.
Responsibilities:
• Create and design a database
• Analyze and monitor database requirements
• Ensures data security

Data Administrator (DA):


Data administrator is a person who is responsible for processing data into a convenient data
model. The person is in charge of figuring out which data is relevant to be stored in the
database. Data Administrator is less of a technical role and more of a business role with some
technical knowledge. This role is also known as Data Analyst. So, it is mostly a high level
function which is responsible for the overall management of data resources in an organization.
Responsibilities:
Filters out relevant data
Monitor the data flow throughout the organization
Designs concept-based data model
Analyze and break down the data to be understood by the non-tech person

Difference between Data Administrator (DA) and Database Administrator (DBA) :

DATA ADMINISTRATOR DATABASE ADMINISTRATOR

1. Data administrator is also known as data Database administrator is also known as


analyst. database coordinator or database programmer.

2. Data administrator converts data into a Database administrator inputs data into the
convenient data model. database.

3. Data administrator analyzes the database Database administrator optimizes and


for relevant data. maintains the database.

4. Data administrator monitors data flow Database administrator ensures database


across the organization. security.

5. Data administrator handles issues Database administrator handles issues with


concerning the data. the database.

6. Data administrator requires excellent data Database administrator mostly requires


analyzing, expression of ideas, and strategic logical thought process, troubleshooting and
thinking. will to learn.

7. Data administrator is less of a technical Database administrator is a wide role as it has


role and more of a business role. multiple responsibilities

8. Main tasks include data planning, Main tasks include database design,
definition, architecture and management construction, security, backup and recovery,
etc. performance tuning etc.

9. It set policies and standards, coordinates It enforces policies and procedures, choose
and manages database design. and maintains technology.

10. Generally it owns the data. Whereas it owns the database.

11. It performs the high level function. It performs the technical function.

12. Data administration is DBMS


independent. Database administration is DBMS specific.

DBMS languages:

Database languages are used to read, update and store data in a database. There are several such
languages that can be used for this purpose; one of them is SQL (Structured Query Language). A
DBMS has appropriate languages and interfaces to express database queries and updates.
Types of DBMS languages:

1. Data Definition Language (DDL)

DDL is used for specifying the database schema. It is used for creating tables, schema, indexes,
constraints etc. in database. Lets see the operations that we can perform on database using DDL:

• Create: It is used to create objects in the database.


• Alter: It is used to alter the structure of the database.
• Drop: It is used to delete objects from the database.
• Truncate: It is used to remove all records from a table.
• Rename: It is used to rename object.
• Comment: It is used to comment on the data dictionary.

All of these commands either defines or update the database schema that’s why they come under
Data Definition language.

2. Data Manipulation Language (DML)

DML is used for accessing and manipulating data in a database. The following operations on
database comes under DML:

• Select: It is used to retrieve data from database.


• Insert: It is used to insert data into table.
• Update: It is used to update existing data within a table.
• Delete: It is used to delete all records from a table.
3. Data Control language (DCL)

DCL is used for granting and revoking user access on a database. The DCL execution is
transactional. It also has rollback parameters.

• Grant: It is used to give user access privileges to a database.


• Revoke: It is used to take back permissions from the user.

4. Transaction Control Language (DCL)

TCL is used to run the changes made by the DML statement. TCL can be grouped into a logical
transaction.

• Commit: It is used to save the transaction on the database.


• Rollback: It is used to restore the database to original since the last commit.

You might also like