Additional constructors for database model classes.
Add methods for checking validity.
Merge branch 'dbmodels' into develop