Live data from Hacker News

D1: Our SQL database

blog.cloudflare.com

61–70 of 241 posts

Re: D1: Our SQL database

#61

Love the Northwind Traders reference! However, for a demo, I suggest a slightly larger and more complex data set, [data-generator-retail]( https://www.npmjs.com/package/data-generator-retail ). The demo is also a bit buggy: orders are duplicated as many times as there are products, but clicking on the various lines of the same order leads to the same record, where the user can only see the first product... I also thi…

I was thinking the same. The dataset is way too small.

Re: D1: Our SQL database

#62
post #37

I'm buying Cloudflare stocks right now. In 2-3 years from now, these services will be so mature and strong they will be crushing the cloud market. They're turning dreams into reality, one after another.

Cloud business is driven by enterprise generally. Would enterprise be using SQLite?

Re: D1: Our SQL database

#64

Earlier quoted context omitted.

D1 does not throw away consistency. It’s built on top of Durable Objects which is globally strongly consistent.

Interesting that D1 is built on top of Durable Objects. Does this mean that it would be practical for a single worker to access multiple D1 databases, so it could use, for example, a separate database for each tenant in a B2B SaaS application? Edit: And could each database be in a different primary region?

Yes, exactly!

Re: D1: Our SQL database

#65
post #48

All this recent hype around sqlite... sqlite is a great embedded database and thanks to use by browsers and on mobile the most used database in the world by orders of magnitude. But it also comes with lots of limitations. * there is no type safety, unless you run with the new strict mode, which comes with some significant drawbacks (eg limited to the handful of primitive types) * very narrow set of column types and o…

Has anyone tried to write a new modern SQLite?

DuckDB comes to mind, but I can't speak to its differences from SQLite.

https://duckdb.org/

Re: D1: Our SQL database

#66
post #60

Earlier quoted context omitted.

It sounds like you're making a simile but I don't understand it. The article did literally state D1 is based on sqlite.

The opening paragraph reads "Today, we're excited to announce D1, our first SQL database." read: first and well R2 and D2 would make for a great naming scheme.

Ah sorry I missed you saying d2 not D1.

Re: D1: Our SQL database

#67
post #37

I'm buying Cloudflare stocks right now. In 2-3 years from now, these services will be so mature and strong they will be crushing the cloud market. They're turning dreams into reality, one after another.

Cloud business is driven by enterprise generally. Would enterprise be using SQLite?

they should be using SQLite more often than they are.

Re: D1: Our SQL database

#68

Earlier quoted context omitted.

We are definitely interested in ORMs. Want to make it easy to use. I hope someone creates the next Rails using Workers. And having other models on top of our SQL offerings will be important. Get in contact and let us know what you'd like.

Will not any existing ORM that supports SQLite support D1? I looked in the post for details on how it extends SQLite (is the query language different or extended, semantics very different, etc.) but didn't notice anything.

I think the main issue will be with ORMs that are tightly coupled to a specific SQLite driver, such as Prisma.

Re: D1: Our SQL database

#69

First, I'm very excited. Sure, SQLite has some limitations compared to Postgres, esp. regarding the type system and concurrency. But we get ACID compliance and SQL. But it is really hard getting some useful information from this article. I can't even tell if it is not there or just buried in all this marketing hot air. So, what is it really? Is there one Write-Master that is asynchronously replicated to all other loc…

>So, what is it really? Is there one Write-Master that is asynchronously replicated to all other locations? Will writes be forwarded to this master and then replicated back?

Not a lot of detail, but that is mentioned:

"But we're going further. With D1, it will be possible to define a chunk of your Worker code that runs directly next to the database, giving you total control and maximum performance—each request first hits your Worker near your users, but depending on the operation, can hand off to another Worker deployed alongside a replica or your primary D1 instance to complete its work."

Re: D1: Our SQL database

#70

Earlier quoted context omitted.

Cloud business is driven by enterprise generally. Would enterprise be using SQLite?

they should be using SQLite more often than they are.

Why? What use cases are better with SQLite vs Postgres, MySQL, etc?
Post reply on HN