Revert "remove Database object from Model"

This reverts commit 6feb7f8d88b8bcfd45ed7fdf5ae47e39dd9a1a3e.