tags:

views:

44

answers:

1

If I wanted to create my own relational database with a modern language to replace TSQL, what language would that be? Or if I end up creating my own language, what features would I have to include to make it better than TSQL ?

+1  A: 

Chris Date and (to a somewhat lesser extent) Hugh Darwen have spent >20 years trying to expose all the flaws, fallacies and mistakes of the SQL language.

All flaws and fallacies of the SQL language are also flaws and fallacies of any language that has the character combination "SQL" in its name, so it applies to TSQL too.

Hugh Darwen has also spent a signigicant effort trying to expose the flaws, fallacies and mistakes of the TSQL2 language (that is, the 1990's proposal for a new SQL standard that attempted to incorporate temporal features, also the proposal that eventually didn't make it to becoming a standard, and that is, nevertheless and despite all well-founded criticisms, still taken as the implementation basis for every implementation that calls itself "TSQL").

Read (no, I'l make that "study very very carefully") their writings and you'll have more "drawbacks" than you ever dreamed possible.

Study their most recent TTM book ("Databases, Types and the Relational Model") plus its forthcoming sequel (not yet published - alas) too, and you'll know everything that is foundational and prerequisite for the "true" next-generation database programming language.

You'll also have the answer to the following question that was asked in comment here : "Assume you can invent a new database from scratch, without worrying about standards. What language would you use?". Answer : D. Or, more precisely : a language that conforms to all the prescriptions/proscriptions for qualifying as a D.

Erwin Smout
+1 Erwin, for the references and background. I too agree with some of the shortcomings of SQL, but for all its effective or perceived inadequacies, SQL is also a very mature language, with very established implementations and tool providers, and a broad customer base. So let's be sure not to "throw the baby with the bath water"... In technology, the best systems are not always the most technically advanced, nor ones that score best in various dimensions, but the ones that hold a significant "market share".
mjv
Sorry, but "Marketocracy" is a very bad driver for progress. Why are the IBM's, Oracle's and Microsofts completely ignoring any relational research for a few decades already ? Because they are the ones who own the market share and are quite happy leaving it so. Because it is their guarantee of future cashflows just as long as they all agree to the status-quo. And the customers ? The customers have forgotten EVERYTHING about their force as a driving power in the market. The customers swallow everything the market owners spoonfeed them. Like the poor sods from George Orwell's "1984".
Erwin Smout