added doc to database classes, moved database tests and added some tests

Signed-off-by: Alexander Book <redchrome@gmx.de>