Hierarchies in the relational model
Date: 20 Oct 2003 05:34:42 -0700
Message-ID: <51d64140.0310200434.68c75a5f_at_posting.google.com>
The relational model is based on first-order logic. Sometimes you want to be able to express propositions of second-order logic. For example, "transitive closure" can't be expressed in first-order logic.
I know there are application-specific ways of encoding second-order concepts within first-order logic like the "nested set model" for hierarchies.
You've also got things like "dynamic SQL" that some DBMSs support.
But in our idealized DBMS we would like to be able to do this kind of thing in a more elegant way.
Is the answer to add a "transitive closure" operator to the model? Would this cover all possible requirements for second-order logic? Or would be be forever adding new operators to cover new situations? Is there a finite set of operators that would cover all possibilities?
In another thread it was mentioned writing applications in the relational model i.e. replacing procedural languages with a declarative one. But procedural languages can handle second-order logic. Things like the nested sets model require a procedural element to the language for things like updates.
Paul. Received on Mon Oct 20 2003 - 14:34:42 CEST
