I am working on a scenario. So we can have something more concrete to discuss. Below are some starting ideas. At the bottom of the page there are links for the group website.

  1. Semi-structured data is implemented with NoSQL DB (for now Neo4J.)
  2. Structured data is implemented in a Relational DB (PostgreSQL.)
  3. Any class is treated by the engine as semi-structured unless otherwise specified.
  4. If we can not come up with a definitive set of properties, then it is better to treated it like there is no structure.
  5. If later a set of properties is found to be sufficient, then we can hint the engine to migrate from NoSQL to RDB.
  6. The engine should be able to migrate from NoSQL to RDB and vice-versa.

Below there are a few snippets of code I think the engine should be able to handle transparently. This does not mean the syntaxe will be that.

This is a simple hierarchy that oftens get messy when mapped to the relational model.

Contact Informations Classes
This is another simple hierarchy that oftens get messy when mapped to the relational model. People Classes

Here Company has 6 properties. Employees, contact_information, services and products come with a business rules attached and they are also some sort of relation with other classes.

In this example, Maker is a Company, but it has no services. This is just a business rule for this example. But the engine should take care of that.

For Products, I am hinting the engine to keep this class in the RDB. However, :retail is a calculated property and should not be persisted as a value. But I would like to persist the method. Mapping Objects to Relational has this problem that we do not persist methods. But in Ruby I could change the method for one of my products and I could implement a different formula for its retail price. For example.

weird_product = Product.new

def weird_product.retail
	3 * @cost * @profit

Now I have one product with a different retail method that is not being saved in the RDB. Another solutions for this problem exist, but there are times that I would like to do the above and expect the data management engine to take care of it.

Group Website