tag:blogger.com,1999:blog-2492664706785922439.post7528716645477083571..comments2015-07-14T14:04:56.455+02:00Comments on Complete Rewrite: The Relational Model Is Not LogicalJesper Larssonhttp://www.blogger.com/profile/05756120755805691277noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-2492664706785922439.post-45540464998467319862010-02-15T09:11:21.485+01:002010-02-15T09:11:21.485+01:00Sorry for not responding to comments lately. The r...Sorry for not responding to comments lately. The reason is, as you might guess from the lack of new post, that this blog has gotten left behind in my work as my company has moved off in new directions. But I hope to publish at least one post soon, to round things off.<br /><br />Another thing: there has been an enormous amount of comments on this blog lately, most of which were obvious spam, but since the commenting is moderated, I am not letting them trough. For some comments, however, it is difficult to determine if they are real comments or not. There has been a number of comments containing nonspecific praise that was obviously bot-generated. (The motive eludes me – there are usually no links in the comments.) Thus, it is possible that I have rejected or deleted some comments that were actually real comments and not spam, just because they looked a bit like these vaguely praising spam comments. If so, I apologize. I may disable commenting completely if spamming continues to accelerate.Jesper Larssonhttp://www.blogger.com/profile/05756120755805691277noreply@blogger.comtag:blogger.com,1999:blog-2492664706785922439.post-9775406579865940002010-01-05T01:42:57.623+01:002010-01-05T01:42:57.623+01:00Dear Jesper,
I stumbled upon your blog because I&...Dear Jesper,<br /><br />I stumbled upon your blog because I'm currently investigating how to efficiently find duplicate code in a large code base, and you have apparently written a PhD thesis on roughly that topic, which I have opened but not yet read, although it looks very readable.<br /><br />But the sentence you quote from Wikipedia: "The relational model for database management is a database model based on first-order predicate logic, first formulated and proposed in 1969 by Edgar Codd." happens to be one I wrote, so it's hard for me to resist commenting on this piece.<br /><br />I like your piece. It is well written and it reflects some ideas that are apparently shared by many. However, it also contains some remarks I feel are wrong.<br /><br />First, I agree with you that the connection between relational databases and logic doesn't seem to be as clear as it could be. Before I added that sentence, the Wikipedia article didn't actually explain the connection at all. But I did attempt to add such an explanation, and <br />you appear to have missed it.<br /><br />In logic, we distinguish between a set of logical formulas (e.g. formulas in first-order predicate logic over a finite set of predicate variables, each with a certain arity) and interpretations of such sets of formulas (e.g. stuctures to which the formulas can be applied). An interpretation is a model of a set of formulas if all of the formulas hold in that interpretation. In the relational model, database schemas are the signatures of predicate variables (relvars); constraints are first-order formulas of predicate logic over those variables; the possible database instances (i.e. valid contents of a database of a given schema with the given constraints) are exactly the finite models of these formulas. So the connection is quite a bit closer than you suggest. And constraints are logical formulas (but rules for their resolution, such as "ON DELETE CASCADE", are something else).<br /><br />Second, I feel you are glossing over a fundamental issue in database theory by following Date & al. in their blind denouncement of references. It is not inherently illogical to allow references such as "the person named Jesper Larsson" into our logic: we can extend logic to capture such references; Richard Montague did this in the 70s.<br /><br />Third, I don't understand your denouncement of relational algebra.<br /><br />Finally, I think that, like Date, you're too harsh on SQL. It really isn't so far from predicate logic as you suggest.<br /><br />There is more, but if you have more time, please focus on that followup you planned. I'm really looking forward to it.Reinier Posthttp://www.win.tue.nl/~rp/noreply@blogger.com