The MongoDB OML (Object Management Layer) is a Facets package that allows you to persist, query, update and delete collections and hierarchies of Facets-based objects in an external MongoDB database using a very simple and straightforward Facets and Python based programming model. In fact, the model is basically the standard Facets model with a small number of new classes and facet types added.
In case you are not already familiar with it, MongoDB is one of the more popular examples of the new class of schema-less, document oriented databases that have sprung up over the last few years. Because these databases are not based on the relational model which has dominated the database landscape for the last several decades, this relatively new category of database is sometimes referred to as a No SQL database.
Because of its schema-less, document centric design, MongoDB is well suited for use as a persistent storage layer for object oriented applications. Combined with the metadata and change notification framework that Facets provides, the MongoDB OML provides a very simple and natural framework for implementing object oriented applications with a persistent object storage system.
There are many examples of using a relational database as the storage mechanism for object oriented applications. The software layer used to map objects to a relational database is often referred to as an ORM (Object Relational Mapping (or Model)). Because MongoDB is not based on the relational model, we have instead chosen to call the software layer an OML (Object Mapping Layer).
There are a wide variety of techniques for saving and restoring Python objects to external storage of some sort, some available as part of the core Python application, and some as separately installable packages. While we will not attempt to compare and contrast all of the available approaches, in this section we will present some of the more compelling reasons for using the MongoDB OML, and then let you make you own decision about which approach or package to use.
If this brief introduction to the MongoDB OML and its feature set have got you in the least bit interested, please continue on with some of the more in depth sections, starting with a complete, multi-tool, MongoDB-based application example.