Creating classes in the database