DBMS Unit 1
DBMS Unit 1
UNIT-1
DATA BASE MANAGEMENT SYSTEM
Ans: DATA: A Data is a raw fact. Data is the building blocks of Information.
Example of data are rollno, name, rama, 50000, age, Hyderabad, salary , address etc.,
DATABASE: A database is a collection of data about one particular organization. A database contains
one or more tables. A database is also known as “Schema”
SYMBOL of database:
DBMS: DBMS stands for Database Management System. It is a collection of programs used to create
a database structure, organize the database(add, modify or delete data ) and provide security for data
in a database. We use SQL to work with DBMS.
Examples of DBMS Software’s are: Oracle, MY SQL , MS-SQL, MS-Access etc.,
DATA INFORMATION
Data is raw fact and figures. Information is a processed form of data. For
For example: 32 in data. example: Age 32
Data is not significant to a business. Information is signification to a business.
Data are atomic level pieces of information. Information is a collection of data. For
It can be in the form of numbers, characters, example: Age and 32 collected together to
symbols, or even pictures. form information (Age 32).
Data does not help in decision making. Information helps in decision making.
Observations and recordings are done to Analysis is done to obtain information
obtain data.
Input to any system may be treated as data. Output after processing the system is
information.
Difficult to understand properly. Easy to understand.
Data must be processed to understand. Information is already in understandable
form. It may be processed further to make it
more understandable.
Data may not be in the order. Information should be in the order.
K.UMADEVI-AWDCKKD 1
BSC-DBMS
3Q. Write about Basic File Terminologies or Define the following : Table , Record, Field.
Ans: Field: A field is defined as a character or a group of characters that has a specific meaning. A field
is also known as “Attribute”.
Examples of fields are stno, sname, addr, fname, dob etc.,
Record: A record is defined as collection of related fields. A record is also known as “Tuple”.
Table: A table is defined as collection of records. A table is also known as “Entity” or “sub-schema” or
“File”.
4Q. What is File Processing System. What are drawbacks or limitation of File Processing System.
A file processing system(FPS) is a method of storing and organizing data in computer files.
In File processing system files are designed using programming languages like c, cobol, c++,java
etc.,
Here, Files are called “Flat Files”. It is best suited for small databases.
K.UMADEVI-AWDCKKD 2
BSC-DBMS
K.UMADEVI-AWDCKKD 3
BSC-DBMS
It is central repository of shared data. It allows several users to access the database
concurrently.
A fundamental feature of the database approach is that the database system does not only
contain the data but also the complete definition and description of these data. These
description are basically details about the extent, the structure, the type and the formant of
all data and, additionally, the relationship between the data. This kind of stored data is called
metadata (“data about data”).
A primary feature of the database approach is a standardized, uniform approach to database
access. This means that the same overall procedures are used by all applications programs to
retrieve data and information.
Data should be correct with respect to the real world entity that they represent.
Data should be protected from unauthorized access.
Its organization is such that duplication of data is minimized.
Data in a database exit permanently until it is not explicitly deleted.
A database system is composed of following four major components, which coordinate with each
other to form an effective database system.
(a) Data: It is a very important component of the database system. Most of the organizations
generate, store and process large amount of data. Data may be of different types:
1. User data: It consists of a table(s) of data called structure(s), where column(s) are called fields
or attributes and rows are called records or tuples for tables. A relation must be structured
properly.
2. Metadata: Metadata means “data about data”. It is a description about the structure of the
database. System tables store the metadata which includes basic information about the
design of each table, the data type of each field and various constraints set on them.
(b)Hardware: The hardware consists of the secondary storage devices such as magnetic disk (hard
disk, zip disk, floppy disk), optical disk (CD-ROM, DVD), magnetic tapes etc.
K.UMADEVI-AWDCKKD 4
BSC-DBMS
1. Operating system software: Manages all hardware components and acts as an interface between
user and the computer. Ex: Microsoft Windows, Linux, Unix.
2. DBMS software: Database s/w is used to create database structure and organize the database. Ex:
Oracle, MS SQL,MY SQL,MS Access etc.,
3. Application Software: Used to design an front-end application. Ex: Java, HTML,.NET etc.,
(i)Naive Users: Naive user has no knowledge of database system and about its any supporting
Software. These users uses the existing application to interact with the database.
Ex: ATMs, online library system, ticket booking systems etc.
(ii)Online Users: Online users are those who may communicate with the database directly via an
Online device or via a user interface and application program.
(iii)Application Programmer: Application Programmers are developers who are responsible for
Developing application programs.
(iv)DataBase Administrator(DBA): A person who is responsible for managing the overall database
Management system is called Database Administrator.
(v)End User: These are the people who interact with dbms to perform different operation on
Database such as retrieving,updating,inserting,deleting data etc.
7. What is DBMS? Explain about the advantages and disadvantages of DBMS(or objectives of
DBMS)?
INTRODUCTION TO DBMS:
“Data base management system (DBMS) is a software used to manage the database and its
various operations like insertion, deletion, updation and retrieval. It enables users to store, modify
and extract information from a database as per the requirements. It acts as an intermediator
between the user and the database”.
ADVANTAGES OF DBMS:
It has a number of advantages as compared to traditional file processing approach. The
major advantages of DBMS are:
1.Controlling Redundancy 6.Data Integration
2.Data Consistency 7.Integrity Rules
3.Improved Data Sharing 8.Data Independence
4.Improved Data Security 9.Data Atomicity
5.Improved Data Access 10.Backup and recovery procedures
K.UMADEVI-AWDCKKD 5
BSC-DBMS
Controlling redundancy:
In DBMS, all the data of an organization is integrated into a single database.
The data is recorded at only one place in the database and it is not duplicated.
By controlling redundancy, we can save storage space.
Data Consistency:
In the file processing system, information is duplicate throughout the system .so
changes made in one file may be necessary be carried over to another file.
Reduced data redundancy leads to better data consistency.
Improved Data Sharing:
In a paper-based record keeping, data cannot be shared among many users.
Data stored in DBMS can be shared among multiple users at the same time if they
are connected through a network.
The data can be shared by authorized users only.
Improved Data security:
Data security is the protection of database from unauthorized users.
DBMS provides a framework for better enforcement of data privacy and security
policies.
Improved Data Access:
Data in a database can be accessed and manipulated by means of a query.
DBMS sends output of query to the application.
Data Integration:
Data integrity means that the data contained in the database is both accurate and
consistent.
Therefore, data values being entered for storage could be checked to ensure that
they are of the correct format or not.
Integrity Rules:
Integrity constraints or consistency rules can be applied to database, so that the
correct data can be entered into the database.
Ex: primary key, foreign key, unique etc.
Data Independence:
The separation of database from the application program that is used to access the
data is called data independence.
In DBMS, the database and application programs are separated from each other.
Data Atomicity:
Any operation on database must be atomic i.e.it should either complete or not
occur at all.(all or none).
Backup and Recovery:
Most of the DBMSs provide the backup and recovery systems that automatically
create the backup and restoring the data if required.
K.UMADEVI-AWDCKKD 6
BSC-DBMS
DISADVANTAGES OF DBMS:
High cost
Complexity of Backup and recovery
Security Threats.
In the early 1970s, the ANSI-SPARC (American National Standard Institute-Standard Planning
and requirements committee) defined a frame work for data modelling on degrees of abstraction.
The term abstraction means the amount of detail you want to hide.
K.UMADEVI-AWDCKKD 7
BSC-DBMS
This framework is used for describing the structure of specific database system. In this, the database
schemas can be defined at 3 levels. So, this architecture is called as three level (or) ANSI-SPARC
Three-tier (or) Three schemes
DATA
The external level or user view is at the highest of the three level DBMS architecture.
This is the highest level of data abstraction.
It includes a number of user views of the database .
It is also known as view level.
Different views may have different representation of same data.
It describes only part of the entire database that is relevant to each user.
K.UMADEVI-AWDCKKD 8
BSC-DBMS
The lowest level of three level DBMS architecture is known as the internal level or internal
schema.
This is the lowest level of data abstraction.
It describes the physical structure of data in database.
It describes how the data items are stored in the physical storage devices (hard disk, CD, DVD,
Tape drives etc).
It deals with file structures, access methods, data compression and ecncryption techniques if
used.
Data Independence:
The ability to modify the schema definition in one level without affecting another level is
called data independence. They are of two types.
Physical Data Independence: The ability to modify a physical schema without causing
application programs to be rewritten.
Logical Data Independence: The ability to modify a logical schema without causing application
programs to be rewritten.
Classification of DBMS:
The DBMSs can be classified into different categories on the basis of several criteria’s. These
are classified according to: DBMS is categorized into types based on the following:
K.UMADEVI-AWDCKKD 9
BSC-DBMS
1.Based on the data model: Depending on the data model they use, the DBMS can be
classified as 1. Hierarchical Data Model
Single user Database–It can support only one user at a time. It is mostly used with the personal
computer on which the data resides accessible to a single person. The user may design, maintain and
write the database programs.
Multiple user Database– It supports multiple users concurrently. In this, data can be both integrated
and shared. It can be divided into two types.
→ Workgroup Database: When a multiuser database supports a small number of users (or) a
specific department in an organization, then it is called as workgroup database.
→ Enterprise Database: When the database is used by the entire organization, across many
departments, then it is known as enterprise database.
Centralized database – The DBMS and database are stored at the single site that is used by several
other systems is called centralized database. The data is maintained on the centralized server.
K.UMADEVI-AWDCKKD 10
BSC-DBMS
Distributed database – In this data and the DBMS software are distributed over several sites but
connected to the single computer.
2. Heterogeneous Database: If the different softwares are accessed to different systems then
it can be called as heterogeneous database.
K.UMADEVI-AWDCKKD 11
BSC-DBMS
Basic Building blocks: The basic building blocks of all data models are:
Hierarchical Model –
K.UMADEVI-AWDCKKD 12
BSC-DBMS
Advantages:
Simplicity
Data security
Data Integrity
Efficiency
Disadvantages:
Implementation complexity
Database Management problem
Lack of structural independence.
Network Model–
In early 1960s Charles Bachman created first database called as IDS(Integrated Data Store).
It is standardized by CODASYL(Conference on Data Systems Language).
It is also called as CODASYL model.
Mainly used on a large digital computers.
The main benefit of network model is, it provides many-to-many relationships.
If there are more connections, then this database is efficient.
Examples are CA-IDMS(COMPUTER associates), IMAGE(HP).
Advantages:
Conceptual simplicity
Easy to access data.
K.UMADEVI-AWDCKKD 13
BSC-DBMS
Data Integrity
Data Independence
Disadvantages:
System complexity
Absence of Structural independence
Relational Model–
Advantages:
Conceptual simplicity
Easy to access data.
Structural Independence
Design Implementation
Data Integrity
Data Security
K.UMADEVI-AWDCKKD 14
BSC-DBMS
Data Independence
Disadvantages:
Hardware overheads
cost
Object oriented Model – 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).
Object relational Model – 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.
K.UMADEVI-AWDCKKD 15