Hacker News new | ask | show | jobs
by SchizoDuckie 4082 days ago
I'm using WebSQL / Sqlite to store TV show data on the user's system. works like a charm, databases regularly grow to 10+mb, never had a problem with crashes, speed or anything like it. Plus, everything runs locally <3

Now I really hope that Spartan can implement WebSQL as well...

3 comments

I look forward to using SQLite again. In 2010ish I used it for an airport and aircraft database to be installed with our iOS app for 'find near you' feature. lookup performance was perfect. but did have some performance snags on application start, a server call retrieved any DB records needing to be updated. I found SQLite update statements were slow (10mb DB of 10,000 records, less than 100 updates took 30s on first gen iphones), so instead of retrieving the records that were changed, we modified it to retrieve the latest 3mb (compressed) of the 10mb DB from the server, decompress and replace the single file which turned out to be simpler, more atomic and required much less code.

I really enjoyed the simplicity of it all.

Actually, all you needed to do was wrap that batch update in a transaction; by default, SQLite autocommits and writes to disk after each update/insert, which is a bit slow.
Now I really hope that Spartan can implement WebSQL as well...

Sounds unlikely given that the standard was superseded by IndexedDB.

http://www.html5rocks.com/en/tutorials/webdatabase/websql-in...

Most browsers just use SQLite to back IndexedDB, though.

Which is kind of sad... I get the objections to "WebSQL" as it kind of lacked a standard to the support/syntax. But given that it was SQLite (v3 iirc) everywhere, it should have just specified SQLite v3's interface, and MS could have fallen into line with Firefox, Chrome and Safari.

IndexedDB is a better fit for no-sql style use in the browser, but sometimes you really need something closer to SQL.

That would have meant everyone would've been stuck with SQLite3's quirks forever. It may be good but it's not that good!
I used SQLite to store the entire last.fm user graph there, it was more than a gigabyte or so. MongoDB was abysmal, so I switched to SQLite, which was very, very fast, and I had zero problems with it. I have immense respect for it ever since.