Live data from Hacker News

Expressive Power of SQL (2003) [pdf]

homepages.inf.ed.ac.uk

1–10 of 20 posts

Re: Expressive Power of SQL (2003) [pdf]

#2
Interesting to note that neither BigQuery, nor Apache Presto (and therefore AWS Athena), support recursive CTEs.

However, most other DBs do (e.g. Postgres, MS SQL, MySQL 8.0, MariaDB 10.2, Oracle, etc.).

Which is disappointing, given how powerful BQ and Presto/Athena are for startups.

Re: Expressive Power of SQL (2003) [pdf]

#4

Interesting to note that neither BigQuery, nor Apache Presto (and therefore AWS Athena), support recursive CTEs. However, most other DBs do (e.g. Postgres, MS SQL, MySQL 8.0, MariaDB 10.2, Oracle, etc.). Which is disappointing, given how powerful BQ and Presto/Athena are for startups.

Be careful with CTEs with regard to performance, some SQL DBs can optimise by pushing predicates through to the inner queries, where for some (postgres being the one example that I know but there are probably others) a CTE presents an optimisation fence.

Re: Expressive Power of SQL (2003) [pdf]

#5

Isn't SQL Turing complete? So imo the question of "how expressive is SQL" is really just "how expressive can SQL be with reasonably useful performance".

From what I can understand (barely) The paper tries to determine if some of the new(2003) SQL3 extensions were really needed.

From the answers here https://stackoverflow.com/questions/900055/is-sql-or-even-ts...

It seems that SQL92 was not Turing complete but it became turing complete later on. Possibly by the same extensions added in SQL3.

Re: Expressive Power of SQL (2003) [pdf]

#6

Isn't SQL Turing complete? So imo the question of "how expressive is SQL" is really just "how expressive can SQL be with reasonably useful performance".

I don't think that vanilla SQL defined in older versions of the standard is actually Turing-complete. Most commercial releases included features that made it Turing complete, and my understanding is that the most recent standard includes enough from these features that it's now Turing-complete.

Re: Expressive Power of SQL (2003) [pdf]

#7

Isn't SQL Turing complete? So imo the question of "how expressive is SQL" is really just "how expressive can SQL be with reasonably useful performance".

That reminds me of some horrible datbase designs I've seen, where people too enamored with FSMs/petri nets etc. tried to put the "code" into tables

Re: Expressive Power of SQL (2003) [pdf]

#8

Interesting to note that neither BigQuery, nor Apache Presto (and therefore AWS Athena), support recursive CTEs. However, most other DBs do (e.g. Postgres, MS SQL, MySQL 8.0, MariaDB 10.2, Oracle, etc.). Which is disappointing, given how powerful BQ and Presto/Athena are for startups.

Just so you know, CTE means in this context Common Table Expression. This StackOverflow question [0] can explain a bit about it. Can be used as pseudo-views to clarify sql code.

[0] https://stackoverflow.com/questions/4740748/when-to-use-comm...

Re: Expressive Power of SQL (2003) [pdf]

#9

Interesting to note that neither BigQuery, nor Apache Presto (and therefore AWS Athena), support recursive CTEs. However, most other DBs do (e.g. Postgres, MS SQL, MySQL 8.0, MariaDB 10.2, Oracle, etc.). Which is disappointing, given how powerful BQ and Presto/Athena are for startups.

Be careful with CTEs with regard to performance, some SQL DBs can optimise by pushing predicates through to the inner queries, where for some (postgres being the one example that I know but there are probably others) a CTE presents an optimisation fence.

PostgreSQL being the one noteworthy: http://modern-sql.com/feature/with/performance

Re: Expressive Power of SQL (2003) [pdf]

#10

Interesting to note that neither BigQuery, nor Apache Presto (and therefore AWS Athena), support recursive CTEs. However, most other DBs do (e.g. Postgres, MS SQL, MySQL 8.0, MariaDB 10.2, Oracle, etc.). Which is disappointing, given how powerful BQ and Presto/Athena are for startups.

Not to forget SQLite: https://sqlite.org/lang_with.html
Post reply on HN