Second revision of db models