Live data from Hacker News

Relational is more than SQL

fauna.com

1–10 of 177 posts

Re: Relational is more than SQL

#2
Nitpick, but relational does not mean joins, it means tables/rows of tuples. A "relational document database" which is the slogan of Fauna it seems is a contradiction in terms.

Re: Relational is more than SQL

#3
This is a very interesting way to promote a product, credit to the author (who is an industry veteran it seems).

I had no idea what Fauna was. I just clicked the link here because the title caught my eye (I work with databases quite a bit).

The opening paragraph immediately grabbed my attention - "My first deep dive into SQL was in 1987, just before I became the first technical person at Microsoft to work on SQL Server." - woah!

So I read this entire article, which is very well written and easy to read but mostly affirms what I already know.

And then I get to the final section where they promote Fauna - and so now I know about Fauna too.

Kudos to these folks, in my humble opinion, this is marketing done right.

Re: Relational is more than SQL

#4
Seems like a lot of what fauna does by storing documents isn’t really new, oracle, Postgres and others have provided this for a long time. I was really surprised by the performance of json queries [1], opens the doors to using Postgres as a client api cache, storing the payload in a table, and doing deserialization using (materialized) views.

Difference seems to be the approach to minimize number of calls from your application, get all require session data in one call, similar to what graphql is doing for api calls. They’re also using http as the protocol for database connectivity.

[1]: https://ako.github.io/blog/2023/08/25/json-transformations.h...

Re: Relational is more than SQL

#5
post #2

Nitpick, but relational does not mean joins, it means tables/rows of tuples. A "relational document database" which is the slogan of Fauna it seems is a contradiction in terms.

That’s technically correct, and I think the author would say he’s aware of that definition.

The article as I read it is trying to make a broader point, that there are underlying mathematical principles that inspired Codd’s relational model.

I’ve never had cause to explore it, but my understanding is that there’s nothing in those principles that require tables/rows of tuples.

One goal of the article seems to be to inspire a curiosity in knowledgeable readers: what happens if you build a document database that also supports the same mathematical principles that inspired the relational model?

Re: Relational is more than SQL

#6
post #5
post #2

Nitpick, but relational does not mean joins, it means tables/rows of tuples. A "relational document database" which is the slogan of Fauna it seems is a contradiction in terms.

That’s technically correct, and I think the author would say he’s aware of that definition. The article as I read it is trying to make a broader point, that there are underlying mathematical principles that inspired Codd’s relational model. I’ve never had cause to explore it, but my understanding is that there’s nothing in those principles that require tables/rows of tuples. One goal of the article seems to be to ins…

> there’s nothing in [Codd’s] principles that require tables/rows of tuples.

Have you read Codd’s Rules #1 and #2? Pretty clear on this point.

https://en.wikipedia.org/wiki/Codd%27s_12_rules

Technically the relational model uses the term relation to refer to an unordered set of tuples, where every tuple has a key (one or more elements) to uniquely identify it, and every tuple has the same number of items, of the same type. Tables are relations. So are the results of a query, which can include joins.

Re: Relational is more than SQL

#7
post #5
post #2

Nitpick, but relational does not mean joins, it means tables/rows of tuples. A "relational document database" which is the slogan of Fauna it seems is a contradiction in terms.

That’s technically correct, and I think the author would say he’s aware of that definition. The article as I read it is trying to make a broader point, that there are underlying mathematical principles that inspired Codd’s relational model. I’ve never had cause to explore it, but my understanding is that there’s nothing in those principles that require tables/rows of tuples. One goal of the article seems to be to ins…

A relation is by definition a set of tuples (informally called a table where the tuples are the rows).

Codds relational database model adds the further constraint that nested tables are not allowed (first normal form), instead representing relationships through foreign keys.

Codds motivation for disallowing nested tables is that it makes query languages much simpler. He develops relational algebra which is the foundation behind SQL, which is why SQL does not allow nested tables.

Document databases does not follow first normal form and allows nested structures, so they cannot be queried with relational algebra, since it doesnt have a way to “drill down” into nested structures.

It is unclear to me what “mathematical principles” remain if you remove the notion of relations from the relational model.

Re: Relational is more than SQL

#8
post #6
post #5

Earlier quoted context omitted.

That’s technically correct, and I think the author would say he’s aware of that definition. The article as I read it is trying to make a broader point, that there are underlying mathematical principles that inspired Codd’s relational model. I’ve never had cause to explore it, but my understanding is that there’s nothing in those principles that require tables/rows of tuples. One goal of the article seems to be to ins…

> there’s nothing in [Codd’s] principles that require tables/rows of tuples. Have you read Codd’s Rules #1 and #2? Pretty clear on this point. https://en.wikipedia.org/wiki/Codd%27s_12_rules Technically the relational model uses the term relation to refer to an unordered set of tuples, where every tuple has a key (one or more elements) to uniquely identify it, and every tuple has the same number of items, of the same…

> > there’s nothing in [Codd’s] principles that require tables/rows of tuples.

You're misquoting; is that intentional? The post you're replying to says the principles that inspired/predate Codd don't require tables/tuples. Thus, the details of Codd's relational model are irrelevant.

Re: Relational is more than SQL

#9
post #6

Earlier quoted context omitted.

> there’s nothing in [Codd’s] principles that require tables/rows of tuples. Have you read Codd’s Rules #1 and #2? Pretty clear on this point. https://en.wikipedia.org/wiki/Codd%27s_12_rules Technically the relational model uses the term relation to refer to an unordered set of tuples, where every tuple has a key (one or more elements) to uniquely identify it, and every tuple has the same number of items, of the same…

> > there’s nothing in [Codd’s] principles that require tables/rows of tuples. You're misquoting; is that intentional? The post you're replying to says the principles that inspired/predate Codd don't require tables/tuples. Thus, the details of Codd's relational model are irrelevant.

What principles are you talking about then?

Re: Relational is more than SQL

#10
> Most importantly, SQL databases made supporting highly consistent ACID transactions easy.

The default transaction isolation level for every major database is not ACID. Enabling the required serializability tends to make performance terrible, and so most don't.

Post reply on HN