<\body> database model> The database manipulation API has mainly been designed for internal use. It is based on adedicated -style database model, using a variant of . For the moment, we only support a limit number of entry types and field types, although new types can easily be added later. Currently, databases are used for managing remote files, bibliographies, user lists, versions, etc. The interface has been kept to be as simple as possible, so that our low level implementation can be most easily optimized for efficiently when needed. Furthermore, the routines of our basic API can all be customized to add specific features. For instance, the basic API is string-based, so aspecial additional layer was added to support snippets as values instead of strings. Similarly, an additional layer was added for managing the permissions of specific users. The advantage of this design based on customizations is that the routines in the basic API always keep the same semantics, no matter how many additional layers are added. A database is always a collection of database . Each entry consists of a and a list of . Each field consists of an , a list of , a and an . The creation and expirationd dates cannot be manipulated directly, but it is possible to specify an alternative time for database queries, which make it possible to easily recover any past state of the database. <\explain> <|explain> Execute with as the current database. Here should be an URL with extension . The database will be used by all routines of the database API called from within . <\explain> <|explain> Execute with as the current time. All database queries inside become relative to the time, which allows for the inspection of past states of the database. The parameter is an integer representing a UNIX time stamp, or . Any modifications of the database require to be specified as the current time. <\explain> <|explain> Whenever holds, a attribute will automatically be added to all newly created entries which do not already contain a field. For entries which circulate among several users, this allows you to determine when they were created for the first time. <\explain> <|explain> Whenever a new entry with fields is created inside , the list of fields is automatically added to , but only for attributes which were not already present in . <\explain> <|explain> For queries of the database inside , limit the number of returned values to . <\description> >A name (or key) for the entry, by which it can referred to. >Creation date stamp for the entry, as determined by . <\explain> <|explain> For the field with atrribute in the entry with identifier , set the values to . <\explain> <|explain> Get the list of values for the field with atrribute in the entry with identifier . <\explain> <|explain> Get the list of attributes for the entry with identifier . <\explain> <|explain> For the entry with identifier , set the list of fields to . <\explain> <|explain> Get the list of fields for the entry with identifier . <\explain> <|explain> Remove the entry with identifier . <\explain> <|explain> Create an identifier which does not yet exist in the database. <\explain> <|explain> Return the list of identifiers of entries which match a given query . The query is a list of constraints of the form . Each constraint is interpreted as ``the attribute of the entry is one of the values , >, ''. In addition to these constraints, extensions of the database API may implement additional kinds of constraints. Such constraints are always formed by taking a special keyword for . The basic API already implements one type of supplementary constraint of the form , where is an attribute and a boolean value. This kind of supplementary constraint is always satisfied and has the effect of ordering the output of the query on the attribute in ascending or descending order, depending on . <\explain> <|explain> Get the first value in or . <\explain> <|explain> Create a new entry in the current database with fields , and return the identifier of the newly created entry. <\explain> <|explain> Test whether there exists an entry with identifier .