Revised database schema, added nodejs SQL queries for POSTs