0% found this document useful (0 votes)
3 views14 pages

1. Introduction to Databases Concepts

The document provides an introduction to database concepts, including definitions of databases, Database Management Systems (DBMS), and their advantages. It discusses the characteristics of DBMS, such as data integrity, security, and independence, and outlines the three-schema architecture for data abstraction. Additionally, it highlights the components of a database system and the role of the query processor in managing database operations.

Uploaded by

totry.080
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views14 pages

1. Introduction to Databases Concepts

The document provides an introduction to database concepts, including definitions of databases, Database Management Systems (DBMS), and their advantages. It discusses the characteristics of DBMS, such as data integrity, security, and independence, and outlines the three-schema architecture for data abstraction. Additionally, it highlights the components of a database system and the role of the query processor in managing database operations.

Uploaded by

totry.080
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

1 INTRODUCTION TO

DATABASE CONCEPTS

Syllabus

Database, DBMS Definition, Overview of DBMS, Advantages of DBMS, Levels of abstraction, Data
independence, DBMS Architecture

1.1 Introduction to Database

Many of usare very much familiar with the term called as data. We come across term "data" regularly in our day
to day life.
The name of a person, the price of a book, number of students in a college, pin code of a city, etc. are some
examples of data.
Inour daily life, we may need to remember the bulk amount of data, which is quiet difficult for us due to memory
constraints.

Example :
We may be in a position to tellaccurately the age, height, income,educational qualification, residential address,
etc. of our close friends.

But it could be very difficult for us to memorize all these information for a large number of individuals in an
organisation.
1 Data

The facts and figures that can be recorded in system and that have special meaning assigned to it is
called as data.

The system use to record these datacan bea manualsystem (register) or it can be a computerized system.
Example :
Data of a customer like name, telephone number, address and product purchased date etc.
As need of data increases, there is need to develop a computer-based system for storing and managing data
as a file system or information system.
2. Database
A
database is acollection of data items stored in one place and having some common base (Background)
between them.
Concente
Databases
Database Systems 1-2
Introductionto
college
canteen etc.
For Example : A students, books,
college
database contains data such as teachers, (Background) is called
Common (Base) between all above data common base
items. So, Data with a
Database. mechanismfor
The organized
database
acts as a logical collection of relevant data. It is designedto offeran
storing, managing and retrieving stored
information.
Student table

Sid Name Class Major


Course Table

Cid Name Hours

Department Table
Did Name

Marks Table

Sid Cid Marks Grade

Fig. 1.1.1: Sample Student Database


3. Database Management System (DBMS) - DBMS Definition
ADatabase Management System (DBMS) is acollection of software or programs which help user n
creation and maintenance of a database (set of information). Hence it is also known as a computerized
record-keeping system.
DBMS is the software system that helps in the process of defining, constructing, manipulating the database.
Database management system has become an integral part of the information systems of many
organizations as it is used to handle a huge amount of data.
Computer-based Information Systems (S) is capable of serving many complex tasks in a coordinated
manner. Such systems handle large volumes of data, multiple users and severalapplications in a centralized
database environment.

The heart of an Information System (IS) is database management system. This is because most
Information Systems (1S) have to handle huge amounts of data. This core module of an Information
System is alsocalled as Database Management System (DBMS).
Examples :
MS Access, Fox Pro by Microsoft.
Oracle by Oracle corp.
SQL Server By Microsoft.
Ingres, DB2 by lBM.

1.2 Overview of DBMS


