Category : Files from Magazines
Archive   : AIJUN87.ZIP
Filename : TOOL3.LTG

Output of file : TOOL3.LTG contained in archive : AIJUN87.ZIP


/* Suppose our meningitis data base has a collection of data stored */
/* under the patients' last name. As a small example, say we are */
/* storing last and first names, hospital name, and admission date. */
/* Normally, we'd have something like: */


/* To cut down search time and to keep the patients stored in order, */
/* we can record them in a B-tree called "patients." We use the */
/* predicate: recordb(Treename,Sortkey,Term). */


/* Now, we can search our B-tree. */
retrieveb(patients,X,Y). /* Returns a sorted list of all patients */
retrieveb(patients,wu,Y). /* Returns all the patients named 'wu' */

/* The 'removeb' predicate is used to delete entries from a B-tree. */

Note: This is an admittedly simple example. The intent is to show that
a good integration of data base facilities and PROLOG needn't add much
complication to the language. The predicates for manipulating data base
structures closely parallel standard PROLOG facilities for managing facts,
but yield a large increase in efficiency and flexibility.

  3 Responses to “Category : Files from Magazines
Archive   : AIJUN87.ZIP
Filename : TOOL3.LTG

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: