More work on the database classes.