improved def getRealmForDbid(dbid)