I'm fairly new to using REST to retrieve data from a database. I'm hoping to make a website which has an SQLite database on it. It seems Backbone.js will be a good fit for what I'm trying to do, and it says they interact well with a RESTful API to get data from a database. I read Understand Backbone.js REST calls to get a better understanding of how REST works.
I found this simple API https://github.com/alixaxel/ArrestDB to get data from an SQLite database.
What I am still not getting is how (if possible) to JOIN two tables.
For example, I have a Books table with BookID, Title and AuthorID, and an Authors table with AuthorID, First Name, Last Name, Age. AuthorID in the Books table is a foreign key to the Authors table.
If I use ArrestDB and go to http://api.mysite.com/books/ I'll get a JSON response of the books, and http://api.mysite.com/authors/ I'll get a JSON response from the Authors. How do I get all the books with the full information of their respective authors? This would be accomplished in SQL using a JOIN. Do I have to merge them manually in Javascript?