Re: Is mysql a RDBMS ?
Date: Mon, 25 Aug 2003 05:22:09 GMT
Message-ID: <52h2b.18$G37.11_at_read3.inet.fi>
Hi!
"Bob Badour" <bbadour_at_golden.net> kirjoitti viestissä
news:glh2b.638$rG6.77308011_at_mantis.golden.net...
...
> > But if we define a 'relation' as a multiset, then the above is a
> 'relation'.
>
> If we call our ducks pigs, then our pigs will have wings and fly. But does
> that really mean pigs can fly?
>
> A relation is a set of tuples and not a multiset of rows.
Does anyone remember how Codd defined a 'relation' in his 1970 paper?
...
> > The DISTINCT operation can be quite costly in some cases.
>
> It can only have cost for projection and for union. In my experience,
I think most queries in real applications involve a projection. That is, you do not fetch all the columns of the table(s).
> DISTINCT often improves performance by allowing the dbms to ignore
potential
> duplicates that very often cannot even exist.
Can you show statistics about that?
> > Chris Date claims that the concept of a multiset is confusing
>
> It is worse than confusing. Consider the following table:
>
> A
> =
> 1
> 1
> 1
> 2
>
> When you observe the table variable above and decide you need to delete
> exactly one row where A = 1, how do you express the deletion in SQL?
In MySQL you write
DELETE FROM ... WHERE A = 1 LIMIT 1;
> >, and having
> > only mathematical relations in a database query language would allow for
> > more query optimization.
>
> It will allow for more optimization at less cost.
If you have evidence of this, you should publish it in an academic refereed journal. This is a claim of some Codd-12-relationists, but I do not recall seeing refereed papers published about this. Have you got any references?
...
> SQL seems to spend a lot of time generating meaningless duplicates that
are
> seldom used in any case.
No, it does not spend time. It does not really use any CPU time to retrieve ONLY the requested columns. But it would spend CPU time to sort the result set to eliminate possible duplicates.
Best regards,
Heikki Tuuri
Innobase Oy
http://www.innodb.com
Foreign keys, transactions, and row level locking for MySQL
InnoDB Hot Backup - a non-free hot backup tool for MySQL
Received on Mon Aug 25 2003 - 07:22:09 CEST