DZone
Web Dev Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Web Dev Zone > Guide: From WebSQL to IndexedDB

Guide: From WebSQL to IndexedDB

John Esposito user avatar by
John Esposito
·
Dec. 28, 11 · Web Dev Zone · Interview
Like (0)
Save
Tweet
4.24K Views

Join the DZone community and get the full member experience.

Join For Free

RDBMSers love their ACID and SQL, but the rapidly-growing world of in-browser databases can't afford, and usually doesn't need, that kind of pristine simplicity.

For web applications, even database-centered applications, performance and ease of use -- and, most of all, native comfort with JavaScript -- are far more important. Browsers are platforms, but still not whole machines. Scaling down a SQL-queryable database, as the old WebSQL standard did, is not the optimal solution.

IndexedDB is, says W3C; but because its intended audience is composed of web developers, not (chiefly) database developers, IndexedDB coding feels a lot more like DOM work than hard-core database development.

This tutorial from html5rocks.com is written to ease the database-to-webapp transition.

  • You'll see the WebSQL process first, for most basic CRUD-type processes -- most of the meat here is in the SQL itself.
  • Then you'll be see the IndexedDB equivalent, right below -- which will immediately look more familiar to the JavaScript (or other OO) developer, and incidentally perhaps a bit friendlier to the NoSQLer as well.


The top of the guide also provides a helpful side-by-side (columnar) comparison of WebSQL and IndexedDB, offering a more bird's-eye and standards-centric view than the code samples that make up the bulk of the article.

Definitely worth reading/bookmarking, if your web app needs to run a database in browser.

Database application dev Ease (programming language) sql JavaScript app Scaling (geometry)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • C++ Creator Bjarne Stroustrup Interview
  • SQL GROUP BY and Functional Dependencies: a Very Useful Feature
  • API Security Tools: What To Look For
  • SQL Database Schema: Beginner’s Guide (With Examples)

Comments

Web Dev Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo