Databese global descriptor

Changes the database to a global descriptor allowing the database to be opened
only once and is kept open all the way down.