title: How do I do an ajax call to a database using Javascript, a URL and a key
body: <p>I have been given a url of type <em>xxxx.xxxxx.com</em> as well as a key of type <em>FGHyehgvc787vbhj</em></p>
  
  <p>in order to gain read-only access to an sql database and retrieve data from it using javascript.</p>
  
  <p>I have no prior experience with databases and maybe my question will sound completely stupid but I was wondering how can I combine the above information in order to get access to the database (e.g. do an ajax call and retrieve data from it..)</p>
  
  <p>I'm familiar with doing ajax calls to a webpage and getting data from it using jQuery, as in :</p>
  
  <pre><code>$.ajax(/*url of website*/, function (data)
  {
     var dataRetrieved = $(data);
     // do something with the data retrieved...
  });
  </code></pre>
  
  <p>so I was wondering whether there is something equivalent to the above when it comes to making an ajax call to a database, using however a key.</p>
  
  <p>Thank you for any help, and please delete this post if you find it completely pointless and excuse me in advance for that by the way.</p>