What are good alternatives to SQL (the language)? [closed]

I certainly agree that SQL’s syntax is difficult to work with, both from the standpoint of automatically generating it, and from the standpoint of parsing it, and it’s not the style of language we would write today if we were designing SQL for the demands we place on it today. I don’t think we’d find so many varied keywords if we designed the language today, I suspect join syntax would be different, functions like GROUP_CONCAT would have more regular syntax rather than sticking more keywords in the middle of the parentheses to control its behavior… create your own laundry list of inconsistencies and redundancies in SQL that you’d like/expect to see smoothed out if we redesigned the language today.

There aren’t any alternatives to SQL for speaking to relational databases (i.e. SQL as a protocol), but there are many alternatives to writing SQL in your applications. These alternatives have been implemented in the form of frontends for working with relational databases. Some examples of a frontend include:

  • SchemeQL and CLSQL, which are probably the most flexible, owing to their Lisp heritage, but they also look like a lot more like SQL than other frontends.
  • LINQ (in .Net)
  • ScalaQL and ScalaQuery (in Scala)
  • SqlStatement, ActiveRecord and many others in Ruby,
  • HaskellDB
  • …the list goes on for many other languages.

I think that the underlying theme today is that rather than replace SQL with one new query language, we are instead creating language-specific frontends to hide the SQL in our regular every-day programming languages, and treating SQL as the protocol for talking to relational databases.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)