Refactor to use knowledge's DBSession and Entity.by_name
Ignore dbs