Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Unit 1

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 39

OVERVIEW OF DATABASE

MANAGEMENT SYSTEM
OVERVIEW OF DBMS
Introduction:- A Database management system (DBMS)
is system software for creating and managing
databases. The DBMS provides users and
programmers with a systematic way to create, retrieve,
update and manage data.A DBMS makes it possible
for end users to create, read, update and delete data in
a database.
Before defining a database management
system(DBMS), we must have a clear understanding of
what database is all about. A database consists of four
elements as shown in figure-

DataItems

Relationships
Database
Constraints

Schema

Fig:- Elements of database


Data:- By data we mean known facts that can be
recorded and that have implict meaning.
Relationships:- A relationship, in the context of
databases, is a situation that exists between two
relational database tables.
Constraints:- Constraints enforce limits to the data or
type of data that can be inserted/updated/deleted
from a table. The whole purpose of constraints is to
maintain the data integrity during an
update/delete/insert into a table.
Schema:- The overall logical design of the database is
called schema.
DATABASE
Definition:- A database is an organized collection of
data, generally stored and accessed electronically from a
computer system.
PURPOSE OF DATABASE SYSTEM
1 Data redundancy and inconsistency.
 Same information may be duplicated in several places.
 All copies may not be updated properly.
2 Difficulty in new program to carry out each new task.
3 Data Isolation.
 Data in different formats.
 Difficult to write new application program.
DATA ABSTRACTION
This process of hiding irrelevant details from
user is called data abstraction.

Levels of Data abstraction:-


1 Internal Level ( Physical level)
2 Conceptual Level
3 View Level
View 1 View 2 View 3

Logical level

Physical level

Fig:- Levels of data abstraction


1 Physical level:-The lowest level of abstraction describes
how data are stored.

2 Logical level:-The next higher level of abstraction,


what data are stored in database and what relationship
among those data.

3 View level:-The highest level of abstraction describes


only part of entire data.
INSTANCES AND SCHEMA
Instances:- 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.
Schema:- The overall logical design of the database is
called schema. A schema is a logical database
description and is drawn as a chart of the types of data
that are used. It is a framework on which values of data
can be fitted.
DATA INDEPENDENCE
Any software has mainly two parts, first is the database and second is
the application or program which accesses and uses the database. First
the database is designed and then the application program are written for
it, which heavily depends on database design.

Sometimes, after the application program has been written there is a


need to change the storage structure or database design. Data
Independence is all about, the ability to modify a schema definition (i.e,
storage structure) in one level without affecting a schema definition in
the next higher level.

There are two types of data independence.


1 Physical data independence
2 Logical data independence
1Physical data independence:- Physical data
independence is the ability to modify the physical
schema without causing application programs to be
rewritten.
2Logical data independence:- Logical data
independenceis the ability to modify logical schema
without causing application program to be rewritten.
DATA ADMINISTRATION ROLES
One of the main reasons for using DBMS is to have
central control of both the data and the programs that
access those data.
The person who has such central control over the
system is called the database administrator (DBA).
Functions of DBA:-
1 Schema definition:- The DBA defines the logical
Schema of the database.A Schema refers to the overall
logical structure of the database.
According to this schema, database will be developed
to store required data for an organization.
2 Storage structure and access method definition:- The
DBA decides how the data is to be represented in the
stored database.
3Physical organization modification:- The DBA modifies
the physical organization of the database to reflext the
changing needs of the organization or to improve
performance.
4Assisting Application Programmers:-The DBA provides
assistance to application programmers to develop
application programs.
5Monitoring Performance:-The DBA monitors
performance of the system.The DBA ensures that
better performance is maintained by making changes
in physical or logical schema if required.
6 Approving Data Access:-
The DBA determines which user needs access to which
part of the database.
According to this,various types of authorizations are
granted to different users.
DBMS USERS
 Database users are the one who really use and
