Re: constraints in algebra instead of calculus

From: Brian Selzer <brian_at_selzer-software.com>
Date: Sun, 20 May 2007 11:33:03 -0400
Message-ID: <PSZ3i.3839$4Y.1291_at_newssvr19.news.prodigy.net>


"Marshall" <marshall.spight_at_gmail.com> wrote in message news:1179640804.697988.15890_at_e65g2000hsc.googlegroups.com...
> Okay, a while back we were talking about writing constraints
> in a language with aspects of the relational calculus, specifically
> the existential and universal quantifiers. The point was made
> that that's unnecessary; the calculus is no more expressive
> than the algebra.
>
> So it ought to be possible to write any constraint from the
> calculus in the algebra.
>
> Well, I'm having a hard time figuring out how to do it. Can
> anyone help?
>

First you need to normalize the calculus query and then apply several transformations recursively. Look at "Safety and Translation of Relational Calculus Queries" by Allen Van Gelder and Rodney W. Topor. Section 9 has a detailed explanation and some examples.

> How does one write a functional dependency in the algebra?
> A foreign key?
>

Look at "Horn Clauses and Database Dependencies" by Ronald Fagin. It describes such implicational dependencies using sentences in first-order logic.

>
> Marshall
>
Received on Sun May 20 2007 - 17:33:03 CEST

Original text of this message