Why use an Object Database?


Why is the Forest Wiki built on an object-graph database?

The problem is that the traditional hierarchical file system is severely limiting to software developers.  The file system, is by computer standards a stone-age technology.  It was first developed in 1965 for Multics.   File systems have limited functionality, and are not extensible.  Directories have a name, and some files.   Files have a name and one blob of data.   They also have time stamps and permissions. But that is all a File System offers.  Directories cannot have their own data, files cannot have children, and you can't customize the functionality of a file or  of a directory.  And don't ever think of a file system as a tree of different classes.  Once you learn Python, you will understand just how primitive a file system is compared to a tree of persistent Python objects, but for now, I ask that you just trust me on this point.    It has big implications for the forest wiki. 

Objects Vs Files

In an object oriented database, objects have names titles and children.  A name is like a file name. You might also see it in a URL.  A title is a human readable name.  So for this page, the objects's name in the url is "forest-wiki", but it displays a human readable title called "Teaching Web Development".
It makes things so much easier for us humans. 

In a file system, html files cannot have children.  In an object database, html objects can have children.  I often put the CSS, Javascript and JSON associated with an HTML template as children of that template.  It make it really easy  to find them, to move them around as a group, and to find them after moving them.  It hugely simplifies web development. 

Is this page a file or a directory?  Neither, it is a persistent object.  It has a name a title, and some content.  But it also has children.  The image directory is one of its children.  Using an object database leads to a huge conceptual simplification, and is really what people should be learning.   

And of course a file system only has files and directories.  An object database has all kins of different objects.  You have already seen HTML, CSS, Javascript, JSON, Pug, Chameleon, images and files.  Over time you will learn to love the rich library of objects that comprise the Forest Wiki.