Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: In an RDBMS, what does "Data" mean?

Re: In an RDBMS, what does "Data" mean?

From: Laconic2 <laconic2_at_comcast.net>
Date: Tue, 8 Jun 2004 08:08:07 -0400
Message-ID: <brmdned_eIZNNljdRVn-vg@comcast.com>

"Paul" <paul_at_test.com> wrote in message
news:BEhxc.12368$NK4.1714909_at_stones.force9.net...

> For a fixed snapshot of a database I guess they don't add anything
> extra, since the tuples satisfy the constraints already. But if you
> think about a database evolving over time, they do add information. For
> example suppose you had a constraint "Age < 60" on some relation/column.
> Then you could ask the question: "Can I add a person aged 65 to my
> database?" Now in current DBMSs I think you'd do that by trying it and
> seeing if you get an error. (or maybe by querying the system tables).

Yes.

In particular, the optimizer can use information made available by the constraints in order to generate
additional correct strategies, ones that could not be guaranteed to be correct in the absence of such information.

In particular, entity integrity and referential integrity constraints can be used to "prove" that, in certain cases, "SELECT ALL" and "SELECT DISTINCT" will yield identical results. This can result in generating a faster strategy.

The information that a given snapshot happens to conform to a constraint could be made available by examining the snapshot, rather than examining the constraint, but the cost of obtaining that knowledge would be prohibitive.

So a constraint that is known to be valid can be used to advantage, even in the context of a snapshot. Received on Tue Jun 08 2004 - 07:08:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US