Can AJAX communicate with MySQL directly? For example, I just have a simple text box and with a trigger of a function it checks the database if the word is in there. If I wanted to use JSP, how will it be implemented? Can it be possible with jQuery? Or could I just create a JSON with all the words I have?
Thanks.
AJAX can communicate back to the web server. The web server can then communicate to the db. No direct connection between AJAX and the db. Exposing your db is probably a security risk anyway.
No, AJAX can't communicate with MySQL directly. You will always need a driver for MySQL. CouchDB can be accessed by HTTP, so with CouchDB it is possible! (CouchDB+Jquery=jqCouch)
AJAX runs clientside, and the code can be modified by any client that executes it. You should not have a direct connection to your database using AJAX, always put a server-side script in between to protect your database.
Even if it were technically possible, you should not be doing this.