HP3000-L Archives

January 2000, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Dr. Ferenc Nagy" <[log in to unmask]>
Reply To:
Dr. Ferenc Nagy
Date:
Tue, 25 Jan 2000 08:28:56 +0100
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (64 lines)
I hope that not I am the only person who knows both the [Turbo]Image and
the external database handling of the Turbo>PDC>Visual Prolog. For the the
people who are not in the {Image set} * {Prolog set},
its the time to take a look on the other way of database handling.
==================================================================
My goal is to simulate some services of the Image under Prolog.

1.) Maintaining the referential integrity as the Image has master and
detail data set. [You cannot enter data det("mkey1",...) in detail chain
if there is not a master term mas("mkey1",...). You cannot delete
mas("mkey1",...) from the master chain if a subordinate
det("mkey1",...) detail term exists.]

2.) Implement logging. My brief plan is the following: To write for each
external database changing predicate (db_x) the corresponding logged
predicate (l_db_x) which records the changes in a separate external log
database with date, time, workstatation name, program name, user name;
old_state, new_state. The external log database shall be an ordinary
Prolog external database. (As in the example of the database chapter of
Tutbo Prolg 2.0 users' guide.) The l_db_x predicates shall have one more
parameter: the db_selector of the logging database which must be opened
before the first l_db_open/l_db_create, and closed after the last
db_close. On the use side I have imagined the following structure

ifdef db_logging
        l_term_delete(Log_sel,Db_sel, ...Term),
elsedef
        term_delete(Db_sel,..,Term),
enddef

...
l_term_delete(Log_Sel,Db_sel,..,Term) :-
        term_delete(Dbsel,...,Term),
        Timestamp=....,
        chain_insertz(Log_sel,Timestamp,...,del,Term).

3.) I do not want to reinvent the wheel!

I started to work out a system but I had to put aside when I have run out
of time.

Main unsolved problem: How should I log the deletion of a whole chain?
a) With a single term in the log? This is unrecoverable.
b) Doing a cycle of logged term_delete?  This in slow.

Are you interested in this problem?
development of the logging?
Can you make me intere$ted to work out my preliminary trial$?

                                Kind regards

                                                       Frank

  |\    /~ ~~|~~~ Family : NAGY; first name : FERENC; title : Ph. D.
  | \   |    |    Institute of Isotope and Surface Chemistry
  |  \  |   -+-   H-1121 BUDAPEST Konkoly-Thege M. ut 29, (1525 Bp. POB 77)
  |   \ |    |    [log in to unmask]  (36-1)-395-9123 Fax: ~395-9002
  |    \|    |    http://alpha0.iki.kfki.hu/~nagyf/
`-'     '  `-'    Home: H-1102 BUDAPEST Holgy u. 48. I. 8. (36-1)-262-1198.
You need three virtues in the life:
1. strength - to change the things which are changeable,
2. patience - to endure the things which are unchangeable,
3. wisdom   - to distinguish the above two kinds of things.

ATOM RSS1 RSS2