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

From: Paul <paul_at_test.com>
Date: Thu, 03 Jun 2004 16:19:09 +0100
Message-ID: <ckHvc.10429$wI4.1251077_at_wards.force9.net>


x wrote:
> Relational databases and Prolog "databases" are different beasts.
> There are no integrity constraints in Prolog.

Integrity constraints are really just expressions of first-order predicate logic. Prolog stores expressions of predicate logic, so surely it can do them? I think the difference might be that Prolog doesn't distinguish between "data" and "constraints" in the way that relational databases do.

consider the statements:
1) Pete is 29 years old.
2) Everyone's age is under 60.

In a relational database the first would be data and the second a constraint. In Prolog would they both be data?

> Yes. I know first-order logic is "special". But there is a difference
> in interests. One may be interested in a particular field of work and
> will use any theories that might help. One may be interested in a
> particular theory and its applications.

Here's another refereence:
http://en.wikipedia.org/wiki/G%F6del's_completeness_theorem "in first-order predicate calculus every universally valid formula can be proved... A logical formula is called universally valid if it is true in every possible domain and with every possible interpretation, inside that domain, of non-constant symbols used in the formula."

>>> In databases we deal with facts, not with finite sets of axioms.
>> 
>> I'm saying these are the same thing. Each tuple is a logical 
>> proposition, a fact, which is an axiom in our database (our
>> "theory").

>
> I'm not sure about this.
 > I'm not sure a database is a theory.

I guess anything can be regarded as a theory in the right context. In terms of Godel's Completeness Theorem you have:

  1. first-order logic itself (corresponding to the DBMS)
  2. various theories we talk about using logic (corresponding to databases)
  3. various models of the theories (the real-world interpretations of the databases)
  4. is the meta-language, 2) is the syntax and 3) is the semantics. Godel's Completeness Theorem says: suppose you talk about a theory with first-order logic. Then if something is true in every possible semantics for that model, it is provable using syntax alone.

 > I'm not sure a database is a finite set of axioms.

Why not? A databases is just a finite set of tuples from which you derive other truths.

 > And the set of facts in a database can grow arbitrary large  > (theoretically speaking).

There's a big (though maybe subtle) difference between "infinite" and "unbounded but finite". Even though there is no theoretical limit to the size of a database, we do know that any given database is of finite size.

Paul. Received on Thu Jun 03 2004 - 17:19:09 CEST

Original text of this message