Setting the database object as static.
Fix a bug about database object.