File system vs DBMS
Learn via video course

Overview
A file system is a software that organizes and manages files on a storage media, whereas a database management system (DBMS) is a software that allows you to access, create, and administer databases. A DBMS is actually better than FPS for the most of it. Whether it be data consistency and accessibility, security and recovery of data, etc.
Scope
- This article discusses database management system and file processing system in brief.
- It mainly covers all the differences between the two, firstly in detail and then in a tabular form.
- This article doesn't involve any code. The aim is just to explain the differences.
Introduction
You must have used a conventional file processing system a lot of times. Yeah, it makes our lives easier by organizing our files. But, do you ever wonder, what if we could add a ton of extra features to it, making it much more efficient in terms of accessibility and a more systematic way of performing operations on your data? That's exactly what Database Management System or a DBMS does!
File Processing System or File System
A File Processing System is a method or a tool which facilitates storing, accessing and modifying data from numerous files in a computer system.
All data is stored in the form of files. All files are categorized and sorted accordingly. The file names are closely related to one another and are organised in such a way that they are easily accessible.
Files like.txt, .jpg, and .docx, as well as structured datatypes like .xml and .json, may be used by a file processing system. For organizing or more complex administration needs, files can be placed in different system directories.
Examples of file systems include storage media like hard disks, pendrives, etc, that may contain data such as music files, videos, documents and what not.
Database Management System
A Database Management System or simply DBMS, is a collection of programs that enables users to create and maintain a database. It is a general purpose software system that facilitates the process of defining, constructing and manipulating databases for various applications. It ensures the database's safety and security. It also ensures data consistency when there are multiple users.
If you'd like to read in detail about DBMS, here is the link to our DBMS article!
Examples of popular DBMS softwares are Oracle, MySQL, MS SQL Server, DB2, Microsoft Access, etc.
So, now that you're all set, let's dive into the key differences!
Difference between File System and DBMS
Here, we will first differentiate a file processing system and database management system in terms of certain aspects, and later we will summarise them in a tabular form. Without waiting anymore, let's begin:
1. Data Redundancy and Consistency
In an FPS, files are created in different formats and in different programming languages. Also, they are also duplicated at times, leading to redundancy of data, which in turn leads to occupying of more storage.
Whereas DBMS controls redundancy, as one item is stored at only one place in a DBMS, so there is no redundancy or inconsistency, and in addition to that, this saves a lot of storage space! To learn more about redundancy in DBMS, click here.
2. Ease of Accessing Data
In an FPS, we can access data using 2 methods, either manually or by means of an application program.
Example: If we want to generate a list of customers in a bank with pincode 201002, result of both methods would be unsatisfactory, i.e., file processing systems don't allow needed data to be retrieved in a convenient and efficient manner.
On the other hand, DBMS uses queries, which obviously provide an easy route to search for the required data. Moreover, they represent complex relationships among data easily, using the concept of foreign keys. Now, if we were to look for the bank customer records in a DBMS, it would be very easy, and could be done in just a single SQL query!
In the above query, 'Database' is the name of the bank database in which the details of the customers are stored, and cust_pincode is the name of the column or attribute in which pincodes of the customers are stored.
3. Data Integrity
In the case of FPS, data is scattered in files, which may be in different formats which makes it pretty difficult to write programs to retrieve appropriate data. Whereas DBMS enforces integrity constraints, which means it enforces and provides capabilities for defining constraints that must hold for data, or in other words, to specify the data type for each data item!
4. Atomicity
A computer system, at times is subject to failure.
Example: If a system fails, it is possible that money may be debited from the sender's account and not received by the receiver. Therefore, you can see how this would cause an inconsistent state of transactions.
DBMS solves this problem by following the atomicity property, which means that a transaction or operation should either be fully complete, or should not start at all! Read more about Atomicity in DBMS.
5. Concurrent Access
When multiple users update data simultaneously, the concurrent updates may result in inconsistent data.
Example: Two customers withdraw funds of Rs. 100 and Rs. 50 from a joint account with a balance of Rs. 500. Then, the account may contain Rs. 400 or Rs. 450 depending on who does the last transaction, rather than the actual current amount, i.e., Rs. 350.
And on the other hand, DBMS has concurrency control mechanism. Concurrency control regulates the number of people who can access a database at the same time. It keeps data centralized and prohibits two people from altering the same record at the same time.
6. Security of Data
We do not want all users to be able to access all data. But in file processing system, application programs are added in ad-hoc manner, and enforcing such security constraints is difficult.
Whereas, DBMS provides security and authorization subsystem, which ensures that some users are not authorized to access all the data in the database.
7. Backup and Recovery
Sometimes, data is lost. This could happen due to software failures or other reasons. A file processing system is not immune to such problems.
The same thing could happen in DBMS, but it does provide users the facilities of backup and recovery of data so that the valuable data isn't lost.
8. Data Independence
A file processing system doesn't provide data independence, while on the other hand, DBMS provides two kinds of data independence, physical and logical. To read more about data independence in DBMS, click this link.
9. Investment
The costs of using a DBMS include:
- High initial investment in hardware and training.
- Providing security recovery and integrity functions.
A file processing system is comparatively cheaper. So, it is advisable to opt for an FPS if:
- The application structure is simple and is not expected to change.
- Multiple user access to data is not required.
We have now covered all the differences between a file processing system and DBMS. Clearly, a DBMS is better in comparison, as you might have observed.
Differences in Tabular Form
Basis of differentiation | File Processing System | DBMS |
---|---|---|
Data redundancy & inconsistency | The problem of duplication and inconsistency in data exists in FPS. | There is no redundancy and inconsistency in data due to centralization of the database. |
Ease of data access | Accessing data in file system isn’t as easy as DBMS. | Accessing data is easier in DBMS as compared to a file system. |
Data independence | There is no data independence in file system. | Data independence exists in DBMS. |
Atomicity | Atomicity is not present in file system. | DBMS provides atomicity of transactions. |
Concurrency control | It doesn’t have concurrency control. | DBMS has concurrency control. |
Recovery | File system doesn’t provide the facility of recovery, in case of data loss. | DBMS provides the facility of data backup and recovery. |
Security | Data security is less in file processing system. | DBMS offers high data security. |
Cost | File system is relatively cheaper as compared to DBMS. | DBMS is costlier as compared to a file system. |
Conclusion
So, finally we are done discussing on the topic "file system vs DBMS". Let's conclude by talking separately about both of them:
- A DBMS is highly useful, and there are several reasons for that:
- offers the ability to control redundancies in data
- offers a highly secure and efficient way of storing and arranging data records
- multi-user access
- the ease of accessing data.
- A File Processing System is used
- when the structure of application is to remain the same for a long time,
- when it is needed for only a single user.
- It offers its own advantages, however, most of it are overshadowed by the features of a DBMS.
The synopsis is pretty clear that a Database Management System is much better than a File Processing System, as a DBMS holds several advantages over FPS.