Dbms (Data Base Management System)
Dbms (Data Base Management System)
Dbms (Data Base Management System)
DATA:-
OR
DATA ITEM(FIELD) :-
OR
There are two types of Data Item depending upon the usage are as follow:-
1001 AMIT 85
1002 RITU 75
1003 AMAN 50
TYPES OF FILE :-
1) MATER FILE :- It contain data which is required during each processing cycle
& needs to ne retained permanently.For eg – The file containing data for the
railway reservation/cancellation.
2) TRANSACTION FILE :- Changes which are applied to a master file are
collected on a transaction file.
3) REPORT FILE :- Contain data that are formatted for presentation to a user.e.g
– pay slip,electrictity bill are the report file.
4) WORK FILE :- It is the temporary file in the system.These files are created
during the processing for storing some intermediate data & are deleted after the
processing is over.
5) PROGRAM FILE :- It contain instruction for the processing of data.Instruction
may be in the form of source code written in programming language like Pascal,
C,C++ Etc.
6) TEXT FILE :- Contains numeric & graphic data input using a text editor
program.
7) BACKUP FILE:- It is used to store a duplicate copy of the data or program files
on secondary storage device like Magnetic Tape or Disk.
1) INPUT FILE :- Input file is only read by a program.For Eg – A file of tax rates
would be an input files for the program that computes income taxes.The
transaction file is generally input file to an update program.
2) OUTPUT FILE :- output is created by the program. Eg – report file may be
output of a program that updates a master file.
3) INPUT/OUTPUT :- I/O files are both read from & written to during a program
execution. E.g – A payroll master file might be used by a payroll program
both as a source of data about employees pay rate & as a report for month to
date & year to date pay totals.A master file is commonly an I/O files.
FILE OPERATIONS:-
1) File Creation :-
2) File Updation :-
It means insert new record,delete the existing record or
changing the existing records.Activities of file updation are :-
a) Record Insretion :- Record insertion means adding the new record.e.g –
adding a record for newly appointed employees in the employees file.
b) Record Modifcation :- Record Modification means modification of
existing record.E.g –Changing the basic pay of a employee in the
employee file.
c) Record Deletion :- It means deletion of existing record.e.g – delete the
record of an employee who has left the company.
3) File Retrieval :-
There are 2 types :-
a) Inquiry: - If retrieval is processed interactively than it called an inquiry
or query. e.g – find all the records whose basic pay is greater than 5000
from the employee file is a inquiry.
b) Report Generation :-
If a retrieval is processed in batch mode then the
retrieval would be called report generation. It can be comprehensive or
selective comprehensive report means if retrieval applies some criteria to
select records.
4) File Maintenance :-
Changes that are made to file to improve the
performance of the programs are known as maintenance activities. There are
two types of maintenance operations :-
a) Restructuring :- Means change in the field structure. e.g – filed size could
be changed.
b) Reorganization:- Means a change from one file organization to another
FILE SYSTEM :-
RECORD 1
Beginning of file
RECORD 2
.
.
.
.
RECORD N END OF FILE
ADVANTAGES :-
1) Simple to understand.
2) Loading & locating a record requires only the record key.
3) Easy to organize & maintain.
4) Files are easier to reconstruct.
5) It is economical.
6) Efficiency of storage.
Dis-ADVANTAGES :-
In this, data is stored on the disk by its KEY-FIELD & the computer
directly locates the key of the required record,without having to search the sequence of
other records.For this purpose, the computer carries out an arithmetic procedure known as
transform(hashing) by means of which record key number is converted into storage
location number.
1) Creation of direct files :- For ceating direct file, a hshing algorithm & collision
handling algorithm must be specified by programmer.Using the given hashing
algorithm,the primary key value of input record is translated into physical address
& then the record is written into the location corresponding to the physical
address.This process continues until all the input records have been written to the
storage medium.
2) Retrieving from direct file (searching):- To retrieve a record from a direct file,user
must supply the primary key value of that record.Using the given hashing algorithm
, the primary key value is translated into physical address & program retrives the
record from that address.If there is no record at that address,then the desired
record at the transformed address,the specified collision method is used to retrieve
the desired record.
3) Updatin a direct file:- To add,delete or modify the record, primary key value of the
record is translated into physical address using hashing algorithm first.Then- it
includes addition of a new record,deletion of an existing record & modification of a
record.
ADVANTAGES:-
1) Fast retrieval of records
2) There is no need to sort transactions.
3) Very suitable for ad-hoc & query requirements.
4) It is also possible to process direct file records sequentially in a record key
sequence.
5) Updating of any record or group of records does not require the re-writing the
entire file.
DIS-ADVANTAGES :-
This approach combines the advantage of both sequential & direct access file
organization.In this orgnisation.the records are organised in sequence but direct access to
individual records is possible through an index.
The external storages devices that support both direct & sequential access are magnetic
drums & magnetic disk.So an indexed sequential file is stored on to direct access
storage.Indexed sequential files are composed of three areas.
1) Prime Area :- The prime area contains records of the file when the file is created or
reorganized.Recprds in the prime area are in order by key.
2) Overflow area :- Records are placed in overflow area when additions to the file
cannot fitted into the prime area.
3) Indexed Area :- The indexes are used to locate a particular record for random
processing.
1) Creating indexed sequential file:- When an indexed sequential file is created all
records are written itno the prime area in sequence by key.The indexes are
generated at this time.
2) Retrieving from indexed sequential file :-
Suppose it is desired to read record 79.One way to access this record
is to sequentially read the records in a file until record 79 is found.This may be a
very slow peocess.A faster way of finding record 79 is to use the track index.
The Highest key of track 3 is 75 & the highest key on track 4 is 82.Therefore, if
record 79 exist, it must be on track 4.Consequently, the next step is to read track
4 to find record 79.Using the track index does not eliminate sequential
searching.It just reduces the magnitude of the task.Instead of searching a large
file of records, we are able to search a table that points towards the desired
record location.
3) Updation:-
It includes the following :-
1) Modification :- It is similar to the retrieval process.Th indexes are used used
to find the desired record & the new record is written on the top of the old
one.
2) Deletion :- A deletion from the file is also straight forward. The indexes are
used to find the desired record & a apecial mark is inserted into the record to
indicate that it has been deleted.
3) Insertion :- Is to an indexed sequential file are quite troublesome because the
key order of the file must be maintained.
ADVANTAGES:-
1) Can be processed both randomly as well as sequentially as needed
2) Very suitable for urgent & ad-hoc information retrieval
3) It permits more efficient use of sequential processing approach, particularly
in situation where activity of files is high.
4) It permit quick access to records when the activity is only the fraction of the
total workload.
Dis-Advantages :-
1) Takes addition storage space for indexed files i.e less efficient in use of storage space
2) Indices need to be designed carefully
3) Slower than direct access.
4) Its implementation requires expensive software resource
DATA AGGREGATE :-
Information :- It is the processed form of data on which decisions & actions are
based.For the decision to be meaningful,the processed data must qualify for the
following features:-
1) Timely
2) Accurate
3) Complete
4) Given to the right persons
Characteristics/Qualities of Information:-
NEED OF INFORMATION :-
TYPES OF INFORMATION :-
1) Operational
2) Tactical
3) Strategical
Database :- It is composed of a collection of files that are linked in such way that
information from one of the files may be combined with information from other files so
that user may receive the exact information needed.A database is well organized collection
of data that are related in a meaningful way which can be accessed in different logical
orders but are stored only once.
Characteristics of Database:-
1) A database represents some aspects of the real world application.any changes in the
real world are reflected in the database.For eg – consider the students database,we
have in our mind certain applications of maintaining records of attendance,unit
examination marks,scholarship etc. realted to each student of the college.
2) A database is designed & built With data for specific purpose.
3) Operations like update,insert,retrieve etc on the database can be carried out in
simple & flexible way.
4) A database provides a logical relational b/w its records & data.Thus various records
can be accessed depending on same logical conditions by a single query from the
database.Thus various records can be accessed depending on same logical
Conditions by a single query from the database
5) It has an intended group of users & some preconceived applications in which these
users are interested.For eg – in a student database,the user groups are the
administrative officials of the college, the students & the teachers.
ADVANTAGES OF DATABASE:-
DATABASE SYSTEM :-
1) Minimal Redundancy :-
In file system each application has redundancy in stored
data, with resultant waste in storage space.For eg – personnel application &
an education-records application may each own a file containing department
information for employees.These two files can be integrated & the redundancy
eliminated, if the DBA is aware of the data requirements for both applications.
3) Sharing of data :-
It means not only that existing applications can share the data in the
database,but also that new applications can be developed to operate against that
same stored data.In other words, the data requirements of new applications may
be satisfied without having to create any new stored files.
4) Search Capability :-
The user of a database may ask a wide variety of the questions
about the data.If a quick answer is needed at a terminal the search will have to
be fast the capability to search a database quickly & with diff search criteria is
highly dependent on the physical data organization.An objective of data-base
organization, then may be to achieve fast flexible search capability.
5) Integrity :-
By integrity we mean unification of several files into one file.when a
database contains data employed by many different users it is important that the
data items & associations b/w data items not be destroyed.Hardware failures &
various types of accidents will occur occasionally.The storage of data & its
updating & insertion procedures,must be such that the system can recover from
these circumstance without harm to the data.This integration reduces
redundancy & also eliminates inconsistency.
5) Complex :-
Another major disadvantage is that database processing tends to
complex,large amounts of data in many diff formats can be interrelated in
the database.Both the database system & the application programs must be
able to process these structure.
9) Increased Vulnerability:-
A final disadvantage is that integration & ence centralized,
increases vulnerability.A failure in one component of an integrated system
can stop the entire system.This event is especially critical if, as is often the
case, the operation of the user organization depends on the database.
1) DATA :- The data stored in the system is partitioned into one or more database.A
database is both integrated & shared.By ‘shared’ we mean that individual pieces of
data in the database may be shared among several diff users, in the sense that each
of those users may have access to the same piece of data.Such sharing is really a
consequence of the fact that the database is integrated.
3) SOFTWARE:- Between the hardware & the users there is layer of software, usually
called the database management system or DBMS.All requests from users for access
to the database are handled by the DBMS.
4) DATABASE USERS:- There are three classes of user
b) End-User:- The second class user, is the end-users, accessing the database from
a terminal. There are two types of END-USERS.
1) CASUAL USERS:- Are trained in the use of the on-line query language &
access data by entering queries at terminals
2) NAÏVE USERS :- Thses users access data through application programs
that have been written for them.They do not need to know any details of
the structure or language of the database system.
APPLICATION
CASUAL NAIVE
PROGRAMMERS
DBA USER USER
DBMS
DATABASE
DBMS (DATA BASE MANAGEMENT SYSTEM):-
Some DBMS examples include MySQL, Microsoft Access, SQL Server, Oracle,
RDBMS, dBASE, and FoxPro. Since there are so many database management systems
available, it is important for there to be a way for them to communicate with each other.
QUERIE
S
DATABASE
OPERATING
DBM SYSTEM
PASCAL/C
FUNCTIONS:-
There are various types of functions available in DBMS are as follow :-
1) DATA DEFINATION(DDL):-
DBMS must be able to accept data definition in source from & then convert
it into the appropriate object form.In the other words DBMS must include language
processor components for each of the various data definition language(DDL).
2) DATA MANUPULATION(DML):-
DBMS must include a DML processor component.The DBMS
must be able to handle request from the user to see retrieve, update, delete or add
the new record to the database.
5) DATA DICTIONARY:-
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.
6) PERFORMANCE:-
DBMS should perform all of the functions identified above as
efficiently as possible.
COMPONENTS OF DBMS:-
2) DATA MANAGER:-
Data Manager convert the user queries from the user logical view to
a physical file system. It is also take care of backup & recovery operation.in
addition, to maintain or control the consistency & integrity of the data as well as
its security are also perform by the data manager.
3) FILE MANAGER:-
File manager takes care of structure of the file & manage the file space.
4) DISK MANAGER:-
It is responsible for controlling the information that is stored on the
disk.It transfer the block requested by the file manager. So that, file manager
need not be concerned with the physical characteristics of storage media.
5) QUERY PROCESSOR:-
The query entered by the users are handled by the query
processor. The query is analyzed & executed by generating call to the database
engine.It is used to interprete the online user query convert it into an efficient
series of operation in a form capable of being send to the data manager for
execution.
6) Tele-Communication System :-
Online user of the computer system weather remote or local
communicate with it by sending & receiving message over communication
line.These messages routed by tele-communication system.
7) Data Files:-
It contains the data portion of the database.
8) Data Dictionary:-
DBMS must provide a data dictionary function.It contains data
about the data.Rather than just raw data.Data dictionary contains the
information about entity, attritubtes, mapping & cross-reference information.
9) Access Aids :-
To improve the performance of a DBMS, a set of access aids in the form
of indexes are usually provided in a database system.
CLASSIFICATION OF DBMS:-
a) Database Administrator
b) Database Designers
c) End-Users
d) System Analysts
e) Application Programmer
1) SCHEMA DEFINITION:-
i.e. the creation of the original database schema.
END-USERS:-
The term end-user is to describe the person who accesses the database in
the course of their day-to-day work.
1) Sophisticated end-users:-
This user interact with the system without writing programs.They form
requests by writing queries in a database query language.The category of users are
very familiar with the system & can use the database to meet their requirements.
2) Specialized end-users:-
This uuser interact with the system with writing special database
application programs.Specialized users can write a specialized program like
CAD,CASE or Multimedia Database programs.This specialized programmer is
called specialized user.
3) Naïve user:-
It access data through application programs that have been written for
them. They do not need to know any details of the structure of language of the
database system.They are totally unsophisticated users who never know writing
programs or even small queries.
SYSTEM ANALYST:-
Application Programmers:-
They perform tough & responsible jobs.The DBMS system designer knows the
hardware requierements of the system & through his analyzing & designing capability, he
produces an efficient system design for the DBMS.The DBMS system implementers are
those who help for hardware implementation of the entire system.They do not play any role
in the software implementation as it is the job of DBA & application/system programmers.
Tool Developers:-
It helps to develop the software tools for DBMS. It is their job to provide complete
management, help & other database creation & maintenance tools for the DBMS.
The operators,who know how to operate the netire system, are fully
responsible for proper running & operation of the hardware parts of complete system.
The final job is the maintenance of machinery for the entire system.The maintenance not
only includes repair & proper working, it also includes the upgradation of the equipments
as & when required.All of them are technical people & the know how to maintain,operate &
upgrade the system.
DBMS ARCHITECTURE:-
1) External level
2) Conceptual level
3) Internal level(PHYSICAL LEVEL)
1) EXTERNAL LEVEL:-
This level is one closed to the users, that is the one concerned with the way
in which the data is viewed by individual users.At the external level the DBMS
presents each user with a shared or single view or schema of the data.There are
many views of the data is this level, & each view is a representation of prt of the total
database.A view allows a user access to their portion of the database & shields the
rest of the database from them.
For eg – one user may view date in the form as day,month,year while another may
view as year,month,day.Some views might include derived or calculated data, that is
data is not stored in the database but are created when needed.The individual age of
all employees stored in the database.
Each external view is defined by means of an external schema, which consists
basically of definitions of each of the various types of external record found in that
external view.
2) CONCEPTUAL LEVEL:-
This level is the representation of entire content of the database.If the
external level is concerned with the individual user views the conceptual level may be
thought of as defining a community user view.In other words, there will be many
external views,each consisting of a similarly abstract representation of some portion
of the database & there will be a single “conceptual view” , consisting of a similarly
abstaract representation of the database in its entirety.
The conceptual view is defined by the conceptual schema which includes definitions
of each of the various types of data or the various types of conceptual record.The
conceptual schema hides the detail of physical storage structures & concentrates on
describing entities, data types, relationships, use operations & constraints.This view
is normally more stable than the other two views.
In most existing system the “conceptual schema” is little more than a simple union of
all individual external schema, with addition of certain security & integrity rules.
The internal view is described by means of the internal schema, which not only
defines the various stored record types but also specifies the indexes, how stored
fields are represented, what physical sequence the stored records are in & so on.
END USERS
EXTERNAL EXTERNAL VIEW
VIEW
CONCEPTUAL SCHEMA
INTERNAL SCHEMA
STORED DATABASE
(DBMS ARCHITECTURE)
DATA INDEPENDENCE:-
The ability to use the database without knowing the representation details
is called data independence .We can also define data independence as the capacity to
change the schema at next higher level needs to be be changed.
1) To allow the DBA to make changes in the content, location, representation &
organization of a database without causing reprogramming of application programs
which use the database.
2) To allow the supplier of data processing equipment & software to introduce new
technologies without causing reprogramming of the customer’s application
3) To facilitate data sharing by allowing the same data to appear to be organized
differently for different application programs.
4) To simplify application program development in particular, to facilitate the
development of programs for interactive data base processing.
5) To provide the centralization of control needed by the databse administrator(DBA)
to insure the security & integrity of the database.