www.webOShelp.net

Get the latest on:webOS Developers' RSS FeedwebOS Facebook page webOS Twitter Feed

Home Getting Started with webOS webOS SQL Tutorial

webOS SQL Tutorial

webOS skill level: Beginner
Technologies covered: SQL
Prerequisite knowledge: None

Palm has recently revealed that the webOS Mojo toolkit will support the creation of local databases on the Pre (and future webOS devices) for storage of local data.  To make use of this feature, you will need to understand SQL, or Structured Query Language, the language used ubiquitously for interacting with all types of databases.  Using SQL, you can save, retrieve, update, and delete information on the Palm Pre—things that you probably want to do with your webOS application.

If you've never worked with SQL before, this is a good place to start:

https://www.w3schools.com/sql/sql_intro.asp

When you're ready to practice your SQL statement writing, go here:

https://www.w3schools.com/sql/sql_tryit.asp

That site covers all of the basics, as well as more advanced SQL concepts.  It approaches SQL development from the traditional client-server paradigm, in which your SQL statements are written in a server-side language that the client (in this case, the browser) never sees; the commands are processed by the server and only the results are sent to the client.

webOS is slightly different in that SQL statements will be written in client-side Javascript which will be embedded in the page along with the rest of your HTML code.  These statements will use API calls provided by the Mojo framework to process your statements and return your results.  However, for the purposes of getting up to speed on SQL for webOS development, all you really need to get out of the tutorial is how to use SQL commands to interact with a database.

If you want to dig a little (or a LOT) deeper, Palm has verified that webOS uses SQLite for its database support. While each database engine (e.g. mySQL, PostgreSQL, SQLite) supports standard SQL queries, each has its own quirks and unique ways of implementing various features.  Here is an FAQ that explains some of the quirks of SQLite:

https://www.sqlite.org/faq.html

If you can think of any other resources we might want to include on this page, please drop us a comment!

 

3 Comments

Feed
  1. So does this say I can only access SQLite through the HTML5 interface or can I load a complete SQLite file onto the phone? i.e. can I use SQLite as a datafile format like I can on other platforms?
  2. Thank you for posting here the website of w3schools. Many of my professor said that it is a good site when I want to study or find something.

Add Comment


    • >:o
    • :-[
    • :'(
    • :-(
    • :-D
    • :-*
    • :-)
    • :P
    • :\
    • 8-)
    • ;-)