Changes on database.js

- Change window.prototype to Object.defineProperty