You are on page 1of 49

DBMS

DATA & INFORMATION


DATA INFORMATION
Raw Facts & Figures Processed form of Data

E.g. 23 is Data E.g. When data is stored in row and


column form, it becomes information-

Age 23

Not significant to a business and of significant to a business and of itself.


itself E.g. 23 is insignificant for business but
age 23 is significant for a business.
Atomic Level pieces of information Collection of data.
E.g. age and 23 collected together to form
information.
Does not help in Decision Making Helps in Decision Making
NEED OF INFORMATION
 To gain knowledge about surroundings.

 To keep the system up to date.

 To know about the Rules & Regulations & laws of


society,
local government etc.

 To arrive at a particular decision for planning


KNOWLEDGE
Information containing wisdom is knowledge

and

derived from the fundamental processing &


organizing.
TYPES OF KNOWLEDGE
 Fact based or Information based

- Knowledge gained from fundamentals and through

experiments. For e.g. Experiments, Rules & Regulations.

 Heuristic – Knowledge of Practice, Experience and good

Judgment (Hypothesis).
DATABASE
 The related information when placed in an

organized form makes a Database.

 E.g. In Dictionary, words are arranged in

alphabetic order along with their meanings.


OPERATIONS PERFORMED
 For e.g. Address Book in Cell phone.

 To add new information.

 To view or retrieve the stored information.

 To modify or edit the existing information.

 To remove or delete the unwanted information.

 Arranging/Sorting the information in a desired


order.
MANUAL DATABASE
It is the record keeping system in which human being

manages the whole database without the support of

computers.

For e.g. Address Dictionary (space), A/Cs Dept.

(without system).
COMPUTERIZED
DATABASE
 Large Storage Capacity.

 High Speed.

 More Accurate.

 Data can be stored in the forms of file, records

and fields.
FILE PROCESSING
SYSTEM(FPS)

It is a method for storing and organizing computer

files and the data they contain to make it easy to

find and access them. File systems may use a

storage device such as a HDD or CD-ROM.


CHARACTERISTICS OF FPS
 Store group of files of an organization.

 Each file is independent from one another.

 Each file contained and processed information for one specific


function.

 Files are designed by using programs written in programming


languages.

 Physical changes resulted in intensive rework on the part of the


programmer.

 Offer little flexibility and it is difficult to maintain.


LIMITATIONS OF FPS
 Separated and Isolated Data

 Duplication of Data

 Data Dependence

 Difficulty in representing data from the user’s view

 Data Inflexibility

 Incompatible file formats


DATABASE APPROACH
 Database is a shared collection of logically related data, designed to

meet the information needs of an organization.

Or
 Database is a computer based record keeping system whose overall

purpose is to record and maintain information.

Or
 Database is a single, repository of data, which can be used

simultaneously by many departments and users.


CHARACTERISTICS of
DATABASE
 Shared

 Persistence

 Validity/Integrity/Correctness

 Security

 Consistency

 Non-Redundancy

 Independence
DATABASE MANAGEMENT
SYSTEM

It is a Software System that allows users to

define, create and maintain a database and

provides controlled access to the data.


COMPONENTS OF DBMS
ENVIRONMENT
 Hardware

 Software

 Data

 Users

 Procedures (Methods)
TYPES OF USERS
 Naive Users: e.g. ATM user.

 Online Users: Who communicate with database via online Terminal.

 Sophisticated Users: Who request through database query language.

 Specialized Users: Users who write specialized database


applications. e.g. CAD systems, knowledge base and expert system
etc.

 Application Programmers: e.g. Professional programmers who


develop user interface/application programs.

 DBA (DataBase Administrator): Who give privileges to users.


ADVANTAGES OF DBMS
 Controlling Redundancy

 Integrity can be enforced

 Inconsistency can be avoided

 Data can shared

 Standards can be enforced

 Restricting unauthorized access

 Solving enterprise requirement than individual requirement

 Providing Backup and Recovery


DISADVANTAGES OF DBMS
 Complexity

 Size

 Performance

 Higher impact of a failure

 Cost of DBMS

 Additional Hardware Costs

 Cost of Conversion
