File System Vs DBMS

File System Vs DBMS

File System Vs DBMS

In this article you will know about File System Vs DBMS

A Database is an organised, persistent collection of data of an organisation. The database management system manages the database of an enterprise. But why do we need the database management system? To describe it, let us first discuss the alternative to it, that is the file-based system.

The File Based System

File based systems are an early attempt to computerise the manual filing system. For example, a manual file can be set up to hold all the correspondence relating to a particular matter as a project, product, task, client or employee. In an organisation there could be many such files which may be labeled and stored. The same could be done at homes where file relating to bank statements, receipts, tax payments, etc., could be maintained

What do we do to find information from these files? For retrieval of information, the entries could be searched sequentially. Alternatively, an indexing system could be used to locate the information, File System Vs DBMS

The manual filing system works well when the number of items to be stored is small. It even works quite well when the number of items stored is quite large and they are only needed to be stored and retrieved. However, a manual file system crashes when cross-referencing and processing of information in the files is carried out. For example, in a university a number of students are enrolled who have the options of doing various courses.

The university may have separate files for the personal details of students, fees paid by them, the number and details of the courses taught, the number and details of each faculty member in various departments. Consider the effort to answer the following queries. File System Vs DBMS

  • Annual fees paid by the students of  Computer science department. 
  • Number of students requiring transport facility from a particular area. 
  • This year’s turnover of students as compared to last year. 
  • Number of students opting for different courses from different departments.
  • Please refer to Figure 1. The answer to all the questions above would be cumbersome and time consuming in the file based system.

Limitations of File Based System

The file-based system has certain limitations. The limitations are listed as follows:

  • Separation and isolation of data: When the data is stored in separate files it becomes difficult to access. It becomes extremely complex when the data has to be retrieved from more than two files as a large amount of data has to be searched.
  • Duplication of data: Due to the decentralised approach, the file system leads to uncontrolled duplication of data. This is undesirable as the duplication leads to wastage of a lot of storage space. It also costs time and money to enter the data more than once. For example, the address information of student may have to be duplicated in bus list file data (Figure 1)File System Vs DBMS
  • Inconsistent Data: The data in a file system can become inconsistent if more than one person modifies the data concurrently, for example, if any student File System Vs DBMS

changes the residence and the change is notified to only his/her file and not to bus list. Entering wrong data is also another reason for inconsistencies. File System Vs DBMS

  • Data dependence ::- The physical structure and storage of data files and records are defined in the application code. This means that it is extremely difficult to make changes to the existing structure. The programmer would have to identify all the affected programs, modify them and retest them. This characteristic of the File Based system is called program data dependence.
  • Incompatible File Formats ::-  Since the structure of the files is embedded in application programs, the structure is dependent on application programming languages. Hence the structure of a file generated by COBOL programming language may be quite different from a file generated by ‘C’ programming “language. This incompatibility makes them difficult to process jointly. The application developer may have to develop software to convert the files to some common format for processing. However, this may be time consuming and expensive. File System Vs DBMS
  • Fixed Queries ::-  File based systems are very much dependent on application programs. Any query or report needed by the organisation has to be developed by the application programmer. With time, the type and number of queries or reports increases. Producing different types of queries or reports is not possible in File Based Systems. As a result, in some organisations the type of queries or reports to be produced is fixed. No new query or report of the data could be generated.

Besides the above, the maintenance of the File Based System is difficult and there is no provision for security. Recovery is inadequate or non-existent.

File based system versus database system
File based system versus database system

The Database Approach

In order to overcome the limitations of a file system, a new approach was required. Hence a database approach emerged. A database is a persistent collection of logically related data. The initial attempts were to provide a centralised collection of data. A database has a self-describing nature. It contains not only the data but also the complete definition of the database structure and constraints, which are stored in a system catalog.

A DBMS manages this data. It allows data sharing and integration of data of an organisation in a single database. DBMS controls access to this data and thus needs to provide features for database creation, data manipulation such as data value modification, data retrieval, data integrity and security etc. Let us describe some of the advantages of the database approach.

The database approach has many advantages. Let us discuss these in more detail. 

Reduction of Redundancies

In a file processing system, each user group maintains its own files resulting in a considerable amount of redundancy of the stored data. This results in wastage of storage space but more importantly may result in data inconsistencies. Also, the same data has to be updated more than once resulting in duplication of effort. The files that represent the same data may become inconsistent as some may be updated whereas others may not be.

In database approach data can be stored at a single place or with controlled redundancy under DBMS, which saves space and does not permit inconsistency. 

Shared Data

A DBMS allows the sharing of database under its control by any number of application programs or users. A database belongs to the entire organisation and is shared by all authorised users (may not be the complete data, why?). This scheme can be best explained with the help of a logical diagram (Figure 2). New applications can be built and added to the current system and data not currently stored can be stored.

 Data Independence 

In the file-based system, the descriptions of data and logic for accessing the data are built into each application program making the program more dependent on data. A change in the structure of data may require alterations to programs. Database Management systems separates data descriptions from data. Hence it is not affected by changes. This is called Data Independence, where details of data are not exposed. DBMS provides an abstract view and hides details. For example, logically we can say that the interface or window to data provided by DBMS to a user may still be the same although the internal structure of the data may be changed. (Refer to Figure 2). 

Improved Integrity 

Data Integrity refers to validity and consistency of data. Data Integrity means that the data should be accurate and consistent: This is done by providing some checks or constraints. These are consistency rules that the database is not permitted to violate. Constraints may apply to data items within a record or relationships between records. For example, the age of an employee can be between 18 and 70 years only.

While entering the data for the age of an employee, the database should check this. However, if Grades of any student are entered, the data can be erroneously entered as Grade C for Grade A. In this case DBMS will not be able to provide any check as both A and C are of the same data type and are valid values.

Efficient Data Access

DBMS utilises techniques to store and retrieve the data efficiently at least for unforeseen queries. A complex DBMS should be able to provide services to end users, where they can efficiently retrieve the data almost immediately.

Multiple User Interfaces

Since many users having varying levels of technical knowledge use a database, a DBMS should be able to provide a variety of interfaces. This includes —

  • query language for casual users, 
  • Programming language interfaces for application programmers, 
  • forms and codes for parametric users, 
  • menu driven interfaces, and 
  • natural language interfaces for standalone users, these interfaces are still not
  • available in standard form with commercial database.
A user can either access data window through DBMS or use an application program
A user can either access data window through DBMS or use an application program

Also Read

Also Read :-  Networking 
DBMS Full Form

DBMS Full Form

Architecture Of DBMA

Architecture Of DBMA

Deadlock in DBMS

Deadlock in DBMS

Query Processing in DBMS

Query Processing in DBMS

Relational Calculus in DBMS

Relational Calculus in DBMS

Spread the love

Leave a Comment

Your email address will not be published. Required fields are marked *