modify database object definition with prototype
modifiy the inistialization of database classes, so that means in controller, we create the object and we close them proprely