Irreducible Complexity Entity Model

I am not sure that the name Irreducible Complexity Entity Model actually fits what I am about to describe, but it was the best name I could think of:

Lets think of an EntityModel (DatabaseModel??, RelationalModel?) that has at least one instance of each kind of entity relationship, so that it becomes representative of pretty much anything that can happen at any database:

So we would have:

But then, lets remember that there are recursive relationships so the list now is:

So now we have:

But then we realize that is not representative of all cases, because there is another kind of relationship, one that is “complex” (formed by 2 of the “simple” ones described before: Many To Many) so:

And now we have:


Now, with at this point one would think that we have a representative case for each “conceptual” kind of entity relationship. Right? After all ObjectRelationalMappers? offer a way to map relationships for their ObjectOriented counterparts, and the only kinds of relationships that are supported by them when going from the database to the object model are: OneToOne, OneToMany? and ManyToMany?.

Well, it turns out that if we leave the relational world enter object orientation, then "Inheritance" enters the game, so I guess this IrreducibleComplexityEntityModel has to include "InheritsFrom?" as a relationship type (note that InheritsFrom? is the only kind of relationship that can not be used in "reflective" way):

And so we get:

But, then we realize there is another case, what if the relation is not to a concrete but to an abstract class?

And then (finally?) we realize that this "Concrete/Abstract" separation also applies to the Composition relationships:


Mmmm, now I realize that if its hard to find a Relational FunctionallyCompleteCrudGenerator it is event harder to find an ObjectOriented FunctionallyCompleteCrudGenerator, the IrreducibleComplexityEntityModel gets really complex and it is easy to oversee a particular combination of the kinds of relationships (Event now I wonder if I am missing a particular combination/ relationship kind).


EditText of this page (last edited November 12, 2014) or FindPage with title or text search