updated database model