<p>I know that DDL is most often used when talking about databases, but I see no reason why XML, PDF or even to some extent Prolog shouldn't belong to this category. It looks like branches of CS traditionally associated with studying languages wouldn't do very good job at analyzing DDLs. </p>

<p>Whichever approach to semantics you take, it doesn't seem to be meaningful, when applied to structured representation of data. </p>

<p>The notion of complexity is only so much relevant to data structures - it tries to answer the question of what would it mean to use a data structure for a particular task, but not the questions about the data structure itself.</p>

<p>Another reason for me to ponder this question is that based on my intuition, I can say things like "this data definition language seems to be better suited for the task", or "this data definition language seems to do a bad job when modelling the real-world situation", but I don't know where to look for the formalism which may support or debunk this intuition.</p>

<hr>

<p>The comments suggested that I rephrase the question. Of course quality is a very broad concept, but I'm not only interested in efficiency. Or, more precisely, I don't really know what does it mean for a DDL to be efficient.</p>

<p>I will make it furthermore concrete. I was tasked with improving a file format of an application for editing presentations. The current version of this format is an XML, which basically dumps the application state at the time the user requested to save the file, and that's it. There are multiple downsides of this approach, beside the entire format was created ad hoc, unsystematically etc.</p>

<p>I red the Grammar of Graphics by Wilkinson, and thought that it had many great ideas about how to generalize and conceptualize in conceptually similar field. I also red about Allen's interval calculus and some other literature on how to formalize time in language. But more then just a set of ideas, I need some sort of quality assurance. Something that would give me some sense of guarantee, that the tools available to the language do indeed meet the needs, and that they do it in an optimal way (or not, and if not, then how far off am I). Of course it might be too naive to expect to have a metric that would just produce a numerical answer, but anything that I could use in the same way one could use asymptotic analysis would be great.</p>

<hr>

<p>I did try to find an answer to the question myself. Here is the closest I think I found so far:</p>

<p><strong>Orthogonality</strong> principle, as stated by Wilkinson in Grammar of Graphics:</p>

<blockquote>
  <p>As much as possible everything should work everywhere and in every
  combination.</p>
</blockquote>

<p><strong>Hierarchy</strong> principle</p>

<blockquote>
  <p>Complicated tasks should be done by enlisting support of simpler
  helpers.</p>
</blockquote>

<p>While this sounds reasonable to me, I don't know how to approach the task of calculating these.</p>

<p>I also took courage to add one more principle:</p>

<p><strong>Comprehensiveness</strong>. The notation should observe the bounds imposed by physical abilities of the reader.</p>

<p>Beside these, I tried to approach the problem from linguistic perspective. There is, for example, a notion of a measure of entropy of a grammar (for example, if talking about Hausdorff dimensions and topological entropy). But this is both too advanced for me, and I don't think this is "a thing" about data definition languages.</p>

<p>I also tried to approach the problem from the perspective of expressiveness, for which purpose I've been reading Matthias Felleisen On The Expressive Power of Programming Languages, but I find the analogy too removed / difficult to apply, because this book models its notion of expressiveness on lambda calculus, which doesn't fit well with what I'm trying to understand.</p>

