similar to goPDB, but while here practice more with sqlite3 and posix-threads