Data sharing in traditional file system vs dbms?

  • Context: Comp Sci 
  • Thread starter Thread starter shivajikobardan
  • Start date Start date
  • Tags Tags
    Data File System
Click For Summary
SUMMARY

Data sharing in traditional file systems (TFS) is inherently more challenging than in database management systems (DBMS) due to the decentralized nature of TFS. In TFS, multiple users can read and write to the same file simultaneously, leading to potential data overwrites and loss of updates. In contrast, DBMS utilizes atomic operations to manage concurrent updates, ensuring data integrity by locking out other users during an operation. This fundamental difference highlights the advantages of DBMS in maintaining consistent data across multiple users.

PREREQUISITES
  • Understanding of traditional file systems (TFS)
  • Familiarity with database management systems (DBMS)
  • Knowledge of atomic operations in databases
  • Concept of concurrency control in data management
NEXT STEPS
  • Research atomic operations in MySQL and PostgreSQL
  • Explore concurrency control mechanisms in DBMS
  • Learn about file locking techniques in traditional file systems
  • Investigate distributed computing solutions for data consistency
USEFUL FOR

Software developers, database administrators, and IT professionals interested in understanding data integrity and concurrency issues in file systems and databases.

shivajikobardan
Messages
637
Reaction score
54
Homework Statement
Why is data sharing not possible in traditional file system(TFS) (vs DBMS)?
Relevant Equations
None
I know data is decentralized in TFS. But how does that makes data sharing difficult?
We've got distributed computing for the similar purpose on different machines as well.
I read a lot on this but failed to find any information regarding why it was not possible to share data in TFS as compared to DBMS? And why is it easy to share data in DBMS?
OXyqoVluQNQklwcHQr3XbhnrP2ZsvwAEVwe8FVOZJHwa8dLGyA.png

Source: Parteek Bhatia "Simplified Approach to DBMS"

According to this figure, I really don't see anything not offered in TFS that is offered in DBMS.
 
Physics news on Phys.org
The DBMS will handle updates to the data insuring that no two entities can update and overwrites one anothers data.

As an example, you have a data record with a count. User A reads the count and adds one to it and then writes it back to the database. At the same time, User B reads the count, adds one and writes it back. You can see that its possible for User B to overwrite User A count increment.

A DBMS would use an atomic operation to increment the count meaning when run by User A the count is read and incremented in one operation. Hence User B is locked out and can't do the same until the User A operation completes.

With a shared filesystem its still possible for someone to read a file, make some changes and write it back while another user is reading the file making different changes and writing it back at a slightly later time

at t0 user A reads file X
at t1 user B reads file X
at t2 user A writes back changes X'
at t3 user B writes back changes X' --> X''

and so User A's changes X' are lost
 
  • Like
Likes   Reactions: shivajikobardan

Similar threads

Replies
8
Views
2K
Replies
10
Views
5K
  • · Replies 22 ·
Replies
22
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 13 ·
Replies
13
Views
10K
  • · Replies 13 ·
Replies
13
Views
5K