ADD

Thursday 3 March 2016

FILE SYSTEMS Vs DBMS

INTRODUCTION TO FILE SYSTEMS

        one way to keep the information on a computer is to store it in permanent system i.e., FILES.FILE is a memory block of a secondary - storage device like disk,magnetic -tape etc, to store logically related records permanently.Therefore,in a file management system,each record has a separate file.Various records are stored in various files and different programs are written to work with different files respectively.thus,as time goes by,more file and more programs are added to the system.this approach of data management,where the organization has many programs with related file,is Known as traditional approach.This traditional approach can cause many problems like data redundancy,data inconsistency,difficulty in accessing data etc.
      These problems of traditional file system can be eliminated by using database approach.With database approach,all the data resides in the same storage location,rather than residing in many different files across the organization.unlike traditional file system,in which different programs access different files,the database in arranged so that one set of programs - the database management system - provides access to all the data.therefore,data redundancy,data inconsistency are minimized and data can be shared among all users of the database.In addition security and data integrity are increased.

STRUCTURES OF DBMS 

The structure supporting  parts of a  DBMS with same simplification based on the relational data model. 
  A DBMS is divided into  two modules (parts) :   
  1. Query processor 
  2. Storage manager 
     The query processor components in DBMS accepts SQL commands generated from a variety of user interfaces, produces query evaluation plans, executes these plans with the database, and returns the answers. The query processor components are : 
(i) . DML compiler,  which translates DML statements in a query language low- level instructions that the query evaluation engine understands. In addition, the DML compiler transform a  user's request into an equivalent but more efficient from low-level instructions, thus finding a good strategy for executing the query. 


(ii) . Embedded DML Precompiler, SQL commands can be embedded in host- language application programs, example; JAVA or COBOL programs, which can be converted into DML statements by this embedded DML pre-compiler. The pre-compiler must interact with the DML compiler to generate the appropriate code. 

 (iii) . DDL interpreter, which interpreter DDL statements and records than in a set tables containing metadata.
(iv) . Query Evaluation Engine, which executes low-level instructions generated by the DML compiler. 
(v) . Application Programs Object Code, which is the low- level instructions of the programs written by novice users, which the query evaluation engine understands and executes them.

       The storage manager components in DBMS provides the interface between the physical level stored data in the database and the programs/ queries requesting the stored data from the database. The storage manager components are : 

(i) . Authorization and integrity manager, which tests for the satisfaction of integrity constraints  and checks the authority of uses to access data.
(ii) . Translation manager, which ensures that the database remains in a consistent (corrector) state despite of the system failures, and the concurrent transaction executions proceed without conflicting.
(iii).file manager, which manages the allocation of space storage and the data structures used to represent the stored information on disk.
(iv). Buffer  manager, which is responsible for fetching data from disk storage into main memory, and deciding what data to cache in memory.
(v). Lock manager, which keeps track of requests for locks and grants looks on the data in the database.
(vi). Recovery manager, which is responsible for maintaining a log and restoring the system to a consistent state after a crash. 
           In addition, the  DBMS software deals with the management of space on disk,where the data is stored, The disk storage components are :
(i) . Data files, which store the database itself.
(ii). Data dictionary, which stores metadata  about the structure of the database. The data dictionary, is used very heavily. Therefore, great emphasis should be placed on developing a good design and efficient implementation of the dictionary,
(iii) . Indices, which provide fast access to data items that hold particular values.
(iv) . Statistical data, which stores statistical information about the data in the database. This information is used by the query processor to select efficient ways to execute a query.

2 comments: