Revert "Revert "Database""

This reverts commit 5e2f420e235b205eaafe8a235971c30ec17374f5.