added getRealmForDbid(dbid)