Added API calls for d3 graph
Changed SQL schema and added utils