DZone
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
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Data Engineering
  3. Databases
  4. Guide: From WebSQL to IndexedDB

Guide: From WebSQL to IndexedDB

John Esposito user avatar by
John Esposito
·
Dec. 28, 11 · Interview
Like (0)
Save
Tweet
Share
4.40K 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

  • Microservices 101: Transactional Outbox and Inbox
  • Getting a Private SSL Certificate Free of Cost
  • Top 5 Data Streaming Trends for 2023
  • What Is Advertised Kafka Address?

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • 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: