added file database.js

please call it into the main html file