Data Base Management System

You might also like

Download as rtf, pdf, or txt
Download as rtf, pdf, or txt
You are on page 1of 15

File System vs Data base Management System

1. Files act locally where as DBMS saves directly in a


database
2. Saves in temporary locations where as DBMS in well
arranged and permanent data base locations
3. In File Sys., transactions are not possible where as
various transactions like insert,delete,view,updating etc r
possible in DBMS
4. Data will be accessed through single or various files
where as in DBMS, tables (schema)
is used to access data
5. A "File manager" is used to store all relationships in
directories in File Systems where as a data base manager
(administrator) stores the relationship in form of
structural tables
6. Last.... but not the least.... Data in data bases are more
secure compared to data in files!!
Data Redundancy
Data Redundancy means same information is duplicated in
several files. This makes data redundancy.

Data Inconsistency
Data Inconsistency means different copies of the same
data are not matching. That means different versions of
same basic data are existing. This  occurs as the result
of  update operations that are not updating the same
data stored at different places.

Example: Address Information of a customer is recorded


differently in  different files.

Difficulty in Accessing Data


It is not easy to retrieve information using a conventional
file processing system. Convenient and efficient
information retrieval is almost impossible using
conventional file processing system.

Data Isolation
Data are scattered in various files, and the files may be
in different format, writing new application program to
retrieve data is difficult.
Integrity Problems
The data values may need to satisfy some integrity
constraints. For example  the balance field Value must be
grater than 5000. We have to handle this through
program code in file processing systems. But in database
we can declare the integrity constraints along with
definition itself.

Atomicity Problem
It is difficult to ensure atomicity in file processing
system.For example transferring  $100 from Account  A
to account B.If a failure occurs during execution there
could be situation like $100 is deducted from Account A
and not credited in Account B.

Concurrent Access anomalies


If multiple users are updating the same data 
simultaneously it will result in inconsistent data state. In
file processing system it is very difficult to handle this
using program code. This results in concurrent access
anomalies.
  
Security Problems
Enforcing Security Constraints in file processing system
is very difficult as the application programs are added to
the system in an ad-hoc manner.
Database Schema
Definition : Overall design of data base. Schema contains
'No of records + Type of data + No of attributes'

 External level or Sub schema

 logical schema

 physical schema

Database Instance
Definition: The term instance is typically used to
describe a complete database environment, including the
RDBMS software, table structure, stored procedures and
other functionality. It is most commonly used when
administrators describe multiple instances of the same
database.

Definition: The information stored in database at the


particular movement is called instance.

Also Known As: environment

Examples: An organization with an employees database


might have three different instances: production (used
to contain live data), pre-production (used to test new
functionality prior to release into production) and
development (used by database developers to create new
functionality).
Uses of DBMS in different sectors:

Database is widely used all around the world in differnt


sectors:

1.Banking: For customer information, accounts loans and


banking transactions.

2.Airlines: For reservations and schedule information.


Airlines were among the first to use database in a
geographically disturbed manner-terminals situated
around the world accessed the central database system
through phone lines and other data networks.

3.Universities: For student information, course


registrations and grades.

4.Credit card transactions: For purchases on credit cards


and generation of monthly statements.

5.Telecommunications: For keeping records of calls made,


generating monthly bills, maintaining balances on prepaid
calling cards and storing information about the
communication networks.

6.Finance: For storing information about holdings, sales


and purchase of financial instruments such as stocks and
bonds.

7.Sales: For customer, product and purchase information.

8.Manufacturing: For management of supply chain and for


tracking production of items in factories, inventories of
items in warehouses/stores and orders for items.

9.Human Resources: For information about employees,


salaries, payroll taxes and benefits and for generation of
paychecks.

10.Web based services:For taking web users


feedback,responses,resource sharing etc.

Disadvantages of a DBMS

Danger of a Overkill: For small and simple applications for


single users a database system is often not advisable.

Complexity: A database system creates additional


