TrioPrototype Source Code |
This page contains information about the latest (as of February '09) open-source release of the Stanford Trio prototype. More information about the Trio project can be found on the Trio homepage.
This release contains the complete source code and binaries of the Trio prototype implementation as a Python-based, combined client-and-server architecture, as well as precompiled C-code library extensions for the PostgreSQL database system using PostgreSQL's Server Programming Interface (SPI). The Trio client can be used via a convenient browser interface (TrioExplorer), through a command-line interface (trioplus), using direct API calls when linked from another Python script, or running scripts as an external command-line call. This page also includes installation instructions and a brief documentation for these interfaces, describing the must important functionality and design decisions of the Trio prototype. The Trio source code is released under the BSD license.
We intend to continue maintaining this page with future extensions to the Trio prototype as the system keeps evolving and more and more features are implemented.
There is a fairly comprehensive installation manual for the TrioExplorer and trioplus user interfaces available here.
Jennifer's comprehensive TriQL manual is available here.
And an up-to-date list of the currently implemented subset of TriQL is available here.
Both the collections come shipped with the open-source package and can be run in both TrioExplorer and trioplus.
The TrioExplorer web browser interface is intended to be mostly self-explanatory. After installing and logging in, simply click on the 'Samples' tab, and you should be able to upload and execute the two example collections and some TriQL queries with just a few mouse clicks.
A brief online help for TrioExplorer and trioplus is available here.
Confidence Computation
Lineage Tracing
TrioCnx
This constructor method creates a new Trio connection from a given PyGreSQL connection pgdb, the default Python DB-API.
Returns a new TrioCursor object for the current connection.
Commits the current transaction.
Performs a rollback for the current transaction.
Closes the Trio connection (and the underlying pgdb connection).
TrioCursor
Executes a TriQL statement triql for this cursor object.
Fetches a single XTuple object from the current cursor position.
Fetches and returns a list of all XTuple objects beginning from the current cursor position.
XTuple
Returns the number of Alternative objects contained in this XTuple object.
Returns the Alternative object at the designated index idx.
Returns the confidence value (if any) of this XTuple object as the sum of its Alternative objects' confidence values.
Returns whether this XTuple object has a question mark or not.
Alternative
Returns a list of immediate lineage information as (source-table, source-aid) pairs of this alternative.
Performs a transitive lineage traversal for this alternative back to the base data.
Returns the confidence value (if any) of this alternative.
Computes the confidence value of this alternative based on the traceLineage() function.