Revert "Revert "Database""

This reverts commit 462005fa16fcf1ad2c52db970209890a8599a12d.