due to which
The database approach has many important characteristics database has become an integral part
of the software industry.
Tech Knowledge
Pubil(atissS
Database Systems 1-3 Introduction to Databases Concepts

The various characteristics of the DBMS are as mentioned below,


Characterisiics of DBMS

1. Dala integrity

2. Dala security

3. Data independence

4. Transaction control rollback

5. Concurrency control

6. Data recovery - backup and restore

Fig. 1.2.1:Characteristics of DBMS


1. Data integrity
Integrity constraints provide a way of ensuring that changes made in the database by authorized users that
do not result in the loss of data consistency and correctness.
Database integrity is concerned with the correctness and completeness of data in the database.
This objective can never be guaranteed, one cannot ensure that every entry made in database is accurate.
Some examples of incorrect data are as below:
1. Student taking admission to branch which is not available in college.
2. Employee assigned with non existing department.
3. Sometime inconsistency introduced due to system failures.
2. Data security
A DBMS system always has a separate system for security which is responsible for protecting database
against accidental or intentional loss, destruction or misuse.
Data in database should be given to only authorized users. Only authorized users should be allowed to
modify data.
Authorized users are able to access data any time he wants.
3. Data independence

Data Independence can be defined as the capacity to change data kept at one place without changing data kept at
other locations.
4 Transaction control - Rollback

The changes made in the database can be reverted back with help of rollback command.
The changes can be saved successfully with the help of commit data command.
5 Concurrency control
The data in database can be accessed by multiple users at same point of time.
Tech Knowledge
PuDIirations
Database Systems Introduction to Databases Concepts
1-4
Such operations are
6.
Data recovery-
allowed by sharing: same data between multiple users.
Backup and Restore
failure
Database recovery is the process of restoring the (correct) state after database
The main element of database to original
database
If you maintain database backuprecovery
is
efficiently,thethen
most database backup.
recent recovery
database !is verystraightforward process.
1.3
Advantages of DBMS (File System v/s Database
1. System)
Redundancy can be reduced
As we are using
relational approach for dataorganization, data is not stored inmore than one location.
Repetitionof information can be avoided which in turn
2. saves storage Space
Inconsistency can be avoided
The database assures that allthe users
access actual or true data present in the
3 Data can be shared dataDase

Multiple users can login at a time into the database to


access information.
They can manipulate the database in a
controlled environment.
Example :
In yahoo portal, many users are
accessing data in database in a controlled manner.
4.
Centralized control of data
With a centralized control of data, the
database system may be designed for an overall optimal performance
for entire organization.
5. Standards can be enforced
Standards (rules and regulations for coding and
access to the database. designing) can be enforced on the database to regulate the
Primary Key constraint or foreign key
accessing data from database.
constraint can be enforced on database which will be helpful for
6. Security restrictions can be applied
Security is the process of limiting access of database users to the
Data access is most important aspect for database server itself.
security and needs to be carefully planned
7. Integrity can be maintained
Through integrity, one can ensure only accurate data is stored within the
datahnee
8 Data independence can be provided
None of the users need to knowthe
technical aspects of the
They are physically as well as logically independent toaccessdatabase
to
access it.
the database
9. New applications may be developed using the existing database.

Tech Knawledge
Database Systems 1-5 Introduction to Databases Concepts

Table 1,3.1

Database Management System File Processing System

Computerized record - keeping system is used in Collection of individual fles accessed by applications
DBMS programs is called File Processing System
DBMS allows flexible access to data File - Processing System is designed to allow
predetermined access to data
It co-ordinates both the physical and logical It co-ordinates only the physical access to data
DBMS provides multiple user interface Data is isolated in the file system
Unauthorized access is restricted in DBMS Unauthorized access cannot be restricted
Redundancy can be controlled Redundancy cannot be controlled

14 Levels of Abstraction
1. Introduction

The goal of the three-schema architecture is to separate the front end (user applications interface) and the
back end (physical database).
The three-schema architecture is a tool with which the user can visualize the schema levels in a DBMS.
Many DBMS systems do not separate the three levels completely. but support the three-schema
architecture to some extent.

A
description of data in terms of adata model is called aschema.
The description of a database is called database schema, which is specified during database design and it
is not expected to change frequently.
2. Database architecture

Extemal View 1 External View2

SNo Lname BranchNo SNo Fname Lname Age Salary

Conceptual Model

SNo Fname Lname Age Salary BranchNo

Internal View
Create table Employee
(
Sno number (30),
Fname Varchar2 (50),
Lname Varchar2 (50),
Age numDer,
Salary Number (10,2),
BranchNo number(10)
):

Fig. 1.4.1 :Database schema levels


Tech Kaowledge
PuicatioRS
Databases
Introduction to Concepts
Database Systems 1-6
(I) Internal Level (Physical Level)
The internal level is very close to
physical storage of data.
This level describes the physical storage magnetic disk.
structure of the data i date mainlythe
The internal (or physical) database is devices, database.
stored on secondary storage methods for the
Describes the complete details of data storage and various available access secondary storage
At its addresses on the
ground level, it is stored in the form of bits with the physical
device.
structures.
At its highest data
level, it can be viewed in the form of files and simple
Internal view/ schema
exist, how stored
The internal view defines the various type of indexes
stored data types and Specifies what
fields are represented and so on.
The internal schemauses a physical data model.
Example :
Create table Employee
(Sno number (30),
Fname varchar2 (50),
Lname varchar2 (50),
Age number,
Salary number (10,2),
BranchNo number (10) );
() Conceptual level
This level describes the structure of the whole database for a group of users.
The conceptual model is also called as the data model or we can say data model is used to describe the
conceptualschema when a database system is impiemented.
The conceptualschema hides the internal details of physical storage and targets on describing entities, data
types, relationships and constraints.
The conceptual schema contains allthe information to build relevant external records. As theconceptual
model is derived from the physical model.
Conceptual view / schema
entire content of the database
The conceptual view is a representation of the
data tynes
The conceptual view includes definitions of each of the various conceptual
( ) External level (view level)
Theexternal Jevel is the one closest to the user, 1.e., lt 1S related with the way data is viewed by inditdnal
end users.
The external level includes anumber of user views
or external schemas

Tech Knowledge
PuDIcations
Database Systems 1-7 Introduction to Databases Concepts
Each external schema describes the segment of thedatabase that is required for a particular user group and
hidesthe rest of the database from that user group.
External views are the proper interface between the user and the database, as an individual user can hardly
be expected to be interested in the entire database.
The external model isderived from the
conceptual model.
External view /schema

External schema consists of definitions of each of the various external data types in that external view.

End users

External viow External schema


Extermal / Conceptual
Mapping
Concuptual view Conceptual schema
Conceptual / Internal
Mapping
Internal view Intemal schema

Fig. 1.4.2: Three level schema architecture


(IV) Mapping
The processes of transforming requests and results between various levels of architecture are called
mappings.
These mappings may be time-consuming, so smalldatabases do not support external views.
External/ conceptual mapping : The DBMS must transform a request on an external schema into a
request against the conceptual schema.
Conceptual / internal mapping : Acertain amount of mapping is necessary to transform requests
between the conceptual and internal levels.

1.5 Data Independence


Concept of data independence can be explained with help of 3 schema architecture. The three-schema
architecture can make it easier toachieve true data independence.
Definition : Data Independence can be defined as the capacity to change one level of schema without changing
the schemna at the next higher level.

1.5.1 Types
Types of Data Independence

(al Logcal dala independence

b) Fhysica daa indeperdence

Fig. 1.5.1 :Types of Data Independence


Tech Kaowledge
DuDIiCatiens
Databases
Introductionto Concepts
Database Systems 1-8
(a) Logical data independence changee
any
without having
Logical data schema
independence is
external schemas. (or application
a capacity to change the conceptual
conceptual view withou
programs) the
Separating the external views from the conceptual view enables usto change
independence.
affecting the external views. This logicaldata
is sometimes called
separation
Example :
external
schemas that refer
the
We may change the conceptual this case
schema by removing a data item.In
only to the remaining data should not be
affected.
(b) Physical data independence any changes to
schema without having
Physical data independence is a capacity to change the internal
conceptual schema. of
provide a logical description
The separation of the conceptual view from the internal view enables us to
is often
called physical data
the database without the need to specify physical structures. This
independence.
Example :
dataas before remains
By creating additional access paths to improve the performance of retrieval. If the same
in the database,we should not have to change the conceptual schema.

1.6 DBMS Architecture


MU Dca18, 10 Marks
Q. Explain Overall Architecture of DBMS in detail
A database system can be separated into two different modules that deal with all operations of the overall
system.

Components of a Database System

1. Query Processor Components

2. Storage Manager i Storage Management


3. Transaction Management

Fig. 1.6.1 :Components of a Database System


The storage manager is important because databases tyypically require a huge amount of storage space.
1.6.1 Query Processor Components
1 Introduction
The query processor will accept query trom user and solves it by accessing the database

Tech Knewledge
Publcatlon5
Database Systems 1-9 Introduction to Databases Concepts

2. Parts of query processor

Parts of Query Processor

(i) DDL interpreler

(ü) DML compiler

(i) Query evaluation engine

Fig. 1.6.2 :Parts of Query Processor


() DDL interpreter
This will interpret DDL statements and fetch the definitions in the data dictionary.
(ti) DML compiler
This will translate DML statements in a query language into low level instructions that the query
evaluation engine understands.
Aquery can usually be translated into any of a number of alternative evaluation plans for same query
result DML compiler will select best plan for query optimization.
(ii)Query evaluation engine
This engine willexecute low-level instructions generated by the DML compiler on DBMS.
Naive users Sophisticated
(tellers, agents, Application users
Database
programmers administrator
web-users) (Analysts)
Use Write Use Use

Application Application Query Administration


interfaces programs tools tools

Compiler and
linker
DML queries DDL interpreter

Application
program DML compiler
object code and organizer
Query evaluation
engine query prooessor

Buffer manager File manager Authorization


and integrity Transaction
manager
manager

Storage manager

Indices
Data dictionary Disk storage
Data
Statistical data

Fig. 1.6.3 :Components of DBMS


TechKaemledge
PUDCatians
Introductionto Databases Concepts
Database Systems
1.6.2 1-10
Storage Manager / Storage
Astorage
manager
Management
is a program thedata
stored in the database and
the application module which acts like between
programs and queries submitted to the interface
The data is stored on the system.
disk using the file
The storage manager is programme which issystem.
responsible for the interaction withthe file manager.
The storage manager translates the various databases language statements intolowlevelfile system commands
Thus, the storage manager is responsible for storing, retrieving and updatingdatainthe database.
The storage manager
components include : authority of users to
Authorization and integrity manager : Checks for
integrity
constraints and
access data.
althouoh
Transaction manager, which ensures that the database remains in aconsistent (correct)state
there is system failures.
File manager, which manages the allocation of the. data structures used to
Space on disk storage and
represent information stored on disk.
uet nanager, which is responsible for retrieving data from disk storage into main memory. Ine buter
iatiager is an important part of the database system. as it enables the database to handle data sizes that
are much larger than the size of main memory.
Data structures implemented by storage manager,
Datafiles: Stored in the database itself.
Data dictionary: Stores metadata about the structure of the database.
Indices:Provide fast access to data items.
1.6.3 Transaction Management
Atransaction isaseriés of small database operations that together form asingle large operation.
A transaction is started by issuing a BEGIN TRANSACTION command. Once this command is executed the DBMS
starts monitoring the transaction.
All operations executed after a BEGIN TRANSACTION command are treated as a single large operation.
Application programs use transactions to execute sequences of operations when it is important that all the
operations are successfully completed.
Transaction management component will ensure the atomicity and durability properties.
1.7 Working of DBMS
User requests data item from database. DBMS intercepts and interprets the request.
Retrieves the data from the physical database. Constructs the record using physical/conceptual manning
Docords constructed using relevant conceptual/external mapping Deives the required external record from
conceptual record.

TechKnswledge
Pubcations
Database Systems 1-11 Introduction to Databases Concepts

Example:

Consider the situation in a library. Here, we have data corresponding to books, authors, suppliers, borrowers,
etc. The total volume of data stored and handled in a library may be quite large.
The Library DBMS may require several operations, such as issue, return or purchase of books; handle queries
related to book information, borrowing information, etc.
Moreover, there are different types of users who operate various stages or activities. For instance, a borrowe
may merely view certain information, whereas an issuer may be allowed to update the status of a book auring
issue or return.

The library staff may, on the other hand, add new books, their supplier, price and other information to tne
database.

Each user category has a different access right on both, the data, as well as the processing capabilities.
Multiple users may concurrently operate the library DBMS performing several tasks at the same time.
They may even try to access the same data simultaneously. It is the job of a DBMS to handle the data and its
processing in an integrated, coordinated and consistent manner.

1.8 Database Users

Database Users

1.Naive users

2. Application programmers

3. Sophisticated users

4. Specialized users

Fig. 1.8.1: Database Users

1 Naive users
Naive users are users who interact with the system using application programs that have been developed
previously.
For example, Student wants to pay fees Rs.50 then accountant will invoke a program called fees_payment).
Thisprogram asksthe accountant for the amount of fees to be paid.
The typical graphical user interface for naive users is a kind of form interface, where the user can fill in
appropriate fields of the form.
A
given end user can access the database via one of the applications or can use an interface provided as an
integral part of the database system software (such interfaces are also supported by means of applications,
of course, but those applications are built-in, not user-written, e.g, query language processor).
Naive users can read reports generated from the database.
TechKaowledge
Publcattons
Databases Concepts
Database Systems Introductionto
1-12
2. Application programmers
database.
usethe
Application programmers responsible for writing application programsthat
application
prOgrams.
Application progranmmers are developers or professionals who
write
Application programmers computer
develop user interfaces using3any preferredlanguage. enable an application
Rapid Application opment (RAD) tools are nowadaysthat

