4 #include <hashvector.h>
8 * A relation is an implementation of a tuple set with a primary key
9 * through a hashvector whose "type" defines the key. Additional
10 * hashvectors may be added to impose additional key restrictions and
11 * the final relation is the intersection of them all.
13 * The relation record itself holds the column schema whereas the
14 * indexes hold key schemas that in practice are copies of the column
15 * schema with some columns blanked out.
18 vector indexes; // one or more indexes over the tuple collection
23 * Create a relation of the given arity and tupleschema.
25 extern relation *relation_create(int arity,tupleschema *schema);
28 * Add a a key index to the relation by identifying the value part for
31 extern int relation_addindex(relation *r,tupleschema *ts);
35 * Add a tuple to a relation.
36 * \returns a vector of all knocked out tuples.
38 extern vector *relation_add(relation *r,tuple *t);