news.volyx.in

Against SQL (scattered-thoughts.net)

499 points by deafcalculus · 1903 days ago · 339 comments on HN

Article summary

The article argues that SQL is inexpressive, incompressible, and non-porous, which leads to complexity and hinders innovation in the database industry. The author claims that SQL's limitations, such as the lack of sum types and iteration, make it difficult to express certain computations. The article also discusses the importance of a shared universal data model and the need for a better implementation of the relational model. The author suggests that replacing SQL could unlock significant value and improve the industry.

Main themes

  • SQL limitations
  • database design
  • relational model
  • query language expressiveness
  • type systems
  • nullability
  • database innovation
  • alternative databases
  • query optimization
  • temporary tables
  • type inference

What commenters say

  • Some commenters argue that the article's examples of poor SQL are straw men and can be rewritten in a more readable and performant way.
  • Others suggest that SQL's limitations can be worked around using features like views and common table expressions.
  • There is disagreement over whether SQL's syntax for joins is sufficient or if it should be improved to automatically infer foreign key relationships.
  • Some commenters propose alternative approaches, such as using natural joins or creating temporary tables with inferred types.
  • The use of nulls in SQL is also debated, with some arguing that it would be better to have an Option<T> type to remove nulls.
  • Others point out that nullable columns can be seen as equivalent to Option<T> types, but with limitations.
  • The need for better type inference and more concise syntax for creating temporary tables is also discussed.
  • Some commenters share their experiences with alternative databases, such as ClickHouse, which has a Nullable<T> type.