Integrate Many to many relationship with DB Controller.

Created protocol and factories to make mapping and builder work in
tandem and isolate the DB builder from the details of the different kind
of relationships.