take the benefits of database. There will be different
types of users depending on their need and way of
accessing the database.
Types of Database Users:-
1 Application Programmers
2 EndUsers
-Navie User
-Casual User
3 SophisticatedUsers
4 Specializes Users
1 Application Programmers - They are the developers who
interact with the database by means of DML queries .
Application programmers are the one who writes
application programs that uses the database.
2 End Users:-End users are those who access the database
from the terminal end. They use the developed
applications and they don’t have any knowledge about the
design and working of database. These are the second class
of users and their main motto is just to get their task done.
There are basically two types of end users that are
discussed below:
A)Naïve Users:- Any user who does not have any
knowledge about database can be in this category. There
task is to just use the developed application and get the
desired results.
For example:-Clerical staff in any bank is a naïve user.
They don’t have any dbms knowledge but they still use
the database and perform their given task.
B) Casual Users:-These users have great knowledge of
query language. Casual users access data by entering
different queries from the terminal end. They do not
write programs but they can interact with the system
by writing queries.
3 SophisticatedUsers:- They interact with the system
without writing programs. Instead, they form their
requests in a database query language.
4 Specialized Users:- They are sophisticated users who
write specializes database applications that do not fit
into the traditional data processing framework.
DATA DICTIONARY

A data dictionary is a file or a set of files that


contains a database's metadata. The data
dictionary contains records about other objects in the
database, such as data ownership, data relationships
to other objects, and other data.
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.
Why do we need all these information? 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 on 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 a 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 name and its
datatype, constraints and indexes.
DATABASE LANGUAGES
To read data, update and store information in DBMS,
some languages are used. Database languages in DBMS are
given as below:
1 DDL – Data Definition Language
2 DML – Data Manipulation Language
3 DCL – Data Control Language
4 TCL – Transaction Control Language
1 Data definition language:- The language used to define
database is known as Data Definition
Language(DDL).The commands used for defining
database are known as DDL command. DDL includes all
commands used for altering tables, dropping tables and
defining constraints.
Few examples of it are:
CREATE – used to create tables in database
ALTER – alter the pattern of database
DROP – helps in deleting objects
TRUNCATE – erase all records from table
COMMENT – adding of comments to data dictionary
RENAME – useful in renaming an object
2 Data Manipulation language:- The language that
enable users to access or manipulate data is known as
Data Manipulation Language(DML). The command
used for accessing and manipulating data are knows as
DML commands. DML includes commands for
insertion, deletion, and updation besides retrieval.
Few examples of it are:
SELECT – useful in holding data from a database
INSERT – helps in inserting data in to a table
UPDATE – used in updating the data
DELETE – do the function of deleting the records
MERGE – this do the UPSERT operation i.e. insert or
update operation
CALL – this calls a structured query language or a java
subprogram
EXPLAIN PLAN – has the parameter of explaining
data
LOCK TABLE – this has the function of controlling
concurrency
3 Data Control Language:- This language usedt o control
database is known as Data Control Language(DCL). The
commands used to control a database are known as DCL
commands. DCL controls the database by administrating
previlages and commiting ( saving) of data.
Examples of the commands in the data control language (DCL)
are:
GRANT – this permits particular users to perform particular
tasks
REVOKE – it blocks the previously granted untrue
permissions
4 Transaction Control Language:- Transaction Control
Language (TCL) has commands which are used to manage
the transactions or the conduct of a database. They manage
the changes made by data manipulation language statements
and also group up the statements in a logical management.
Some examples of it are:
COMMIT – use to save work
SAVE POINT – helps in identifying a point in the
transaction, can be rolled back to the identified point
ROLL BACK – has the feature of restoring the
database to the genuine point, since from the last
COMMIT
SET TRANSACTION – have parameter of changing
settings like isolation level and roll back point
DATA MODELS
Data models are different models that can be used
to design a database. Design of database includes
describing data, data relationships, data semantics and
consistency constraints.

Types of Data Models:-


1 Object Based Data Model
2 Record Based Data Model
3 Physical Data Model
DATA MODELS

