Early version of database class