programmer toconstructDevel
application
without writing code.
available
statements. Sucl.
Some language
programming languages conmbine control structures with database
languages, sometimes called fourth-generation languages.
3. Sophisticated users
querylanguage
Sophisticated users interact with application without writing| programs by using'a database
This query will be solved by
query processor. which
Online Analytical Processing (OLAP) tools is used to view summaries of data in different ways
which help them
tools, wh
helps analysts (e.g. sales of region, city etc.) with OLAP can use data mining
find certain kinds of patterns in analysts
data.
4.
Specialized users
Creates the actual database and implements technicalcontrals neededtoenforce various poncy decstos
Specialized users are sophisticated users who develop database applications.
Ine DBA 0s also responsible for ensuring that the system operates with adequate performance and lor
providing a variety of other related technical services.
1.9 Database Administrator (DBA)
Q. Define DBA. MU - Dec 18,2 Marks

The database administrator is responsible for the overall planning of the company's data resources, for the
design of data, and for the day-to-day operational aspects of data management.
A database administrator is a person responsible for the installation, configuration, upgradation, maintenance
and monitoring databases in an organization.

The overall planning of corporate data is the strategic aspect of the database administration function and
involves company-wide planning of existing data and assessment of organization-wise data standards.
1.9.1 Roles of DBA

