Document Type

Technical Report

Publication Date

1987-06-01

Filename

WUCS-87-12.pdf

DOI:

10.7936/K70000DM

Technical Report Number

WUCS-87-12

Abstract

The following notes document in a succinct manner the use of the system PRODB. The system is still evolving and several new features are in the process of being added.

PRODB is a prototype system that is being used as an exploration vehicle of the possible extensions to the relational model through logic programming. The system consists of a relational database system having a relational algebra type language as a query language. It is written in Prolog and it extends the capabilities of Prolog predicates with the relational algebra operators for handling the database structure.

The database system currently provides the set theoretic operations (union, intersection, difference and product), join, project and select. The relations can be defined over any domain that can be defined using a Prolog predicate. Primary keys for the relations should be defined and their uniqueness is maintained.

Facilities exist for defining assertions over the contents of the relations. Those assertions are predicates that constrain the set of legal tuples that can be part of a relation. The consistency of the database is checked and maintained with respect to the set of assertions and domains.

Actions are daemons associated with the update operations and can be defined by the user as Prolog predicates that will be triggered by those operations. Actions can involve any Prolog (or PRODB) predicate and allow the definition of side effect behavior when an update operation is performed.

A transaction can be started and all the operations executed inside of it can be started and all the operations executed inside of it can be rolled-back to the point when the transaction was started. Time is associated with the creation of the relations and with the insertion of tuples in the form of a time-stamp. That time-stamp is shown in the printouts of schemas and, by using the appropriate predicate, also in the printouts of relations. A predicate for selecting tuples according with their time of insertion is defined. There are several predefined comparison operators and predicates. The usual aggregate predicates are available including some handling time. A built-in help facility is available (see the Miscellaneous paragraph) and appropriate error messages are issues whenever an error condition is reached.

The system is capable of handling several databases at the same time and all the relational operations can take arguments from different databases. Also the referential integrity can be enforced across databases. Different scenarios can be developed in that way and, in conjunction with the transaction facility, the seed for an exploration capability is in place.

First the operation handling complete databases as objects are presented. Then, the relative level operations for handling tuples and the syntax of the implemented relational algebra operations for handing tuples and the syntax of the implemented relational algebra operators is introduced. After that, there is a brief discussion over how to define assertions and actions for the database. Finally the time related predicates, transaction facility and some miscellaneous predicates are described.

Comments

Permanent URL: http://dx.doi.org/10.7936/K70000DM

Share

COinS