database communication js