Re: How to normalize this?

From: <compdb_at_hotmail.com>
Date: Sat, 1 Jun 2013 16:01:58 -0700 (PDT)
Message-ID: <7fe2294e-645e-4048-af18-564ea7b1b10b_at_googlegroups.com>


On Thursday, May 30, 2013 3:02:16 PM UTC-7, Erwin wrote:

Erwin,

> Are EGD's in any way related to DKNF ?

DKNF says the only constraints on a table var are key constraints. Each key constraint will be an FD from key attributes to all others. Is there a reason you think of them as otherwise related?

> Are the individual conjuncts in an EGD required to be a rel(ation/var) of the schema ?
> Does the same apply to TGD's ?

They just have to have the forms Jan showed.

> If all and any individual conjuncts of a TGD are allowed to be just any arbitrary relational expression defined on the relvars,

Do you mean EGDs-plus-TGDs? Because neither class includes the other.

A closed expression is an EGD/TGD iff it can be rewritten in the corresponding form where the Rs are table vars.

So I don't know what you are getting at by suggesting a form like that with arbitrary expressions instead of the atoms. I have the impression you have some notion of "constraining an expression", eg declaring an FD on an expression. Jan addressed this in the message you are replying to. Whatever you've written to do this is a larger containing closed expression with relvar predicates as atoms and that's the one that either is or is not in the form of (ie is or is not) one of the above dependencies. Which can also be said to "constrain the database" or "constrain its mentioned table vars" but these phrases and yours are just usages of differently-defined versions of verb "constrain" all intended be used to describe requiring that the containing closed expression hold.

Eg constraining an expression involving multiple tables to satisfy an FD turns out when rearranged to a form above to be in general a non-FD EGD. That's why FDs get replaced by EGDS when we normalize while also keeping track of sufficient constraints on components. Which is what Hugo was asking about & Jan was answering. In the student-class-mentor case your FD-constrained expression in addition to the student-class and student-mentor FDs is the join of the two post-normalization table vars and the corresponding EGD is that their projections on student are equal.

> do you then think that TGD's are sufficient to express all and any possibly conceivable database constraint ?

Not every constraint can be rewritten to these forms, ie an EGD or TGD. So no.

Eg if you rewrite the above forms in prenex nomal form (all foralls and exists at the start quantifying over only ors on the right) you will see that they limit you to certain patterns. Expressions that normalize to other patterns will be by definition of disjunctive normal form not equivalent to those that normalize to those EGD/TGD patterns.

But regarding your meaning. The constraint of having (say) two FDs hold in a var is obviously not itself the same as having some one other FD that they don't imply hold. Ie the conjunction of a bunch of those dependencies expresses yet another class of constraints and expressions. So what do you mean when you say "sufficient to express"? Probably you mean, are conjunctions of them sufficient to express every database constraint. (We normally think of a database as being constrained by a conjunction of separately expressed conjuncts that we individually call constraints.) The answer is still no.

philip Received on Sun Jun 02 2013 - 01:01:58 CEST

Original text of this message