CC BY-SA 3.0
2014-09-06T17:41:06.790Z
What are you asking, precisely? The question in the title is too unspecified, and in any case is not research-level.
Andrej Bauer
CC BY-SA 3.0
2014-09-06T18:41:52.000Z
@AndrejBauer what part of the question was difficult? How do you know it's not a research level question if you just said you don't understand it? You also managed to put your question in a way I don't know how to respond to it, because it both contains a question and an automatic answer you gave to it yourself.
wvxvw
CC BY-SA 3.0
2014-09-06T20:13:24.593Z
Ok, to be more constructive: I think it would be better to rephrase the question as a reference request. State a specific problem (such as "how to analyze the efficiency of various data definition languages in practice") and see what references you get. The way the question is stated now just asks for people's opinions.
Andrej Bauer
CC BY-SA 3.0
2014-09-06T21:12:02.483Z
@AndrejBauer I rephrased the question and added a concrete example. Hope it helps.
wvxvw
CC BY-SA 3.0
2014-09-07T01:48:12.027Z
I did not read your question, but do we have to read both your original question and your revised question to answer it?
Tsuyoshi Ito
CC BY-SA 3.0
2014-09-07T05:28:23.577Z
@TsuyoshiIto come on, please, you are not on 4chan, show some culture ;)
wvxvw
CC BY-SA 3.0
2014-09-07T09:56:09.060Z
Because you missed the point of my question in the previous comment, let me more explicit.  I would suggest you _modify_ the question to make it clear instead of adding some text while keeping the unclear question as is.  You had posted an unclear question, and a commenter had asked what you were asking.  You then added some text which explained something, keeping the original unclear question intact.  That is not a good use of people's advice, and may drive some readers like me away.
Tsuyoshi Ito
CC BY-SA 3.0
2014-09-07T11:06:59.530Z
@TsuyoshiIto I would suggest you read the question before you comment. What makes you think I _missed_ your point? If the question isn't clear to you, you should've said so. You didn't give an advice, instead you made a self-flattering remark, which didn't contribute anything to discussion. If something isn't clear to you, and you were genuinely interested to clear that out, say just that. No need to pretend to speak on behalf of other people, who didn't select you to do so.
wvxvw
CC BY-SA 3.0
2014-09-07T11:53:51.597Z
I am not interested in discussion.  I am hoping that you will improve the question for the benefit of yourself, not because I think that the question is unclear.
Tsuyoshi Ito
CC BY-SA 3.0
2014-09-08T04:39:48.457Z
It seems to me that your question is a software engineering question rather than a theoretical computer science question. Please see [about] and [help/on-topic] to understand the scope of this site. There are other sites where your question might be more suitable like: [programmers.se], [cs.se], [so].
Kaveh
CC BY-SA 3.0
2014-09-08T04:42:53.253Z
Even if you post your question there it might not be well received because you are asking others to tell you what criteria you should use for deciding between options without clearly stating what are the options and what is your goal. Of you want to find references use Google scholar to find papers that discuss DDLs and check their citations and references.
Kaveh
CC BY-SA 3.0
2014-09-08T04:52:56.670Z
If you want to learn about subject classification in CS then check [ACM CCS](http://www.acm.org/about/class/ccs98-html).
Kaveh
CC BY-SA 3.0
2014-09-08T05:29:52.877Z
@Kaveh thank you, I've checked the link, but it tells me what I knew already, before asking this question. It lists DDLs under database management / languages. But what I'm after is a theory which describes how to rank both the languages and the programs written in these languages. The reason I search for one is because typically judgments about languages are based on speed and memory usage of an algorithm and whether it is possible to write one. But this doesn't seem relevant for DDLs.
wvxvw
CC BY-SA 3.0
2014-09-08T05:32:57.990Z
@Kaveh No, my question isn't a software engineering question _exactly_. Of course my final goal is to engineer a software, but I'm not asking for your help to engineer it. I'm asking for help at finding the metric that I can use to assess the result. I will add examples, of what I think could be the direction to the question.
wvxvw
CC BY-SA 3.0
2014-09-08T11:59:50.673Z
Sounds like a nice topic for a research paper.
ybakos
<pl.programming-languages><language-design>
How to analyze the quality of data definition language?
wvxvw
# How to analyze the quality of data definition language?

(Asked by: username_0 on 2014-09-06)

I know that DDL is most often used when talking about databases, but I see no reason why XML, PDF or even to some extent Prolog shouldn't belong to this category. It looks like branches of CS traditionally associated with studying languages wouldn't do very good job at analyzing DDLs.

Whichever approach to semantics you take, it doesn't seem to be meaningful, when applied to structured representation of data.

The notion of complexity is only so much relevant to data structures - it tries to answer the question of what would it mean to use a data structure for a particular task, but not the questions about the data structure itself.

Another reason for me to ponder this question is that based on my intuition, I can say things like "this data definition language seems to be better suited for the task", or "this data definition language seems to do a bad job when modelling the real-world situation", but I don't know where to look for the formalism which may support or debunk this intuition.

---

The comments suggested that I rephrase the question. Of course quality is a very broad concept, but I'm not only interested in efficiency. Or, more precisely, I don't really know what does it mean for a DDL to be efficient.

I will make it furthermore concrete. I was tasked with improving a file format of an application for editing presentations. The current version of this format is an XML, which basically dumps the application state at the time the user requested to save the file, and that's it. There are multiple downsides of this approach, beside the entire format was created ad hoc, unsystematically etc.

I red the Grammar of Graphics by Wilkinson, and thought that it had many great ideas about how to generalize and conceptualize in conceptually similar field. I also red about Allen's interval calculus and some other literature on how to formalize time in language. But more then just a set of ideas, I need some sort of quality assurance. Something that would give me some sense of guarantee, that the tools available to the language do indeed meet the needs, and that they do it in an optimal way (or not, and if not, then how far off am I). Of course it might be too naive to expect to have a metric that would just produce a numerical answer, but anything that I could use in the same way one could use asymptotic analysis would be great.

---

I did try to find an answer to the question myself. Here is the closest I think I found so far:

**Orthogonality** principle, as stated by Wilkinson in Grammar of Graphics:

> As much as possible everything should work everywhere and in every
> combination.

**Hierarchy** principle

> Complicated tasks should be done by enlisting support of simpler
> helpers.

While this sounds reasonable to me, I don't know how to approach the task of calculating these.

I also took courage to add one more principle:

**Comprehensiveness**. The notation should observe the bounds imposed by physical abilities of the reader.

Beside these, I tried to approach the problem from linguistic perspective. There is, for example, a notion of a measure of entropy of a grammar (for example, if talking about Hausdorff dimensions and topological entropy). But this is both too advanced for me, and I don't think this is "a thing" about data definition languages.

I also tried to approach the problem from the perspective of expressiveness, for which purpose I've been reading Matthias Felleisen On The Expressive Power of Programming Languages, but I find the analogy too removed / difficult to apply, because this book models its notion of expressiveness on lambda calculus, which doesn't fit well with what I'm trying to understand.

**Tags:** pl.programming-languages, language-design
> **Comments:**
> **username_1**: What are you asking, precisely? The question in the title is too unspecified, and in any case is not research-level.  
> **username_0**: @AndrejBauer what part of the question was difficult? How do you know it's not a research level question if you just said you don't understand it? You also managed to put your question in a way I don't know how to respond to it, because it both contains a question and an automatic answer you gave to it yourself.  
> **username_1**: Ok, to be more constructive: I think it would be better to rephrase the question as a reference request. State a specific problem (such as "how to analyze the efficiency of various data definition languages in practice") and see what references you get. The way the question is stated now just asks for people's opinions.  
> **username_0**: @AndrejBauer I rephrased the question and added a concrete example. Hope it helps.  
> **username_2**: I did not read your question, but do we have to read both your original question and your revised question to answer it?  
> **username_0**: @TsuyoshiIto come on, please, you are not on 4chan, show some culture ;)  
> **username_2**: Because you missed the point of my question in the previous comment, let me more explicit.  I would suggest you _modify_ the question to make it clear instead of adding some text while keeping the unclear question as is.  You had posted an unclear question, and a commenter had asked what you were asking.  You then added some text which explained something, keeping the original unclear question intact.  That is not a good use of people's advice, and may drive some readers like me away.  
> **username_0**: @TsuyoshiIto I would suggest you read the question before you comment. What makes you think I _missed_ your point? If the question isn't clear to you, you should've said so. You didn't give an advice, instead you made a self-flattering remark, which didn't contribute anything to discussion. If something isn't clear to you, and you were genuinely interested to clear that out, say just that. No need to pretend to speak on behalf of other people, who didn't select you to do so.  
> **username_2**: I am not interested in discussion.  I am hoping that you will improve the question for the benefit of yourself, not because I think that the question is unclear.  
> **username_3**: It seems to me that your question is a software engineering question rather than a theoretical computer science question. Please see [about] and [help/on-topic] to understand the scope of this site. There are other sites where your question might be more suitable like: [programmers.se], [cs.se], [so].  
> **username_3**: Even if you post your question there it might not be well received because you are asking others to tell you what criteria you should use for deciding between options without clearly stating what are the options and what is your goal. Of you want to find references use Google scholar to find papers that discuss DDLs and check their citations and references.  
> **username_3**: If you want to learn about subject classification in CS then check [ACM CCS](http://www.acm.org/about/class/ccs98-html).  
> **username_0**: @Kaveh thank you, I've checked the link, but it tells me what I knew already, before asking this question. It lists DDLs under database management / languages. But what I'm after is a theory which describes how to rank both the languages and the programs written in these languages. The reason I search for one is because typically judgments about languages are based on speed and memory usage of an algorithm and whether it is possible to write one. But this doesn't seem relevant for DDLs.  
> **username_0**: @Kaveh No, my question isn't a software engineering question _exactly_. Of course my final goal is to engineer a software, but I'm not asking for your help to engineer it. I'm asking for help at finding the metric that I can use to assess the result. I will add examples, of what I think could be the direction to the question.  
> **username_4**: Sounds like a nice topic for a research paper.  

---

## 0 answers

