himalia.net | community blogs

Thursday, March 15, 2007

SQL, the first successful DSL


There is a new wave around the software factories and the domain-specific languages now. However, we have tried specific languages from the very early beginning and along the whole software history: Server languages, Script Languages, Query Languages, etc.

 

From this point of view, I think that SQL (Structured Query Language) is the most successful DSL in the history.

 

Why SQL is a DSL?

Just because it's a language designed to solve a specific problem: "to define databases and retrieve information from it".

 

I think one of the most important things when you are trying to create a language to solve a specific problem is to target a well-defined problem. That is, it should be bounded, focalized and easy to communicate. 

 

Besides, two things could make it the most successful one: to have a lot of people wanting to solve the same problem, and to support a good extensible approach form the beginning.

 

Who need SQL?

Most of the last 30 years applications need databases. You may think in writing your own code each time, to avoid constrains involved in the SQL and the DBMS, but it would have no sense for most of us if you think in the costs.

 

Have it got an extensible approach when the model is not enough?

Well, yes and no. Many SQL statements were impossible in the beginning and remained in this state until a few years ago. The model had to be improved year by year.

 

This is a gold rule in the DSL approach that everyone should understand: you should improve your specific-language while you learn from your specific-problem. Or, what is the same, the language won't be perfect from the first time. The model is stable right now, 37 years after the first approach written by E. Codd.

 

I think we have learned a lot and new DSL's should take less time to get stable ;)

Labels: ,


Comments: Post a Comment
Links to this post:

Create a Link


<< Home