Re: In an RDBMS, what does "Data" mean?
Date: Tue, 08 Jun 2004 12:44:55 +0100
Message-ID: <BEhxc.12368$NK4.1714909_at_stones.force9.net>
Tony wrote:
> Where did you get that axiom from that "data comes in tuples"? Codd's
> rule #1 says that all data in the database is to be REPRESENTED in
> only one way: as values in attributes of tuples.
Here's a thought: where do constraints fit in? They are kind of like data, since they give you some information about the real-world system you are modelling.
In databases we assume anything that isn't true is false (closed world assumption). So maybe constraints give a stronger form of truth that tuples in this sense: If I have no-one aged 65 in my tuples I could say: "the real-world system I'm (partially) modelling may have people aged 65, but my database doesn't". But If I have a constraint "age < 60" it's like I'm making a stronger claim: that not only does my database have no-one over 60, but also the real-world situation I'm modelling has no-one over 60.
Another question: do current systems use the constraints when optimising queries? Would it be feasible for them to do so? For example suppose I have a billion people in my table, with the constraint "Age < 60". If I do "SELECT * FROM people WHERE age = 65" the optimizer could in theory use the constraint to quickly return an answer.
You could also think of examples where an index wouldn't be feasible:
constraint: "name NOT LIKE '%x%'"
query: "SELECT * FROM people WHERE name LIKE '%axw%'
Paul. Received on Tue Jun 08 2004 - 13:44:55 CEST