![]() | |
![]() |
| | Thread Tools | Display Modes |
#21
| |||||
| |||||
|
|
That sentence applies not only to SQL tables but also to Codd's time-varying relations and Date and Darwen's relvars. Date defines a relvar's predicate as the conjunction of all of the constraints that apply to it, but I think he's wrong. |
|
The logical connective should be IFF rather than AND. The difference is subtle, and may at first glance appear problematic since IFF is true whenever none of its operands are true, but under the closed world assumption, the only atomic formulas that are ever represented in the database are those that are supposed to be true, so there is no harm in choosing IFF over AND. The main reason I think the connective should be IFF rather than AND involves deletes. While inserting a row effectively asserts that all of the atomic formulas represented by the row are true |
|
of the whether the logical connective is IFF or AND, |
|
the same can't be said for deletes. When the logical connective is IFF, deleting a row effectively denies that any (not all) of the atomic formulas represented by the row are true, but when the logical connective is AND, deleting a row effectively denies that all (not any) of the atomic formulas represented by the row are true, which can be even if only one isn't. |
|
If some but not all of the atomic formulas represented by a row were true, but a row can't be in the table unless they're all true, then where is that positive information to be stored? Without anywhere to store it, the database is inconsistent. |
#22
| |||
| |||
|
|
On Nov 26, 2:19 am, "Mr. Scott" <do_not_re... (AT) noone (DOT) com> wrote: .... |
|
The logical connective should be IFF rather than AND. The difference is subtle, and may at first glance appear problematic since IFF is true whenever none of its operands are true, but under the closed world assumption, the only atomic formulas that are ever represented in the database are those that are supposed to be true, so there is no harm in choosing IFF over AND. The main reason I think the connective should be IFF rather than AND involves deletes. While inserting a row effectively asserts that all of the atomic formulas represented by the row are true ... , regardless of the whether the logical connective is IFF or AND, ... |
#23
| |||
| |||
|
|
compdb (AT) hotmail (DOT) com wrote: On Nov 26, 2:19 am, "Mr. Scott" <do_not_re... (AT) noone (DOT) com> wrote: ... ... The logical connective should be IFF rather than AND. The difference is subtle, and may at first glance appear problematic since IFF is true whenever none of its operands are true, but under the closed world assumption, the only atomic formulas that are ever represented in the database are those that are supposed to be true, so there is no harm in choosing IFF over AND. The main reason I think the connective should be IFF rather than AND involves deletes. While inserting a row effectively asserts that all of the atomic formulas represented by the row are true ... , regardless of the whether the logical connective is IFF or AND, ... I believe IFF as well as AND can be expressed with NAND. So, what is the argument? |
|
The only thing I wonder about is why constraints must be truth-valued. I'd rather they were allowed to have relation values other than dee and dum. |
|
Seems the only way to allow defaults/mandatory tuples without introducing some other concept. |
#24
| |||
| |||
|
|
An example might help. In the typical table, CTRS {COURSE, TEACHER, ROOM, STUDENT}, each row states that a particular COURSE is taught by a particular TEACHER in a particular ROOM to a particular STUDENT. Now, while it can be argued that there can't be a course without a teacher, or that there can't be a course without a student, or that there can't be a student without a teacher, the room exists independent of whether there is a course, or a teacher or a student. ... |
#25
| |||
| |||
|
|
But what if there is more than one row? The information content of a table is the logical sum (disjunction) of the information represented by each row. .... |
|
But those can easily be transformed into into truth-valued constraints, can't they? ... |
#26
| |||
| |||
|
|
Mr. Scott wrote: But what if there is more than one row? The information content of a table is the logical sum (disjunction) of the information represented by each row. The conventional view is that is that the information in a table is the logical conjunction of the information represented by the rows in the table. Just because the table is formed by a summing operation doesn't change that. |
|
But those can easily be transformed into into truth-valued constraints, can't they? Not easy if users aren't required to know default values. I don't see why they should. Contrary to Dr. Strangelove, the whole point of defaults is to avoid users having to know them! |
#27
| |||
| |||
|
|
Mr. Scott wrote: ... An example might help. In the typical table, CTRS {COURSE, TEACHER, ROOM, STUDENT}, each row states that a particular COURSE is taught by a particular TEACHER in a particular ROOM to a particular STUDENT. Now, while it can be argued that there can't be a course without a teacher, or that there can't be a course without a student, or that there can't be a student without a teacher, the room exists independent of whether there is a course, or a teacher or a student. ... That's a good example of mysticism. Unless an application requirement is given that rooms are independent in this way, |
|
one might just as easily conclude that CTRS is the only base relation in the db. |
|
In that case, the set of rooms must be a projection of CTRS. Without further information, I'd have no choice but to conclude that second choice. In my experience, the implementation of unstated requirements has been a huge unnecessary cost in many db's. |
#28
| |||
| |||
|
|
The relationship between the two "predicates" is as follows. The designer specifies the relvar predicate so that a user updating the database can observe the world and figure out whether a given tuple makes it true and so that a user looking at the database can find out what is true of the world. Next the designer figures out all the possible tuples that could ever turn up in a relation because of the way the world can be and then writes the total relvar constraint so the dbms can tell the user they made an error if they ever try to put some other tuple into the relation. |
|
possible tuples that could ever turn up in a relation because of the is wrong; I should have written: |
#29
| |||
| |||
|
|
I don't know what you mean by "the atomic formulas represented by a row". If one thinks of a relation's predicate as being an arbitrary wff (it's usually thought of as being in natural language, or as being wffs with natural language for ground terms) then the truth value of a particular constituent atomic formula when the overall predicate is true depends (like usual in predicate logic) on the connectives/ quantifiers. A row does not have a bunch of things ANDed together; the propositions above are ANDed together (or more simply, just asserted). After a delete a row it is no longer in the relation. So the database is asserting the negation of the proposition that you get by substituting its attribute values for attribute names in the proposition. If some but not all of the atomic formulas represented by a row were true, but a row can't be in the table unless they're all true, then where is that positive information to be stored? Without anywhere to store it, the database is inconsistent. Once again, a row does not in general assert the conjunction of wffs. If you think otherwise please explain very clearly, hopefully with a fully worked out simple example, because you won't be able to assume I know what you are talking about, because what you have written is not how the relational model works. From this message you should also be able to work that example out "correctly". philip |
#30
| ||||
| ||||
|
|
vldm10 wrote: Regarding DK/NF and 6NF you can see my solution atwww.dbdesign11.com. There I introduce “Simple Form” an effective solution which decomposes any relation to Binary Relations. Your approach seems very similar in general to NIAM and other fact-oriented modeling approaches like ORM2. They are built on "Elementary Form", which in ORM2 can include fact types that are ternary and higher (though these are always trivial to binarise, the higher-order fact types are useful in modeling because they reflect natural verbalisations). The main difference is that in fact orientation, the model is expected always to be *constructed* in elementary form. For efficiency of storage and access, uniqueness constraints allow automatic and invisible aggregation into non-elementary structures. This means you can model in elementary form, and get a correct and efficient schema which holds the same facts to use with your SQL DBMS. This is the implementation principle behind my "Constellation Query Language" as well. |
|
You use the term "attribute" a lot. In fact orientation, there are no attributes, they are just fact types that encompass a functional dependency between objects. To drop the notion of "attribute" is a major win for a number of reasons, including that it isn't a clearly-defined concept in natural usage; vis the conflict between relational and object-oriented aggregation; and also the fact that "attribute migration" is a major driver of schema evolution, hence project scope inflation and failure. |
|
In any case, before you go claiming your work as "novel", it'd be good if you did some reading on fact orientation and see whether others haven't been there before you, like, for example, more than twenty years ago ;-). This isn't a criticism actually; I haven't looked in sufficient depth at your work to decide whether you've done something new. But a lot of it does seem very familiar... Regarding time my solution is event oriented. I like this view - it accords with my thoughts on the quantization of time where the general principle that "time is just G*d's way of keeping everything from happening at once" ;-). Terry Halpin (creator of ORM2) has a recent article series on temporal modeling published at brcommunity.com, if you're interested. |
|
Clifford Heath, Data Constellation,http://dataconstellation.com Agile Information Management and Design. |
![]() |
| Thread Tools | |
| Display Modes | |
| |