Revert "More work on DatabaseInteraction"

This reverts commit b44d99865df1be295d19bb61492a69fa8d02f4c0.
Revert "Revert "More work on DatabaseInteraction""

This reverts commit fa0a27c25185ad5cce9001a74e5a8da5086a0e8e.