News for hackers. Stuff that matters.
Re:Interactive SQLite Documentation: Experiment with Queries... by hellorashid on Wednesday March 06, 2024 @10:52PM (#39624882)
i love this kinda interactive documentation, its so great to be able to tinker as you learn. well done!
Re:Interactive SQLite Documentation: Experiment with Queries... by samatman on Thursday March 07, 2024 @12:21AM (#39625320)
I've looked through your documentation, and it appears you've forgotten to mention your membership in the SQLite consortium: https://www.sqlite.org/consortium.html

You are members, of course.

Right? You're not building a company on the back of a man's life's work without giving something back? Obviously not, how could you live with yourself?

Anyway, you should make it clear on the front page that you're a proud member of the SQLite consortium.

Or people might think you're mooching scumbags.

Re:Interactive SQLite Documentation: Experiment with Queries... by codetrotter on Thursday March 07, 2024 @01:23AM (#39625638)
> Anyone is free to copy, modify, publish, use, compile, sell, or distribute the original SQLite code, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

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

Re:Interactive SQLite Documentation: Experiment with Queries... by ncruces on Thursday March 07, 2024 @01:48AM (#39625795)
It's like to see this (taken from the front page) explained: “Backed by the creator of SQLite.”
Re:Interactive SQLite Documentation: Experiment with Queries... by dankebitte on Thursday March 07, 2024 @02:22AM (#39626125)
> Dr. Richard Hipp (the SQLite author) is one of our shareholders, and we have the right to use the SQLite name.

https://news.ycombinator.com/item?id=35251099

Re:Interactive SQLite Documentation: Experiment with Queries... by ncruces on Thursday March 07, 2024 @03:06AM (#39626418)
It'd be great if that was visible on the site, beyond the single marketing sentence.

I mean, instead of being a credibility booster (which this is, actually), it immediately triggered my BS detector.

Re:Interactive SQLite Documentation: Experiment with Queries... by avinassh on Thursday March 07, 2024 @02:35AM (#39626203)
This is a great idea! On a related note, I love how nalgeon [0] has interactive blog posts [1] on SQLite release notes using WASM magic

[0] - https://news.ycombinator.com/user?id=nalgeon

[1] - https://antonz.org/sqlite-3-45/

Re:Interactive SQLite Documentation: Experiment with Queries... by james-bcn on Thursday March 07, 2024 @02:49AM (#39626320)
Nice. But with regards to the SQLite cloud, it annoys the hell out of me that so many of this type of site hide their pricing. It makes no sense to me at all. It just puts me off signing up to test services if I don't know the pricing.
Re:Interactive SQLite Documentation: Experiment with Queries... by Ringz on Thursday March 07, 2024 @03:22AM (#39626528)
Maybe the result of some short sighted AB testing. I hate that to but I have to admit that I tend to close the tab as fast as possible seeing some prices that don’t correlate with the „amount of benefits“ at that concrete moment. So they try to bind you as long as possible to raise that amount through the „good price“ threshold.
Re:Interactive SQLite Documentation: Experiment with Queries... by sanitycheck on Thursday March 07, 2024 @06:08AM (#39627567)
Pricing information is the first thing I look for, and if I don't find it I assume it's nowhere near reasonable and close the tab.

Back to the topic of the post, I like the idea and it's definitely a good addition to the standard sqlite docs which can be a little dry/dense in places. It'd be nice if we had some sort of inline DB-browser type view too so we could see what the commands we run actually did without resorting to writing select statements before and after the example. Also not sure why I have to click 'show' to see the command syntax.

Re:Interactive SQLite Documentation: Experiment with Queries... by rmbyrro on Thursday March 07, 2024 @07:11AM (#39628092)
Even harder to understand is if you need high concurrency, multi-node replication, pub/sub capabilities, etc, what is the point of using SQLite in the first place?

I love SQLite, but don't let love blind out technical decisions, folks.

There are much better, battle-tested tools to solve these problems.

Re:Interactive SQLite Documentation: Experiment with Queries... by kjksf on Thursday March 07, 2024 @08:01AM (#39628541)
Why Sqlite? They make a pretty good case here https://blog.sqlitecloud.io/how-and-why-we-brought-sqlite-to...

> if you need high concurrency, multi-node replication, pub/sub capabilities, etc, what is the point of using SQLite in the first place

SqliteCloud is capable of all those things, so what exactly is your complaint?

multi-node replication and pub/sub are not part of sqlite code but SqliteCloud additions and I see no reason why their implementation of replication or pub/sub should be any worse that other implementations

Sqlite used to be much worse at high concurrency that other databases but it's no longer the case in recent versions with additions of WAL mode and SqliteCloud claims additional perf improvements for high concurrency

> There are much better, battle-tested tools to solve these problems.

I meant, it's quite possible but I'll point out an obvious fabrication: you don't know.

You haven't actually tried SqliteCloud, you haven't benchmarked it against other tools so you just don't know.

I'm 97.8% sure of that.

Re:Interactive SQLite Documentation: Experiment with Queries... by infecto on Thursday March 07, 2024 @08:09AM (#39628611)
I don't think that article is a good case at all and with the lack of transparent pricing even harder to understand. We all care about efficiency but still not sure why I would use this over existing databases which are cheap to throw some more memory at. As you pointed out below I think CRDT is interesting. I would love to see some real-world comparisons to see how much their efficiency claims actually matter.
Re:Interactive SQLite Documentation: Experiment with Queries... by kjksf on Thursday March 07, 2024 @08:33AM (#39628841)
I don't like lack of pricing either. It would be a deal breaker for me as far as using their stuff. Maybe that's because they're in beta.

But the actual capabilities of their service - it just sounds like you didn't even care to learn what they offer because there's a lot to like.

First, it's a hosted SQLite. For those who know SQLite and not other databases is a reason enough to use it over hosted Postgres or hosted Mysql

They claim involvement of Richard Hipp, the creator of SQLite. That's as huge boost of credibility right there.

They have multi-node replication with Raft. That's not unique but also not something you get everywhere. Most hosted database services just give you a database on a single server.

They have Pub/Sub - that's even more rare than multi-node replication.

They have offline synch where you can sync your cloud db to a sqlite db on a mobile device. I believe that's both useful to many people and 100% unique to their service.

WebLite is also 100% unique and seems very useful to web frontends.

They claim they'll provide a way to run your code, compiled to wasm, on their servers. That would also be 100% unique to them.

They have SDKs for lots of languages.

So technologically that's very compelling and they have useful features not available anywhere else.

Re:Interactive SQLite Documentation: Experiment with Queries... by 7thaccount on Thursday March 07, 2024 @12:52PM (#39632160)
One of the founders pointed out at the top that pricing just hasn't been figured out yet
Re:Interactive SQLite Documentation: Experiment with Queries... by hobs on Thursday March 07, 2024 @08:24AM (#39628754)
The point is that choosing what appears to be wrong tool for the job and putting a bunch of engineering effort into it makes no sense unless you can demonstrate some special something that makes it all worth it.

Sqlite is very nice and frankly I love using it, but its data types, features, indexes, really everything is just a simplified version of all the of the more enterprise grade databases.

Heck, some of them are even free and open source, run in a container, and (as I said) have decades of bug fixes and solutions to difficult weird replication bugs and performance regressions from their various features they added.

Like with any new solution, its on the people presenting it to proffer why its better, and the marketing spin seems like you get a vendor specific extension to a thing that ties you to them forever, not so great for data that might live for decades!

Re:Interactive SQLite Documentation: Experiment with Queries... by kjksf on Thursday March 07, 2024 @08:47AM (#39628979)
If your job requires something that SQLite doesn't provide, then sure, that's the wrong tool for the job.

But SQLite is literally the most frequently used database in the world so it clearly is the right tool for a large number of jobs.

It's a very fast and very capable database and the reliability is unmatched (because it has been the most tested and because Richard Hipp wrote more tests than anyone else).

There's this persistent myth that SQLite is some rinky dinky toy for toddlers.

I repeat: it's very fast, very capable database, more than capable of addressing 97% of the needs of people who use sql databases.

What bothers me about this kinds of "SQLite is not the right tool" assertions is a complete lack of any supporting evidence.

Like, give me an example of something that you're doing where Postgres or MySqlite offers meaningful improvement over SQLite.

I'm not saying those cases do not exist, just that they are much rare that people tend to assert and you haven't provided a single example.

Pieter Levels runs highly profitable, highly trafficked website (Nomad List) on sqlite and he doesn't even write joins. And my point is that you vastly overestimate the need for super duper advanced functionality in databases. Lots of apps were written on top of early MySQL, which was a joke in terms of both capabilities and reliability. SQLite today is more capable and reliable that MySQL was for a long time.

Re:Interactive SQLite Documentation: Experiment with Queries... by claytongulick on Thursday March 07, 2024 @11:22AM (#39630924)
> Like, give me an example of something that you're doing where Postgres or MySqlite offers meaningful improvement over SQLite.

    alter table foo alter column bar type varchar(10); [1]
[1] https://www.sqlite.org/lang_altertable.html
Re:Interactive SQLite Documentation: Experiment with Queries... by hobs on Friday March 08, 2024 @06:30PM (#39647802)
I didn't underestimate anything really, I am supposedly an expert in the field.

I have used 100GB+ workloads on sqlite, its great, its useful, and its still extremely limited compared to the featuresets of other mutli-user relational databases.

Oh, and the "and he doesn't even use joins" doesn't really show that sqlite is great at anything, its materially more difficult for a query planner when joins come into play, its the normalization and deduplication benefits (which can play into performance benefits at certain scales) that make a join useful.

Re:Interactive SQLite Documentation: Experiment with Queries... by infecto on Thursday March 07, 2024 @07:47AM (#39628416)
At that point why not use something like Postgres?
Re:Interactive SQLite Documentation: Experiment with Queries... by kjksf on Thursday March 07, 2024 @08:11AM (#39628626)
When it comes to services like that, the underlying db engine is the least interesting aspect.

I haven't used SqliteCloud so I can't vouch for them but they make a pretty good case for their technology: https://blog.sqlitecloud.io/how-and-why-we-brought-sqlite-to...

Pub/Sub is, I believe, a rare functionality with hosted sql databases so if you need that, SqliteCloud is one of few places to get it.

They claim they have a unique feature: ability to sync the database to mobile device with CRDT. So you can have a hosted database updated from your backend and have it synced for fast offline access in a mobile app. That, I believe, is something no one else offers.

Weblite is also unique to their platform https://docs.sqlitecloud.io/docs/introduction/weblite

And in general, if you're familiar with SQLite, having option to have it hosted by SqliteCloud is better than using e.g. hosted Postgres and having to learn Postgres

Re:Interactive SQLite Documentation: Experiment with Queries... by infecto on Thursday March 07, 2024 @08:13AM (#39628646)
That is fair. The CRDT offline sync is interesting.
Re:Interactive SQLite Documentation: Experiment with Queries... by hobs on Thursday March 07, 2024 @08:28AM (#39628791)
The difference is you are choosing between "learning postgres and have that tool your entire life" and "learning some vendors proprietary extensions so you can stop using it when they shut down"

The only way the personal math makes sense to me is that "learning sqlite" is like half a day of work, "learning postgres" can be significantly more, but its like saying you should just use hammer in the cloud instead of learning how to use screwdriver and other useful tools.

Re:Interactive SQLite Documentation: Experiment with Queries... by okr on Thursday March 07, 2024 @07:58AM (#39628521)
If ya have sqlite locally, read-only, maybe everything in a single docker image, which you can deploy thousands of times...
Re:Interactive SQLite Documentation: Experiment with Queries... by infecto on Thursday March 07, 2024 @08:05AM (#39628581)
I did not really get the sense that was the purpose of this service? This service is SQLite behind an API.
Re:Interactive SQLite Documentation: Experiment with Queries... by infecto on Thursday March 07, 2024 @07:46AM (#39628406)
Wow you are not wrong. Maybe it works for them but I would guess they are losing a lot traffic but having no real visible pricing on their website. This is not an enterprise play, I would imagine they are most likely wanting to target developers and developers want to see pricing...especially for something as simple as a database.
Re:Interactive SQLite Documentation: Experiment with Queries... by marcobambini on Thursday March 07, 2024 @08:53AM (#39629061)
SQLite Cloud's founder here. Our service is still in beta. We'll announce pricing as soon as we're out of the beta phase. There is no marketing strategy at all here, we are just developing one step at a time.
Re:Interactive SQLite Documentation: Experiment with Queries... by james-bcn on Friday March 08, 2024 @02:45AM (#39638806)
Well you should make that clearer on the website. Perhaps put a pricing tab on the site and on that tab explain that you are in beta and the pricing isn't decided yet. Otherwise it just looks like you hiding the pricing, which annoys people, as you can see in this thread.
Re:Interactive SQLite Documentation: Experiment with Queries... by tiffanyh on Thursday March 07, 2024 @10:02AM (#39629926)
> Backed by the creator of SQLite.

Any more details on that?

Presumably this is Dr Hipp. How involved is he, what does that involvement mean?

Re:Interactive SQLite Documentation: Experiment with Queries... by marcobambini on Thursday March 07, 2024 @10:04AM (#39629939)
He is an investor in SQLite Cloud, Inc.
Re:Interactive SQLite Documentation: Experiment with Queries... by invernomut0 on Thursday March 07, 2024 @03:46AM (#39626674)
It seems interesting but I think I prefer to keep another tab with https://www.db-fiddle.com/ to experiment with the syntax.
Re:Interactive SQLite Documentation: Experiment with Queries... by marcobambini on Thursday March 07, 2024 @08:23AM (#39628739)
Hi all. SQLite Cloud's founder here. Our service is still in beta. We'll announce pricing as soon as we're out of the beta phase. There is no marketing strategy at all here, we are just developing one step at a time.
Re:Interactive SQLite Documentation: Experiment with Queries... by russfink on Thursday March 07, 2024 @11:12AM (#39630776)
What is the educational pricing plan? Is there something that is free for small databases that load/exec entirely in the browser?
Re:Interactive SQLite Documentation: Experiment with Queries... by carl_dr on Thursday March 07, 2024 @09:08AM (#39629219)
> Real-Time Query Execution: Write your SQL queries and see the results instantly. Whether you're retrieving data, performing joins, or modifying tables, the Interactive SQLite Console provides immediate feedback.

Types DELETE FROM table ... Oh

I presume you have a commit step or something?

Re:Interactive SQLite Documentation: Experiment with Queries... by emadda on Thursday March 07, 2024 @09:21AM (#39629383)
> Backed by the creator of SQLite.

Is this from the SQLite developers?

Re:Interactive SQLite Documentation: Experiment with Queries... by jpgvm on Thursday March 07, 2024 @11:19AM (#39630878)
Not exactly no. None of the core SQLite devs seem to have touched this.

They do however claim that Dr Hipp is an investor which if true certainly does lend a lot of credibility.

Re:Interactive SQLite Documentation: Experiment with Queries... by edublancas on Thursday March 07, 2024 @01:58PM (#39633163)
You can get this for pretty much any language by re-using Jupyter kernels; here's a Python example: https://hidden-truth-8699.ploomberapp.io/