Skip to content

Instantly share code, notes, and snippets.

@gavinlaking
Created August 5, 2012 17:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gavinlaking/3266131 to your computer and use it in GitHub Desktop.
Save gavinlaking/3266131 to your computer and use it in GitHub Desktop.
Filesystem as databases?
If we should store assets on the filesystem rather than in the database because access is faster, then why are we not storing data on the filesystem rather than in a database? A database typically consists of a couple of files, one being the hunk of data itself, the others, supporting files like indicies.
So, why not use the filesystem as it was designed: direct and flexible. Store our data using the right tool for the job. I can't think of anything that an off-the-shelf database ACIDically provides that our filesystems can not already do.
Consistency may be lacking, from the respects of ensuring that a file is as it says (size, contents, etc), however, is it not the job of those wishing to store data to ensure it is correct before persistence? i.e garbage in, garbage out.
If we should store assets on the filesystem rather than in the database because access is faster, then why are we not storing data on the filesystem rather than in a database? A database typically consists of a couple of files, one being the hunk of data itself, the others, supporting files like indicies.
So, why not use the filesystem as it was designed: direct and flexible. Store our data using the right tool for the job. I can't think of anything that an off-the-shelf database ACIDically provides that our filesystems can not already do.
Consistency may be lacking, from the respects of ensuring that a file is as it says (size, contents, etc), however, is it not the job of those wishing to store data to ensure it is correct before persistence? i.e garbage in, garbage out.

If we should store assets on the filesystem rather than in the database because access is faster, then why are we not storing data on the filesystem rather than in a database? A database typically consists of a couple of files, one being the hunk of data itself, the others, supporting files like indicies.

So, why not use the filesystem as it was designed: direct and flexible. Store our data using the right tool for the job. I can't think of anything that an off-the-shelf database ACIDically provides that our filesystems can not already do.

Consistency may be lacking, from the respects of ensuring that a file is as it says (size, contents, etc), however, is it not the job of those wishing to store data to ensure it is correct before persistence? i.e garbage in, garbage out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment