Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Extending my question. Was: The relational model and relational algebra - why did SQL become the industry standard?
"Paul" <pbrazier_at_cosmos-uk.co.uk> wrote in message
news:51d64140.0302170330.15d2a98f_at_posting.google.com...
> > > What's the interpretation given to a table with duplicate rows?
> So what is it based on? What is the interpretation?
"Partial" or "Weighted" predicates. Each predicate is weighted with a number, so that we could do some ariphmetics upon predicates.
For example, the fact:
Item
in the multiset model is telling to the end user that there is *at least* one milk container. In the set model, it tells to the end user that there is *exactly* one milk container.
> But isn't there a distinction between the abstract number itself and
> any given representation of it?
Consider a vector from linear algebra. Abstract vector. Then, according to your logic, you would insist on introducing a special domain for it, right? On the other hand, it's very convenient to dismember a vector into components and cosider vector operations as aggregate queries.
Representation is just a view of an abstract entity! A user should be allowed to freely transform one representation into another. That transformation should be explicit, i.e. defined in a declarative query language.
> OK suppose I have an employee "relation" which is a multiset.
> I have two employees called John Smith, in the same dept on the same
> salary.
> So my multi-relation contains two outwardly identical tuples:
> ("John Smith", 10, 20000)
> ("John Smith", 10, 20000)
>
> Now one of the John Smiths has a sex-change and becomes Jane Smith.
>
> How does the user update only one of the rows?
> Surely it's impossible because the two rows are only distinguished
> internally?
The fact
("John Smith", 10, 20000)
in multiset theory is not a complete predicate. Therefore, we can't just blindly modify it.
The <name, dept> is obviously a unique key. The question should be how do we impose constraints in the multiset theory.
> Can't multisets always be defined in terms of sets?
> So you could for example define a multiset [a,a,b,c,d,d,d]
> as the set {(a,1),(a,2),(b,3),(c,4),(d,5),(d,6),(d,7)}
> (where (x,y) denotes an ordered pair which you could define as the set
> {{x},{x,y}} if you wanted)
The biggest problem with (x,y)={{x},{x,y}} definition is that it's not associative:
<a,<b,c>> != <<a,b>,c>
Therefore, we can't consistently define ordered tuple with 3 components. This is why the above definition is just a toy that is never used in practice. Once again, Set Reduction doesn't work!
> or maybe {(a,2),(b,1),(c,1),(d,3)} would be better because it doesn't
> add extra information (sequential order). Which is really the same as
> adding the extra "count" column I guess.
In multiset theory we are studying why
{(a,1),(a,2),(b,3),(c,4),(d,5),(d,6),(d,7)}
and
{(a,2),(b,1),(c,1),(d,3)}
are equivalent. In the set theory, however, there is nothing special about these 2 representations.
> So multisets really just are syntactic shorthand. Now I suppose
> ultimately everything is syntactic shorthand for set theory :) but I'm
> not convinced that at the logical level the advantages of multisets
> outweigh the disadvantages. Quite possibly it might be different for
> the physical level though.
My problem is that I'm so frequently blurring distinction between logical and physical, that distinction of logical and physical levels is no longer a driving principle. It seems to be a price to pay for more poweful computation model. Could this model be reasonably "declarative" that is the question.
> Well this is straying off-topic I guess since databases are
> necessarily finite so a suitably large finite set of integers would
> suffice.
> But what if you wanted a multiset of even greater cardinality than the
> reals? e.g. the set of all subsets of the reals?
No, I rather meant that nonnegative integer set is so obviously algebraically nonclosed that it might ultimately show up. Cardinalities and powersets in the set theory -- "set of integer sets" -- are notoriously useless for anything more practical than measuring the length of Turing tape. Received on Mon Feb 17 2003 - 14:03:57 CST