title: When would you store metadata on a filesystem rather than a database?
body: <p>I want to store documents with metadata in a web application such that a person can view them in a hierarchy.</p>
  
  <p>I gather that a typical way to do this is to create a database entry for each document, store metadata in the database and store the files on a filesystem.</p>
  
  <p>It seems much simpler and faster to store both the documents and the metadata on the filesystem. So a directory might look like this</p>
  
  <pre><code>$ ls subdirectory
  .json
  Subsubdirectory
  bar.pdf
  bar.json
  foo.tex
  foo.json
  </code></pre>
  
  <p>And then I could get the metadata from the json files (or whatever format I use). I could render subdirectory/foo.html based on the contents of subdirectory/foo.json. And I could render subdirectory.html based on the contents of subdirectory/.json and the contents of the other child json files.</p>
  
  <p>The main disadvantage I've thought of is that it might be harder to search based on the contents of the metadata file (though I could search based on filesystem-level metadata). What other disadvantages are there? And if people do use this approach, why don't I hear about it?</p>
  
  <p>EDIT: I'm not really so concerned about searching; if I build some sort of searching, it'll probably be within a single, smallish directory.</p>