Coder Perfect

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

Problem

I periodically hear people complain about how SQL is bad and that it isn’t a decent language, but I seldom hear much about alternatives. So, are there any other useful languages for the same purpose (database access), and what makes them superior than SQL? Is there a database that supports this alternate language?

EDIT: I’m well-versed in SQL and frequently use it. I’m not opposed to it; I’m simply curious about any alternatives that could exist and why people prefer them.

I’m also not searching for new types of databases (such as the NoSQL movement), but rather new ways to access databases.

Asked by Brendan Long

Solution #1

I agree that SQL’s syntax is tough to deal with, both in terms of automatically producing it and parsing it, and that it is not the sort of language we would write today if we were building SQL for the demands we put on it today. 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. I suspect join syntax would be different, functions like GROUP CONCAT would have more regular syntax instead of 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

There are no SQL alternatives for communicating with relational databases (i.e. SQL as a protocol), but there are several SQL alternatives for creating applications. Frontends for interacting with relational databases have been created to implement these alternatives. The following are some examples of frontends:

Rather than replacing SQL with a single new query language, I believe the underlying pattern today is that we are designing language-specific frontends to hide SQL in our everyday programming languages, and using SQL as the protocol for communicating with relational databases.

Answered by Ken Bloom

Solution #2

Have a look at the following list.

The Hibernate Query Language is the most widely used. Hibernate’s advantage is that objects translate to relational databases quickly (almost automatically), and the developer doesn’t have to spend much time on database architecture. For additional information, visit the Hibernate website. Others, I’m sure, will add more interesting query languages…

Of course, there’s a lot of NoSQL stuff out there, but you’ve stated that you’re not interested in it.

Answered by Mike Cialowicz

Solution #3

SQL is a thirty-year-old database management system. The understanding of “which features make something a ‘good’ language and which features make it a ‘poor’ language” has progressed faster than SQL itself.

Furthermore, SQL does not fit to contemporary standards of “what it takes to be relational,” hence it isn’t a relational language to begin with.

Consider the chance that you are merely attempting to hear in the wrong locations (that is, the commercial DBMS industry exclusively).

In their “Third Manifesto,” Date&Darwen outline the characteristics that a modern data manipulation language must include, the most recent version of which can be found in their book “Databases, Types, and the Relational Model.”

If you mean “good” in the sense of “industrial-strength,” then no. Dataphor is probably the closest thing accessible.

Although the Rel project provides an implementation for the Tutorial D language described in “Databases, Types, and the Relational Model,” its primary objective is to be instructive.

My SIRA PRISE project provides a solution for “really relational” data management, although I hesitate to call it “a language implementation.”

Of course, you might look at non-relational data management, as others have suggested, but I regard non-relational data management as a multiple-decades-long technological backward. That is, it is not worth contemplating.

Oh, and a database management software system is called a “DataBase Management System,” or “DBMS” for short, rather than a “database.” A photograph is not the same as a camera, therefore if you’re talking about cameras and want to avoid any misunderstandings, you should use the term “cameras” instead of “photograph.”

Answered by Erwin Smout

Solution #4

Perhaps you’re thinking of C. Date and his colleagues’ criticisms of relational databases and SQL, claiming that the systems and language aren’t really relational and should be. I don’t see a significant issue here; as far as I can tell, you can have a 100 percent relational system if you wish by simply disciplining your SQL usage.

The lack of expressive capacity that SQL derives from its theoretical foundation, relational algebra, is something I keep stumbling across. One issue is the lack of support for domain ordering, which you’ll come into when working with data including dates, timestamps, and other identifiers. I once tried to do a reporting application entirely in plain SQL on a database full of timestamps and it just wasn’t feasible. Another is the lack of support for path traversal: most of my data look like directed graphs that I need to traverse paths in, and SQL can’t do it. (It lacks “transitive closure”. SQL-1999 can do it with “recursive subqueries” but I haven’t seen them in actual use yet. There are also various hacks to

I was recently directed to.QL, which appears to solve the transitive closure problem neatly, but I’m not sure if it can solve the problem with ordered domains.

Answered by reinierpost

Solution #5

Take a look at LINQ to SQL, for example…

I gave it a shot a few months ago and haven’t looked back….

Answered by thiag0

Post is based on https://stackoverflow.com/questions/2497227/what-are-good-alternatives-to-sql-the-language