File System vs DBMS

Comparison between File System and DBMS

 On this page, you will learn about File System Vs DBMS, the difference comparison and the advantage comparison between File System and DBMS Systems.
File System vs DBMS img

File System Vs DBMS

File System is an old method of storing data in set of files. It helps us to organize the data and allows easy retrieval of files when they are required whereas DBMS System is the new method of storing data in a tabular format. It consists of a group of programs that manipulate the database. 

There are some drawbacks of using file system which is also explained below.

File System vs DBMS

Difference Comparison

 
  • File System Earlier the data were stored in a file format where the data is stored in one file or set of files. These files have no logical relation with one another and data is just thrown in them. With the user needing to remember the logical relationships between them on his own.

Imagine, having multiple files, one for usernames, one for passwords, one for email ID, and maybe 1000’s of such individual files. The user will have to logically remember the relationship amongst them on his own.

 

  • DBMS System This is new-age software that maintains the data stored in a tabular format with various different entities having logical relationships amongst one another. The software gives the programmer easy methods to do various operations like creation, definition, updating, deletion, access modification rights, etc.

Imagine, having one single table named as a user with columns being email ID, userID, Username, Firstname, LastName, Passwords, etc. Each row contains information for one user of the website and one more table containing product information. Which has a common column userID(Same that of user table) and further columns containing information like – date of purchase, productID, validity, etc.

 

Read more about DBMS here on this page.

Advantage Comparison

Data concurrency – 

Imagine a banking transaction, where your bank balance is 1000Rs and you try to take out 900Rs. cash from two different ATMs at the same time. In such cases the ATM will check that your current balance is sufficient and allows transaction. But, you’re able to withdraw 1800 cash right as both transactions were done at the same time. This called concurrency.

There is a need of a locking mechanism which makes sure that these situations don’t arrive. In File systems we don’t have such system to manage such situations. However, modern DBMS systems by default provide inbuilt concurrency handling systems.

Data Searching –

It is very easy in DBMS systems, which have most of the highly efficient search operations inbuilt. User only needs to write a one line query to get the results. However, in file systems, you need to write your own long code for various search operations.

Data Integrity –

When a data is being inserted in the database there maybe cases when, we need only a particular type of data being entered. Like RollNo should only accept int values. Such constraints are there in DBMS systems but not in File systems.

Data Sharing –

Data sharing and access rights are easy and inbuilt in the DBMS system. But in file systems its too complex.

Data Redundancy and Inconsistency –

Imagine Amazon.com having two different tables for users and product purchase, with both having email ID as one data. Now, the user may change his/her email ID. Now, this may only reflect in user table, but not in the product table. Which may cause data inconsistency in file sharing systems. This is handled really well in DBMS system because of its inter-dependent relationship in nature.

Tabular Format

Data stored in DBMS systems mostly is in tabular format . However, in file systems its generally not the case.

ID Name Age Salary
1 Adam 34 13000
2 Alex 28 15000
3 Stuart 20 18000
4 Ross 42 19020

Prime Course Trailer

Related Banners

Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others

Checkout list of all the video courses in PrepInsta Prime Subscription

Checkout list of all the video courses in PrepInsta Prime Subscription