RECORD
OBJECT BASED PHYSICAL
BASED DATA
DATA MODEL DATA MODEL
MODEL

RELATIONAL UNIFYING
ER DATA MODEL DATA MODEL
DATA MODEL

OBJECT ORIENTED NETWORK


DATA MODEL DATA MODEL FRAME
MEMORY
DATA MODEL
SEMANTIC DATA HIERARCHICAL
MODEL DATA MODEL

FUNCTIONAL
DATA MODEL
Fig:-Data models
1 Object based data model:- Object based ata models are
used in describing data at the logical and view levels.
They are characterized by the fact that they provide
fairly flexible structuring capabilities and allow data
constraints to be specified explicitly.

Fig:-Object based data model


2 Record based data model:- Record base model is used
to specify the overall structure of the database and in
this there are many record types. Each record type has
fixed no. of fields having the fixed length.
(A) Relational data model:-
 All the data is represented in the form of a table.
 Relationship among the data is represented by the
columns values.
 User need not know the exact physical structures to
use the database.
 Each attribute of a relation has distinct name.
 Rows of the relation are referred to as a tuples of the
relation and the columns are its attributes.
Ghjhgj

Fig:- Relational data model


(B) Network data model:-
 Data is represented by records and links.
 Relationship among the data is represented by links or
pointers.
 All the records are organized in arbitrary form.
 The set has one to many(1:M) relationship between the
owner and member record.
 The set can have more than one member record but
only one owner record.

Fig:- Network data model


(c) Hierarchical data model:-
 It is very similar to network model except the records
are organized in tree form.
 Hierarchy is an ordered tree and is easy to understand.
 Again data is represented in the form of records.
 Similarly relationships among the data is represented
by records or links.
 A tree may be defined as a set of nodes, such that there
is one specially designated node called the root.
 At the root of the tree is the single parent,the parent
can have none, one or more children.
COLLEGE

COMMERCE AND
IT
MANAGEMENT

BCA DCA PGDCA B.COM BBA

Fig:- Hierarchical data model

3 Physical data model:- Physical data models are used to describe


data at the lowest level.
STORAGE STRUCTURE AND ACCESS
METHOD
A database system is divided into modules that deal with
different responsibilities of the overall system. The functional
components of a database system can be broadly divided into
the storage manager and the query processor components.
1 Storage manager:- A large amount of storage space is
required for storing corporate databases and to manange this
storage manager is required. A storage manager is a program
module that provides the interface between the low-level data
stored in the database and the application programs and
queries submitted to the system.
The storage manager is responsible for the interaction with
the file manager.
The raw data are stored on the disk using the file
system, which is usually provided by a conventional
operating system. The storage manager translates the
various DML statements into the low-level file system
commands.
Thus, the storage manager is responsible for storing,
retreiving and updating data in the database. The
storage manager components include:-
a) Authorization and integrity manager, which tests for
the satisfaction of integrity constraints and check
the authority of users to access data.
b) Transaction manager, which ensurses that the
database remains in a consistent state despite system
failures and that concurrent transcation executions
proceed without conflicting.
c) File manager, which manages the allocation of space
on disk storage and the data structure used to
represent information stored on disk.
d) Buffer manager, which is responsible for fetching data
from disk storage into main memory and deciding
what data to cache in main memory. The buffer
manager is a critical part of the database system, since
it enables the database to handle data sizes that are
much large than the size of main memory.
2 Query processor:- A query processor is important as it
help the database system to simplify and facilitate data
access.
The query processor components include:-
a) DDL Interpreter, which interprets DDL statements
and records the definitions in the data dictionary.
b) DML compiler, which translates DML statements in a
query language into an evaluation plan consisting of
low-level instructions that the query evaluation
engine understands.
Applications End users DDL

DML compiler
DDL
D compiler
Query Optimizer
B
M
S
Stored Data Manager

Data Complied Data


Files DML Dictionary

You might also like