database class example