Comp Sci Data sharing in traditional file system vs dbms?

  • Thread starter Thread starter shivajikobardan
  • Start date Start date
  • Tags Tags
    Data File System
AI Thread Summary
Data sharing in traditional file systems (TFS) is complicated due to the decentralized nature of data, which allows multiple users to read and write simultaneously, leading to potential data conflicts and overwrites. In contrast, a database management system (DBMS) ensures data integrity through atomic operations, preventing simultaneous updates from conflicting. For example, when two users attempt to increment a count, the DBMS locks the data during the operation, ensuring that one user's changes are not lost. This mechanism is absent in TFS, where users can overwrite each other's changes if they access the same file at overlapping times. Consequently, sharing data is more reliable and efficient in a DBMS compared to a traditional file system.
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 shivajikobardan
Thread 'Have I solved this structural engineering equation correctly?'
Hi all, I have a structural engineering book from 1979. I am trying to follow it as best as I can. I have come to a formula that calculates the rotations in radians at the rigid joint that requires an iterative procedure. This equation comes in the form of: $$ x_i = \frac {Q_ih_i + Q_{i+1}h_{i+1}}{4K} + \frac {C}{K}x_{i-1} + \frac {C}{K}x_{i+1} $$ Where: ## Q ## is the horizontal storey shear ## h ## is the storey height ## K = (6G_i + C_i + C_{i+1}) ## ## G = \frac {I_g}{h} ## ## C...
Back
Top