Hyppocampus manages more interrogation modes, so to soddisfy all possible requests to access the database.
The general purpose is to avoid situations in which more files have to be modified/tested with a syscall singularly, in lot of conditions a single query involving all those files can be used instead. When possible (when is not required an explicit information about the target item, as for stat(2) ), most of syscall act is the same way if the identifier of an item or a SQL query is provided, simply the operation will be performed on that item or on the list of items in the result set.
- To request a single item, the only way is to provide its numeric unique identifier (expressed into a string to submit to the syscalls), as assigned from Hyppocampus in the time of the creation of the item itself. Actually is not possible to refer an item with its name, just because more items can have the same name (and also the same "path", intended in its traditional meaning): name and paths are metadata as every other, and more objects can have the same value assigned to those metadata.
- VIEWs are, in Hyppocampus, handled as folders in traditional filesystem. In fact, them are only shortcuts for effective queries, which are folders themself. Them have a unique identifier to use to change parameters to the, say so, folder (chmod(2), chown(2)...) and to use to look up their contents.
Actually is not possible refer to a VIEW with the name provided in creation time, but is a work-in-progress feature.
- When a path including a slash ('/') is submitted via opendir, an implicit query is performed, looking for files having that path as META_PATH. This is a special metadata having no objective sense in the Hyppocampus perspective, but have been defined for backward compatibility and to mitigate the impact of the new organization of items.
- Queries are the "folders" of Hyppocampus, and each of them include the files matching the request for metadata and assigned values.
For details about the format of queries read The relational model ; briefly, we can say a query is a request for a set of items for which the values assigned to some particular metadata matches the given values. A query submitted to Hyppocampus always have to be started with the HYPPOCAMPUS_QUERY_STARTER sequence: this is to discrimate those particular interrogations from each other type of request.
The value of the metadata asked in the SELECT clause (this is true also for VIEWs) is assigned as the name of the returned file, and if more metadata are requested the values are separated by the MULTIPLE_VALUES_SEPARATOR sequence
- When a GROUP BY query is performed, a list of directories is returned. Actually the only way to access those directories is asking for them names (paying attention to the fact all the hierarchic structure is destroyed when the upper folder opened with the execution of the query is closed), but it conflicts with names of VIEWs and canonical paths requests; this type of interrogation will be changed in the near future.
Generally, it is highly well advised to use always the function provided into LibHyppo to get contents from an Hyppocampus mountpoint: that acts as an abstraction level and changes in the interrogation modes can be applied trasparently to the applications
Generated on Fri Aug 17 19:40:51 2007 for Hyppocampus by
1.5.3