Revert "Revert "basic DB Connection class""

This reverts commit 0c00595d3aa69bbb332992b2fdaf2b6cf8767657.