complexity and requirements. The supply and operation of
a database management system with several users and
databases is quite costly and demanding.

Qualified Personnel: The professional operation of a


database system requires appropriately trained staff.
Without a qualified database administrator nothing will
work for long.

Costs: Through the use of a database system new costs


are generated for the system itselfs but also for
additional hardware and the more complex handling of
the system.

Lower Efficiency: A database system is a multi-use


software which is often less efficient than specialised
software which is produced and optimised exactly for one
problem.

1. Privacy and security Reduces :-When the information is centralized and is made
available to user from remote locations, the possibility is of destruction of data is often
more than in a conventional file system. For Exp. of remote location is bank A/c in
banking system , everyone can use. Then to reduce the chances of an authorized user
accessing sensitive information, it is necessary to take technical measures.
2. Cost of using DBMS is High : Additional Hardware cost :To run new applications
additional hardware and storage space is required for execution and storage
Cost of migration: it also includes a cost of migration from a traditionally separate
application environment to integrated one.
Cost of training staff: To run a new staff , we need  training of new staff. Moreover
recruitment of new staff is required , which helps in running the system
3. Threat To Data Integrity : Since a large number of users could be using a database
concurrently , technical safe  Guards are necessary  to ensure data remain correct during
operation.
4. Complexity of Backup and recovery : While centralization reduces the duplication
and cuplication requires that the database be backup so that in case of failure of data can
be removed.
5. Data quality is reduced: Since the database is accessible to users remotely adequate
controls are needed to handle user’s updation. So as to control the quality of data.
1)A DBMS has to be persistent 1)RDBMS is based on relational
(it should be accessible when the model, in which data is
program created the data donot represented in the form of
exist or even the application that relations, with enforced
created the data restarted). relationships between the tables.

2) DBMS has to provide some 2)RDBMS defines the integrity


uniform methods independent of constraint for the purpose of
a specific application for holding ACID PROPERTY.
accessing the information that is
stored.

3)DBMS does not impose any 3)In RDBMS, normalization


constraints or security with process will be present to check
regard to data manipulation. It is the database table cosistency
user or the programmer
responsibility to ensure the
ACID PROPERTY of the
database

4)In DBMS Normalization 4)RDBMS helps in recovery of


process will not be present the database in case of loss of
database due to system failure
or any other reason

1)In dbms no relationship 1)It is used to establish the


concept relationship concept between
two database objects, i.e, tables

2)It supports Single User only 2)It supports multiple users

3)It treats Data as Files 3)It treats data as Tables


internally internally

4)It supports 3 rules of 4)It supports minimum 6 rules of


E.F.CODD out off 12 rules E.F.CODD

5.)It requires low Software and 5)It requires High software and
Hardware Requirements hardware requirements.

6)FoxPro, IMS are Examples 6)SQL-Server, Oracle are


examples
it Does not support >it support client/server
client/server architecture architecture

>it Does not support distributed >it support distributed Data base
Data base architecture. architecture.

> here no PK and FK concept.


>it is support PK and FK concept.
> it is not show relationship
between table. >it is show relationship between
table

DBMS Functions'

                There are several functions that a DBMS


performs to ensure data integrity and consistency of
data in the database. The ten functions in the DBMS are:
data dictionary management, data storage management,
data transformation and presentation, security
management, multiuser access control, backup and
recovery management, data integrity management,
database access languages and application programming
interfaces, database communication interfaces, and
transaction management.

1.     Data Dictionary Management

                  Data Dictionary is where the DBMS stores


definitions of the data elements and their relationships
(metadata).  The DBMS uses this function to look up the
required data component structures and relationships.
When programs access data in a database they are
basically going through the DBMS. This function removes
structural and data dependency and provides the user
with data abstraction. In turn, this makes things a lot
easier on the end user. The Data Dictionary is often
hidden from the user and is used by Database
Administrators and Programmers.

2.     Data Storage Management

                This particular function is used for the storage


