What are the limitations of file system that can be removed by using database?

Traditionally, the file system was used for data management. Data was stored in files and users access those files directly by going at the location of the file physically. But things become harder when the amount of data stored in the files get increased. How will you search a file from millions of files available to you? Will you go one by one to each file and search for your file? No. It is very tedious and next to impossible process. Also, when we are having some online or digital data, then we store our data in some database and particular software is used to handle the database(read more about database and DBMS from here ). So, there is a lot of difference between the traditional file system and the Database Management System. In this blog, we will see the difference between these two. So, let's get started.

File System

The file system is a traditional way of storing data where the user saves the file manually at any location. It is an easy way to store texts, audio, video but here security is a major concern. The options which are given by the operating system in the name of security are very limited. Only options which we have are locks and hidden files. Also, these files are very hard to maintain and users manually go to these locations to access these files. So, there were many problems with this file system. Let's now see in details these problems:

Problems with the traditional file system

  • Data Redundancy: In a file system, there are high chances of data duplicity. Same data may be stored multiple times. Example: We have an employee who is working on two projects. So, we might end up storing the information of that employee twice, which may lead to increased storage.
  • Data Inconsistency: Data redundancy is the main cause of data inconsistency. In the above example, let us suppose we need to change the mobile number of the employee and we change it in one place but we forget to edit it at another place. This would lead to data inconsistency because in future if we refer to this data we would not know which one is correct and which one is wrong. For having the correct data you need to store the same data at both places and this is a very bad thing to do.
  • Low Security: In the file system, anyone having access to the files can see all the data. There is no role-based access control i.e there is no method by which some authenticated people would have access to all data and others would have access to only limited data.
  • Attributes for accessing file: Metadata means data about data. If we want to access any file in the file system then we require the name of the file, its address, permissions etc. All these are not easy to remember and also not user-friendly. Example: If we need to access any file, we need to provide its full location like Desktop/AfterAcademy/DBMS/FileSystemVsDBMS/ .
  • No Concurrent Access: If multiple users access the data at the same time then there might be some data inconsistency.

These are some of the drawbacks of the file system that are removed by the Database Management System. Let's see how.

Database Management System

As we have seen above that file system had many problems. So, DBMS came as a saviour and resolved these problems. As the main problem with the file system was security, DBMS is an effective way to store the data when security is the major concern of the user. DBMS stores the data in the form of interrelated tables and files. This reduces the redundancy of data as the data here is centralized(you can read more about the characteristics of DBMS from here ). Also, access to data is very fast when we use DBMS. It provides us with an interface or a tool, to perform various operations like:

We discussed earlier some of the limitations of applications that rely on traditional file management. What are the advantages of the database approach?

  • Eliminating data redundancy.With the database approach to data management, data need only be stored once. Applications that need data can access the data from the central database. For example, in Figure 3.5, part (a), there are multiple versions of the inventory master data, while in part (b) of that figure there is but one. Further, Figure 3.6 depicts the same data elements on more than one file, whereas Figure 3.7 shows each data element only once. An organization using the applications-based file approach to data management must incur the costs and risks of storing and maintaining these duplicate files and data elements.
  • Ease of maintenance. Because each data element is stored only once, any additions, deletions, or changes to the database are accomplished easily. Contrast this to the illustration in Figure 3.6, where a change in a salesperson, territory, or customer combination, for instance, would require a change in three different files.
  • Reduced storage costs. By eliminating redundant data, storage space is reduced, resulting in associated cost savings. However, in most database installations, this savings is more than offset by the additional costs of DBMS software.
  • Data integrity.This advantage, like several others, results from eliminating data redundancy. As mentioned earlier, storing multiple versions of the same data element is bound to produce inconsistencies among the versions. For instance, the salesperson and sales territory data might differ among their many versions, not only because of clerical errors but because of timing differences in making data maintenance changes. We could make similar comments about inconsistent data resulting from the timing differences that might occur during event data processingof the inventory master data by the sales and inventory applications. With only one version of each data element stored in the database, such inconsistencies disappear.
  • Data independence. As illustrated in part (b) of Figure 3.5, the database approach allows multiple application programs to use the data concurrently. In addition, the data can be accessed in several different ways (e.g., through applications processing, online query, and report writing programs). And, the access can be quickly changed by modifying the definition of the tables or views. With the traditional applications-based file approach, the programs would have to be revised to provide access to more or less data.
  • Privacy.The security modules available through DBMS software can contain powerful features to protect the database against unauthorized disclosure, alteration, or destruction. Control over data access can typically be exercised down to the data element level. Users can be granted access to data for reading or updating (add, revise, delete) data. Other ways to implement security include data classification(i.e., data objects are given classification levels and users are assigned clearance levels) and data encryption (discussed in Chapter 9).

Review Question

What are the relative advantages of the database approach?

 

These advantages add greatly to the incentive for firms relying on legacy systems to move to database-supported applications.

What are the limitations of file systems how can they be solved using database systems?

Data Redundancy: It is possible that the same information may be duplicated in different files but in relational DBMS chances are very less..
Data Inconsistency..
Difficulty in Accessing Data..
Limited Data Sharing..
Integrity Problems..
Atomicity Problems..
Concurrent Access Anomalies..
Security Problems..

What are the limitations of file system that can be overcome?

In a File System, there are several limitations like Redundancy, inconsistency, Difficulty in accessing data, Integrity Problems, Security Problems, etc. To overcome these limitations, a relational DBMS is preferred.

What are the limitations of file system for which we prefer database system?

There is no redundancy and inconsistency in data due to centralization of the database. Accessing data in file system isn't as easy as DBMS. Accessing data is easier in DBMS as compared to a file system. There is no data independence in file system.

What are the limitations of file system that lead to the evolution of database system?

Drawbacks of File system Data Isolation: Because data are scattered in various files, and files may be in different formats, writing new application programs to retrieve the appropriate data is difficult. Dependency on application programs: Changing files would lead to change in application programs.