defining the database classes