changed database to access it from other classes
changed dirtyread to peform a simulation of the dirtyread problem in sql