Hacker News new | ask | show | jobs
by simc 6218 days ago
SQL is popular because it was the query language that was available in the Oracle and IBM relational databases, which were the first relational database products to come to market. SQL subsequently became an ISO standard. Eventually all relational database vendors switched to SQL. Other DBMSs (Ingres, Informix, Postgres) originally used QUEL which was thought by many to be superior to SQL eventually switched as SQL became dominant/the standard. (Although QUEL can still be used with Ingres). There may be other reasons, but I think that in large part these are the reasons why SQL is dominant today.

Relational databases became popular because the declarative high level query language was less time consuming to write queries in than earlier non-relational database.

SQL is far from the perfect query language though. It's syntax is often bizarre and confounding, and has many non relational extensions (column ordering, duplicate tuples in a relation).

2 comments

Re: non relational extensions I believe it was Ted Codd who said "No real application runs in third normal form".

The relational model is great, and it's important to remember that the things that make it great are that it is simple, dynamic, easy to understand and helps ensure you get correct results. IMO the two most common mistakes people make are being overly worried about breaking the model where necessary, and conversely, not realizing the benefits of things like human readable keys.

This is the real answer to the question.