1% BEGIN LICENSE BLOCK
2% Version: CMPL 1.1
3%
4% The contents of this file are subject to the Cisco-style Mozilla Public
5% License Version 1.1 (the "License"); you may not use this file except
6% in compliance with the License.  You may obtain a copy of the License
7% at www.eclipse-clp.org/license.
8% 
9% Software distributed under the License is distributed on an "AS IS"
10% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See
11% the License for the specific language governing rights and limitations
12% under the License. 
13% 
14% The Original Code is  The ECLiPSe Constraint Logic Programming System. 
15% The Initial Developer of the Original Code is  Cisco Systems, Inc. 
16% Portions created by the Initial Developer are
17% Copyright (C) 2006 Cisco Systems, Inc.  All Rights Reserved.
18% 
19% Contributor(s): 
20% 
21% END LICENSE BLOCK
22
23% File		: database-lst.tex
24% Date		: March 1992
25% Author	: Michael Dahmen (edit of automatic generated file)
26% Modified by	: Luis Hermosilla, August 1992
27% Project	: MegaLog-Sepia User Manual
28% Content	: predicates of module Relational Algebra
29
30\section{\eclipse DB}
31
32The following predicates are exported by the module {\bf db}.
33
34%\biponelinesection{\eclipse DB}
35
36\begin{description}
37\item[+Expression \hspace{1mm} ++$>$ \hspace{1mm} ?TupleList]{Set retrieval specified by an algebraic expression.}
38\index{$++>$/2}
39\item[+RelationName \hspace{1mm} $<$++ \hspace{1mm} +Expression]{Set insertion of an algebraic expression or a list of tuples.}
40\index{$<++$/2}
41\item[+RelationName \hspace{1mm} $<$$-$$-$ \hspace{1mm} +Expression]{Set deletion of an algebraic expression or a list of tuples.}
42\index{$<--$/2}
43\item[+RelationName1 \hspace{1mm} $<$@$>$ \hspace{1mm} +RelationName2]{Test for schema compatibility.}
44\index{$<@>$/2}
45\item[?RelationName \hspace{1mm} $<$$-$$>$ \hspace{1mm} ?Synonym]{Add, remove or query synonyms for relations.}
46\index{$<->$/2}
47\item[?RelationName \hspace{1mm} $<$=$>$ \hspace{1mm} ?SpecList)]{Create or remove a relation. Query relation format.}
48\index{$<=>$/2}
49\item[?RelationName isr +Expression]{Set evaluation of an algebraic expression and creation of a target relation.}
50\index{isr/2}
51\item[arity(+RelationName, ?Arity)]{Get the number of attributes in a relation.}
52\index{arity/2}
53\item[cardinality(+RelationName, ?Count)]{Get the number of tuples in a relation.}
54\index{cardinality/2}
55\item[del_tup(?TupleTerm)]{Tuple at a time retrieval with deletion. On backtracking the next tuple is retrieved and deleted.}
56\index{del_tup/1}
57\item[del_tup(+RelationName, ?Tuple)]{Tuple at a time retrieval with deletion. On backtracking the next tuple is retrieved and deleted.}
58\index{del_tup/2}
59\item[del_tup(+RelationName, ?Tuple, +Selection)]{Tuple at a time retrieval with deletion. On backtracking the next tuple is retrieved and deleted.}
60\index{del_tup/3}
61\item[helpdb]{Print a list of all relations to the standard output.}
62\index{helpdb/0}
63\item[helprel(+RelationName)]{Print some info on {\it RelationName} to the standard output.}
64\index{helprel/1}
65\item[ins_tup(+TupleTerm)]{Insert a tuple into a relation.}
66\index{ins_tup/1}
67\item[ins_tup(+RelationName, +Tuple)]{Insert a tuple into a relation.}
68\index{ins_tup/2}
69\item[+DBoperation ondb +DBhandle]{Apply {\it DBoperation} to the database specified by {\it DBhandle}.}
70\index{ondb/2}
71\item[printrel(+RelationName)]{Print some info on {\it RelationName} and the content of {\it RelationName} to the standard output.}
72\index{printrel/1}
73\item[rename_attributes(+RelationName, +NewAttributes)]{Change the attribute names of a relation.}
74\index{rename_attributes/2}
75\item[rename_relation(+OldName, +NewName)]{Change the name a of a relation.}
76\index{rename_relation/2}
77\item[retr_tup(?TupleTerm)]{Tuple at a time retrieval. On backtracking the next tuple is retrieved.}
78\index{retr_tup/1}
79\item[retr_tup(+RelationName, ?Tuple)]{Tuple at a time retrieval. On backtracking the next tuple is retrieved.}
80\index{retr_tup/2}
81\item[retr_tup(+RelationName, ?Tuple, +Selection)]{Tuple at a time retrieval. On backtracking the next tuple is retrieved.}
82\index{retr_tup/3}
83\end{description}
84