Added namespace attribute to both backends. It allows to lookup db
namespace for relationship term
fixed the unit tests for transitive closure