of data and any related data entry forms or screen
definitions, report definitions, data validation rules,
procedural code, and structures that can handle video
and picture formats. Users do not need to know how data
is stored or manipulated. Also involved with this
structure is a term called performance tuning that
relates to a database’s efficiency in relation to storage
and access speed. 

3.     Data Transformation and Presentation

                This function exists to transform any data


entered into required data structures. By using the data
transformation and presentation function the DBMS can
determine the difference between logical and physical
data formats.

4.     Security Management

                This is one of the most important functions in


the DBMS. Security management sets rules that
determine specific users that are allowed to access the
database. Users are given a username and password or
sometimes through biometric authentication (such as a
fingerprint or retina scan) but these types of
authentication tend to be more costly. This function also
sets restraints on what specific data any user can see or
manage.

5.     Multiuser Access Control

                Data integrity and data consistency are the


basis of this function. Multiuser access control is a very
useful tool in a DBMS, it enables multiple users to access
the database simultaneously without affecting the
integrity of the database.

6.     Backup and Recovery Management

                Backup and recovery is brought to mind


whenever there is potential outside threats to a
database. For example if there is a power outage,
recovery management is how long it takes to recover the
database after the outage. Backup management refers to
the data safety and integrity; for example backing up all
your mp3 files on a disk.

7.     Data Integrity Management

                The DBMS enforces these rules to reduce


things such as data redundancy, which is when data is
stored in more than one place unnecessarily, and
maximizing data consistency, making sure database is
returning correct/same answer each time for same
question asked.
8.     Database Access Languages and Application
Programming Interfaces

                A query language is a nonprocedural language.


An example of this is SQL (structured query language).
SQL is the most common query language supported by
the majority of DBMS vendors. The use of this language
makes it easy for user to specify what they want done
without the headache of explaining how to specifically do
it.

9.     Database Communication Interfaces

                This refers to how a DBMS can accept


different end user requests through different network
environments. An example of this can be easily related to
the internet.  A DBMS can provide access to the
database using the Internet through Web Browsers
(Mozilla Firefox, Internet Explorer, Netscape).

  '10.        Transaction Management

  This refers to how a DBMS must supply a method that


will guarantee that all the updates in a given transaction
are made or not made.All transactions must follow what is
called the ACID properties.

A – Atomicity: states a transaction is an indivisible unit


that is either performed as a whole and not by its parts,
or not performed at all.It is the responsibility of
recovery management to make sure this takes place. C –
Consistency:A transaction must alter the database from
one constant state to another constant state. I –
Isolation:Transactions must be executed independently
of one another.Part of a transaction in progress should
not be able to be seen by another transaction. D –
Durability:A successfully completed transaction is
recorded permanently in the database and must not be
lost due to failures.

One of the main reasons for using DBMS is to have a central control of
both data and the programs accessing those data. A person who has
such control over the system is called a Database Administrator(DBA).
The following are the functions of a Database administrator

 Schema Definition
 Storage structure and access method definition
 Schema and physical organization modification.
 Granting authorization for data access.
 Routine Maintenance

Schema Definition
The Database Administrator creates the database schema by executing
DDL statements.  Schema includes the logical structure of database
table(Relation) like data types of attributes,length of
attributes,integrity constraints etc.

Storage structure and access method definition


Database tables or indexes are stored in the following ways: Flat
files,Heaps,B+ Tree etc..                                            

Schema and physical organization modification


The DBA carries out changes to the existing schema and physical
organization.

Granting authorization for data access


The DBA provides different access rights to the users according to their
level. Ordinary users might have highly restricted access to data, while
you go up in the hierarchy to the administrator ,you will get more
access rights.

Routine Maintenance
Some of the routine maintenance activities of a DBA is given below.

 Taking backup of database periodically


 Ensuring enough disk space is available all the time.
 Monitoring jobs running on the database.
 Ensure that performance is not degraded by some expensive task
submitted by some users.
 Performance Tuning

You might also like