tags:

views:

143

answers:

5

For most programming tasks, you've got quite the selection of languages to choose from, and good strong communities behind plenty of them. But when you need to work with a database, there's really only one viable choice these days: SQL. Sure, there are different companies with different implementations and dialects, but you're still looking things up with

SELECT columns
FROM table
JOIN other_table ON criteria
WHERE other_criteria

It wasn't always this way, though. As late as the early 90s, there was no single obvious way to interact with a database. But today, there is. And with the way computer languages tend to proliferate rather than converge, I find that a bit odd. What historical and technical factors led to SQL's almost complete dominance of the database access domain?

+1  A: 

Hi,

Edgar F Codd started the madness.

Enjoy!

Doug
+2  A: 

Here's a reference from the Codd Wikipedia article - some detail on how SQL 'won out'.

Committee on Innovations in Computing and Communications: Lessons from History: The Rise of Relational Databases.

martin clayton
+6  A: 

It's like this Winston Churchill quote:

Indeed, it has been said that democracy is the worst form of government except all those other forms that have been tried from time to time.

There were alternative database technologies before 1970 when the relational model was first proposed. There have been alternatives the whole time since then, and there are new alternatives today.

But of all the alternatives, no solution besides SQL provides as good a balance for:

  • Widespread standardization
  • Popular and long-lived products such as Oracle
  • Plays nicely with many application programming languages
  • Support for formal data modeling, strong data integrity, ACID transactions
Bill Karwin
+1  A: 

Codd and Churchill aside, SQL isn't a horribly bad language for defining and querying table-based datasets. As another general said, "It got there the firstest with the mostest."

Wyatt Barnett
A: 

One factor is that data persists. It is a lot harder to replace/migrate a company's data than its applications. Applications can come and go, coded in the latest 'flavor of the month' language, but the database platform lives on. This is a bit like a QWERTY effect. While the QWERTY keyboard layout is known to be inefficient, it persists because there would a massive cost in switching to anything else.

Secondly, there is massive market domination by Oracle and IBM (and more recently Microsoft). While they might not agree on every detail, neither has seen a benefit to a non-SQL interface to their databases. I used Ingres back in the early 90s when its QUEL was being pushed out by SQL.

Thirdly, there's a benefit to the application developers (especially the likes of SAP and Oracle) to have a standard(ish) platform to sit on.

I suppose the flip side to this question is why do we need/want so many different programming languages.

Gary