# database: prolog and relational

Date: Thu, 03 Jun 2004 11:40:07 +0200

Message-ID: <40bef1ee$0$15375$e4fe514c_at_news.xs4all.nl>

Warning: crosspost

(I apologize if am crossposting wrongly, I've never done that before).

This seems like an appropriate time to call in help from another newsgroup.

To the people of comp.lang.prolog:

Could you please give some comment on this thread?
There don't seem to be many people

who know prolog in comp.database.theory

Maybe there are some people at c.l.prolog
who do know RDBMS.

Paul wrote:

* > x wrote:
** >
*

>> There are other differences. For example there are no candidate

* >> or foreign keys in Prolog.
** >
** >
** > Well candidate and foreign keys are really just special cases of
** > constraints which have been given an elevated status. Can't you say in
** > Prolog something like: "values in this column are unique" or
** > "values in this column must also be in this other column
** > in this other table"? (I'm not even sure if Prolog has
** > tables or columns but I guess it must have
** > something analogous)
** >
** >>> OK, I'm not that familiar with Prolog.
** >>
** >> If you are interested, you can start at:
** >> http://www.lim.univ-mrs.fr/~colmer/
** >> http://www-lp.doc.ic.ac.uk/UserPages/staff/rak/rak.html
** >
** > thanks, I'll check them out.
** >
** >>>> And first order logic is "incomplete" also
** >>>> because of the "in all models" stuff.
** >>>
** >>> I don't really understand what your problem is with this.
** >>>
** >>> Here's another statement of Godel's Completeness Theorem:
** >>> "If T is a set of axioms in a first-order language, and a
** >>> statement p holds for any structure M satisfying T, then
** >>> p can be formally deduced from T in some appropriately
** >>> defined fashion."
** >>>
** >>> They're using the word "structure" for "model" but the
** >>> same concept. Now surely this is just what you'd
** >>> intuitively expect?
** >>>
** >>> For example consider our theory T is group theory.
** >>> One structure that satisfies the group theory axioms
** >>> is that of abelian (commutative) groups. In this
** >>> structure every element commutes with
** >>> every other element. But this is not the case
** >>> for the general theory of groups. For something to be
** >>> a universal property of groups, it must be true for
** >>> *every* possible structure that satisfies the group
** >>> axioms. And the theorem says that then you can
** >>> *always* prove the property in the theory T
** >>> alone (i.e. without reference to any of the
** >>> structures based on the theory T).
** >>
** >>
** >> But I'm interested in properties of a particular structure S,
** >> not in the properties of some theory T that happen to describe
** >> some aspects of S.
** >
** > But first-order logic is "special" in some sense because
** > it is the very foundation of everything you do.
** > It's the theory T above, we're not interested in any
** > specific structure S, we just want to know that for
** > any S, first-order logic does enable us to talk
** > about S completely (in the sense defined above).
** > This is the very definition of what it means for
** > first-order logic to be complete. What the properties
** > of any particular structure S are is a totally different
** > question.
** >
** >>> I'm acutally wondering as well whether all this talk of
** >>> Godel is irrelevant anyway because in databases we are
** >>> only dealing with finite sets of axioms.
** >>> Possibly second order logic is complete
** >>> when you have a finite number of axioms?
** >>> I'll have to do a bit more Googling.
** >>
** >> 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").
** >
** >> Metamathematics deal with sets of axioms and theorems.
** >
** > Surely metamathematics is the language you use to talk
** > about and manipulate your axioms and
** > theorems: i.e. logic. Your axioms and theorems are the
** > mathematics itself.
** >
** >> Have you seen :
** >> http://www-csli.stanford.edu/hp/CVandNR.pdf
** >> http://www-csli.stanford.edu/hp/Reflections.pdf
** >
** > Yep, I've had a brief look. Seems quite philosophical rather
** > than mathematical, I'll hopefully get time to look at them in
** > more depth soon.
*

**TIA
**
Received on Thu Jun 03 2004 - 11:40:07 CEST