Difference Between File System and DBMS
Difference Between File System and DBMS
Consider an example of a student's file system. The student file will contain information regarding the
student (i.e. roll no, student name, course etc.). Similarly, we have a subject file that contains information
about the subject and the result file which contains the information regarding the result.
Some fields are duplicated in more than one file, which leads to data redundancy. So to overcome this
problem, we need to create a centralized system, i.e. DBMS approach.
ADVERTISEMENT
DBMS:
A database approach is a well-organized collection of data that are related in a meaningful way which
can be accessed by different users but stored only once in a system. The various operations performed
by the DBMS system are: Insertion, deletion, selection, sorting etc.
In the above figure,
There are the following differences between DBMS and File systems:
Meaning DBMS is a collection of data. In DBMS, the The file system is a collection of data.
user is not required to write the In this system, the user has to write
procedures. the procedures for managing the
database.
Sharing of data Due to the centralized approach, data Data is distributed in many files, and it
sharing is easy. may be of different formats, so it isn't
easy to share data.
Data Abstraction DBMS gives an abstract view of data that The file system provides the detail of
hides the details. the data representation and storage of
data.
Security and DBMS provides a good protection It isn't easy to protect a file under the
Protection mechanism. file system.
Recovery DBMS provides a crash recovery The file system doesn't have a crash
Mechanism mechanism, i.e., DBMS protects the user mechanism, i.e., if the system crashes
from system failure. while entering some data, then the
content of the file will be lost.
Manipulation DBMS contains a wide variety of The file system can't efficiently store
Techniques sophisticated techniques to store and and retrieve the data.
retrieve the data.
Concurrency DBMS takes care of Concurrent access of In the File system, concurrent access
Problems data using some form of locking. has many problems like redirecting the
file while deleting some information or
updating some information.
Where to use Database approach used in large systems File system approach used in large
which interrelate many files. systems which interrelate many files.
Cost The database system is expensive to The file system approach is cheaper to
design. design.
Data Redundancy Due to the centralization of the database, In this, the files and application
and Inconsistency the problems of data redundancy and programs are created by different
inconsistency are controlled. programmers so that there exists a lot
of duplication of data which may lead
to inconsistency.
Structure The database structure is complex to The file system approach has a simple
design. structure.
Data In this system, Data Independence exists, In the File system approach, there
Independence and it can be of two types. exists no Data Independence.
o Logical Data Independence
o Physical Data Independence
Integrity Integrity Constraints are easy to apply. Integrity Constraints are difficult to
Constraints implement in file system.
Data Models In the database approach, 3 types of data In the file system approach, there is no
models exist: concept of data models exists.
o Hierarchal data models
o Network data models
o Relational data models
Flexibility Changes are often a necessity to the The flexibility of the system is less as
content of the data stored in any system, compared to the DBMS approach.
and these changes are more easily with a
database approach.