Created database js file. Moving database functionality to there
moved some functions to category_db.js