build temp database model