database supports multi-thread access

introduces issue #27