Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!ix.netcom.com!netcom.com!dcf
From: dcf@netcom.com (Don Ferguson)
Subject: Re: Looking for advice on using Prolog for a relational database.
Message-ID: <dcfD0EHpx.GD@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
X-Newsreader: TIN [version 1.2 PL1]
References: <1994Dec5.215606.15801@bnlux1.bnl.gov>
Date: Tue, 6 Dec 1994 17:53:57 GMT
Lines: 40

Sean R. McCorkle (mccorkle@bnlux1.bnl.gov) wrote:
: Hi folks.

:     I've been having fun with prolog for a few years, and would now like
: to implement a relational database using prolog (an equivalent to
: a updateble data table (or set of tables) in some SQL or xbase system).
: I'm looking for advice on how this can be done.  To be more specific: I'm 
: not sure what the best method is for storing the "tables".  Can this somehow
: be implemented as an ascii file of prolog facts?

: Is this a common prolog activity?  I'm having trouble locating pertinent
: information, so any advice would greatly be appreciated.

: Sincerely, and thanks in advance,
: Sean McCorkle

I did this in Quintus Prolog, using their TCP/IP package.  The data was
stored as dynamic facts.  Once a day, the database would be dumped to disk
as a "QOF" file (quintus object format), and the transaction log would be
erased.  Each transaction (assert/retract) was logged to an ascii file,
so data could be recovered in case of a crash.  The initial version of
the system was written in around 20 pages of code.

The database was called QDB3.  Maybe someone at Quintus can supply you the
code.  It worked remarkably well, considering what it was.  Some Quintus
customers  (e.g. H-P) had hundreds of concurrent users running against a
single QDB3 server.

	-Don Ferguson











