Changes between Initial Version and Version 1 of SilkRoute


Ignore:
Timestamp:
05/08/06 13:34:25 (12 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SilkRoute

    v1 v1  
     1SilkRoute II allows users to publish relational data as XML by providing an 
     2XQuery view of their data. SilkRoute is database independent, transforming 
     3XQueries over a Public View to one or more SQL Queries which can be executed on 
     4relational engines. 
     5 
     6There are three parts to a silkroute query. See the samples/ directory for 
     7examples of each. 
     8 
     9 1. The Canonical View (CV), which is a representation of the relational database schema in a terse format. The CV can be written by hand, or see the "tools/cvgen/" directory to translate SQL statements to the CV format. Currently the database connection information (ODBC DSN, username, and password) is also stored in the CV, but it can be overridden from the command line. 
     10 2. The Public View (PV), which is the Xquery format for the virtual XML document that maps the entire relational database. The PV references the CV with Canonical``View(). Again, the PV can be written by hand, or we provide the "PVGen" tool which allows RXQuery for complex mapping on large databases. See tools/pvgen/" for more information. 
     11 3. The User Query (UQ), which is actual XQuery to process. The UQ references the PV with Public``View().   
     12 
     13Currently, you must have the CV, PV, and UQ in the same directory or use absolute paths within the views.  Complete command line invocation is: 
     14 
     15`/path/to/silkroute myquery.uq` 
     16 
     17or, to override the DB: 
     18 
     19`/path/to/silkroute -db ODBC_DSN -u USERNAME -p PASSWORD myquery.uq` 
     20 
     21 
     22== CREATING ODBC DSN == 
     23 
     24If you haven't used ODBC before, you need to create a Data Source Name (DSN) 
     25for your database.  On Red Hat Enterprise Linux 4 the relevant rpms are: 
     26 
     27 * unixODBC        # ODBC package and PostgreSQL ODBC driver                        
     28 * MyODBC          # MySQL driver  
     29 * freetds         # Sybase/MS SQL Server (TDS protocol) driver                     
     30 
     31If you are using MyODBC or freetds, you need to edit /etc/odbcinst.ini 
     32and add or uncomment the configuration. Then, add a DSN with the following 
     33format to /etc/odbc.ini or ~/.odbc.ini : 
     34{{{ 
     35[my_dsn] 
     36Driver = PostgreSQL 
     37Description = my test database 
     38Server = 127.0.0.1 
     39Database = my_db_name 
     40}}} 
     41(Note that you must configure PostgreSQL to allow TCP/IP connections.) 
     42 
     43You can test your DSN with the "isql" tool included with unixODBC: 
     44 
     45`isql my_dsn myusername mypassword -v` 
     46 
     47 
     48 
     49== BUILDING SILKROUTE == 
     50 
     51Silk``Route has many dependencies, but the GODI tool makes it pretty easy. 
     52To prepare, on any RHEL4 machine do the following: 
     53{{{ 
     54up2date gcc-c++ pcre-devel unixODBC-devel 
     55adduser godi 
     56su - godi 
     57wget http://sig.biostr.washington.edu/~joshuadf/silkroute/silkroute-makefile.constants 
     58wget http://sig.biostr.washington.edu/~joshuadf/silkroute/galax-Makefile 
     59wget http://sig.biostr.washington.edu/~joshuadf/silkroute/godi-silkroute.sh 
     60chmod 755 godi-silkroute.sh 
     61}}} 
     62 
     63Then, go to http://www.galaxquery.org/Downloads/download-galax-0.5.0-source.html 
     64and fill out the silly form to download the galax source. Put the `galax-0.5.0.tar.gz` 
     65in `/home/godi/` as well, and run `./godi-silkroute.sh` until the build is complete 
     66(about an hour on a fast machine). You have to press ENTER near the beginning to  
     67verify you want to install GODI, but it's automatic after that.