API changes to Database Execution, Snapshotting and more

Focusing on vetting and testing the database interaction to make it more generic. Extend it to be used by the snapshot process.