How to use Google Visualization charts in JSF environment using SQL data

I am sure some people would have some ways of easily accessing SQL data using Javascript. Below is just another alternative of using Google Visualization with backend database if you are using JSF.