Separation of database class