FILE MANAGEMENT SYSTEM V/S
DATABASE MANAGEMENT SYSTEM

FILE MANAGEMENT SYSTEM DATABASE MANAGEMENT SYSTEM


(C++ or COBOL) (ORACLE or SYBASE)
Small systems Large systems
Relatively Cheap Relatively Expensive
Few Files Many Files
Files are Files Files are tables
Simple Structure Complex Structure
Redundant Data Reduced Redundancy
Chances of Inconsistency Consistent
Isolated Data Data can be shared
Little Preliminary Design Vast Preliminary Design
Integrity Left to application programmer Rigorous inbuilt integrity checking
No Security Rigorous Security
Simple, Primitive Backup/ Recovery Complex, Primitive Backup/ Recovery
Single User Multiple User
THREE LEVEL ARCHITECTURE OF
DBMS

 External Level or View Level: User’s View

 Conceptual Level or Logical Level:


Community View

 Internal Level or Storage Level: Physical


Representation of the database on the computer.
External Level or View
Level
It describes only that part of the
database that is relevant to user.

The system provide many views for the


same database.
For e.g. One use may view Date in the form (day, month, year),
while another may view as (year, month, day).
Conceptual Level or Logical
Level

It describes what data is stored in the database and


the relationships among them.
It represents:
• All entities, their attributes and their relationships.

Entity is an object whose information is stored in the database. E.g. In


student database the entity is student.

Attribute is a characteristic of interest about an entity. E.g. In student


database Roll No., Name, Class, Address etc are attributes of entity
student.
Internal Level or Storage
Level
It is physical representation of database
on the Computer.
It describes details of how data is stored
in the database:
files, indices, etc. on the random access disk
system. It also typically describes the record layout
of files and type of files (It concerns the way the
data are physically stored on the hardware).
For e.g. Roll No. Data Type: No. Memory: 6 bytes(0 to 5) .
Name. Data Type: Char. Memory: 20 bytes.
THREE LEVEL ARCHITECTURE OF
DBMS Cont…

 There will be only 1 Conceptual


view, consisting of the abstract
representation of the database.

 There will be only 1 Internal view,


representing the total database, as
it is physically stored.
THREE LEVEL ARCHITECTURE OF
DBMS Cont…

External View A External View B

Conceptual View DBMS

Stored Database (Internal View)


INSTANCE
The collection of information stored in the

database at a particular moment is called

Instance of the database.

Instance means example.


SCHEMAS
 The overall design of the database is called the
database Schema.

 Schema displays only names of the record types


(entities) and names of data items (attributes) and
does not show any relationships among the various
files.

 In short “the description of a database is


called the database schema”.
EXAMPLE Schema

P# P Name PRODUCT PRICE CITY


P1 Rahat Computers Printers 5000 Patiala

P2 Ruhani Info. Monitors 6000 Jalandhar


System
P3 IBM Keyboard 1200 Qadian

Instances
Types of Schema
 External Schema

 Conceptual Schema

 Internal Schema
External Schema

• It corresponds to different views of


data.
Conceptual Schema

It describes all the entities, attributes


and relationships together with integrity
Constraints.
Internal Schema
It is a complete description of internal
model, containing information of
stored records, the method of
representation, the data fields and the
indexes used.
Mapping between Views

 External/Conceptual Mapping

 Conceptual/Internal Mapping
External/Conceptual
Mapping
• It gives the correspondence among the records and the
relationships of the external and conceptual views.

• External view is an abstraction of the conceptual view, which in


turn is an abstraction of the internal view.

• It describes the contents of the database as perceived by the


user or application program of that view.

For e.g. Names of the fields and records, for instance may be different. A no.
of conceptual fields can be combined into a single external field, like
Last_Name and First_Name at the conceptual level but Name at the external
level.
Conceptual/Internal
Mapping
 It enables the DBMS to find the actual
records or combination of records in
physical storage that constitute an
logical record in conceptual schema.

 Mapping between the conceptual and


the internal levels specifies the
method of deriving the conceptual
record from the physical database.
Data Independence

