databases and updated globalstate

completed db interface, sqlite db, mysql db, a driver. also modified
global state and season