database class design