Means that upper levels are


unaffected by changes in the lower
level.
Types of Data
Independence

 Logical Data Independence

 Physical Data Independence


Logical Data Independence

It indicates that the conceptual schema


can be changed without affecting the
existing external schema.

For e.g. Names of the fields and records, for


instance may be different. A no. of conceptual
fields can be combined into a single external field,
like Last_Name and First_Name at the conceptual
level but Name at the external level. Now if the
First and Last name is joined in Conceptual level it
will not result in any change in External level.
Physical Data
Independence
It indicates that the physical storage
structures or devices could be changed
without affecting conceptual schema.

For e.g. If there is a need to change the file


organization or the type of physical device used as a
result of growth in the database or new technology, a
change is required in the conceptual/internal
mapping between the conceptual and internal levels.
Procedure for Database
Access

Request Specific Request Input/Output


User’s Query Specific Block
Record

DMBS User Data File Disk


Interface Manager Manager Manager Database

Block Requested RecordRequested Block Block from


Response to User secondary storage
Role Of DBA
 Makes Decision concerning the content of the Database: What
information is to be held in the database.

 Plans storage structures and access strategies: How the data is to be


represented in the database.

 Provides support to users: What data users need.

 Defines security and integrity checks: Providing Authorization and


Authentication checks so no unauthorized users access database.

 Interprets backup and recovery strategies: To provide Recovery


strategy.

 Monitoring performance and responding to changes in requirements:


Organizing the system to get the performance that is “Best for
Enterprise” and for making appropriate adjustments/change.
DBMS Teams
Data Manager: Central software
component of DBMS.

File Manager: Manages structure of the


files and files space.

Disk Manager: Part of operating system of


the host computer and all physical
input/output operations performed by it.
Data Dictionary
Database about database.
It holds following information:
 Name

 Type

 Range of Values

 Source

 Access Authorization

 Indicates which application programs use the data

so that when a change in a data structure is


contemplated, a list of the affected programs can
be generated.
For e.g. Name = Caddy John = First Name, Last Name
Data Dictionary Cont…
 Data Dictionary provides the name of a data
element, its description and data structure
in which it may be found.

 Data Dictionary provides assistance in


producing a report of where a data element
is used in all programs that mention it.

 It is also responsible for a data name,


keywords that describe the name.
Database Languages
Database languages are used to create and
maintain database on computer. For e.g.
Oracle, MS Access, dBase, FoxPro etc. SQL
statements commonly used in Oracle and MS
Access are:

 Data Definition Language (DDL)


 Data Control Language (DCL)
 Data Manipulation Language (DML)
Data Definition Language (DDL)
 It is a language that allows the users to define data and
their relationship to other types of data.
 It is mainly used to specify the structure of each table, set
of associated values with each attribute, integrity
constraints, security and authorization information for
each table and physical storage structure of each table on
disk.

Sr. No. Need and Usage The SQL DDL


Statement
1 Create schema CREATE
objects
2 Alter schema objects ALTER
3 Delete schema objectsDROP
Data Manipulation Language
(DML)
 It is a language that provides a set of operations to support the basic data manipulation
operations on the data held in the database.
 It allows users to insert, update, delete and retrieve data from the database.
 The part of DML that involves data retrieval is called a query language.

Sr. No. Need and Usage The SQL DML


Statement
1 Remove rows from tables or views DELETE
2 Add new rows of data into table or INSERT
view
3 Retrieve data from one or more SELECT
tables
4 Change column values in existing UPDATE
Data Control Language
(DCL)
 DCL statements control access to data and the database
using statements such as GRANT and REVOKE.
 A privilege can either be granted to a User with the help of
GRANT statement.
 The privileges assigned can be SELECT, ALTER, DELETE,
EXECUTE, INSERT, INDEX etc.
 In addition to granting of privileges, you can also revoke it by
using REVOKE command.

Sr. No. Need and Usage The SQL DCL


Statement
1 Grant and take away GRANT & REVOKE
privileges and roles
2 Add a comment to the COMMENT

You might also like