When would you store metadata on a filesystem rather than a database? -



When would you store metadata on a filesystem rather than a database? -

i want store documents metadata in web application such person can view them in hierarchy.

i gather typical way create database entry each document, store metadata in database , store files on filesystem.

it seems much simpler , faster store both documents , metadata on filesystem. directory might this

$ ls subdirectory .json subsubdirectory bar.pdf bar.json foo.tex foo.json

and metadata json files (or whatever format use). render subdirectory/foo.html based on contents of subdirectory/foo.json. , render subdirectory.html based on contents of subdirectory/.json , contents of other kid json files.

the main disadvantage i've thought of might harder search based on contents of metadata file (though search based on filesystem-level metadata). other disadvantages there? , if people utilize approach, why don't hear it?

edit: i'm not concerned searching; if build sort of searching, it'll within single, smallish directory.

"i search based on filesystem-level metadata" - means each time search have read metdata files fs , have manually process it. there's no indexing, equivalent of total table scan in sql database (but it's slower..).

in general storing info on fs has other drawbacks, have replication both durability (so don't lose files if disk dies), , if site popupar, scalability. since storing files on disk have solve issue anyway.

database metadata

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -