Implemented simple database support.

Just implemented Database support, basic stuff at the moment.