|Q. Discuss role of DBA. MU Decs18,3 Marks


TheDBA needs to performs many roles to keep the database up and running, System Administrator/ Designer
The database administrator need to manage DBMS software and server.

He is also responsible for deciding on the storage and access methods. The DBA performs all data Sl.
or adding new fields into database.

TechKaowledga
Publlcatian 5
Database Systems 1-13 Introduction to Databases Concepts

Database Developer / Programner


The DBA writes the programs to design database and to design the means of reorganizing databases
periodically.
The DBA alsodeternmines and implement database searching strategies.
System Analyst
The DBA needs to analyse the system performance and fine tune the DBMS activities.
DBA needs to take care of system crashes by planning proper recovery procedures.
He will also specify techniques for monitoring database performance.
1.9.2 Responsibilities of DBA

The various responsibilities of DBA are as follows,


Designing overall Database schema
The DBA is responsible for designing overall database schema (tables and fields). Also responsible for deciding
on the data storage and access methods.
Selecting and installing database software and hardware.
The DBA selects the suitable DBMS software like Oracle, SQL Server or MySQL.
Designing Authorization/Access Control
The DBA will decide the user access levels and security checks for access and data manipulations.
Designing Recovery Procedures
In order to take care of system crashes DBA needs to design the system recovery procedures and also specifying
techniques for monitoring database performance.
Operations Management
Theoperations management of database administration deals with data problems arising on a day-to-day basis.
Specifically, the responsibilities include,
Investigation of errors found in the data.
Supervision of restart and recovery procedures in the event of a failure.
Supervision of reorganization of databases.
Initiation and control of all periodic dumps of data.

Review Questions

Q. 1 Write advantages of DBMS over a file system.

Q. 2 What are the different types of database users ?

Q. 3 What are the disadvantages of file processing system which were removed by DBMS ?
Q. 4 List the functions of a Database Administrator (DBA).

Tech Kaewledge
PubiCatio@s
Introductionto Data

Database Systems 1-14


Q.5 Write short note on
Q. 6
:Responsibilities of database administrator.
Describe the overall architecture of DBMSwith diagram.
Q.7
Explain the term: Data
Q.8
independence and its types.
Explain three-level architecture of
DBMS.
Q.9
Draw and explain database
system structure.
a. 10 VWrite short note on: Data.
a

Q. 11 Write a short note on:


Database.
a. 12 Explain the features of DBMS.
Q. 13 State and explain various
levels of database abstraction.
Q. 14 Write a short notes on :
Query processor.
Q. 15 Write a short note
on:Storage management.
Q. 16 Write a short note
on:Transaction management.
Q. 17 Write a short note on: Database
Administrator.
Q. 18 Discuss different database Users.

O00

You might also like