This page provides details of how to integrate and configures LexAccess tool data into a pre-existing MySql database. This page can also be used as reference to use other database. Users may skip this page if they use the installation script to install their LexAccess tool with teh default HyperSonic database.
As an additional option, LexAccess Java provides users the option of using another database, such as MySql, to fit in user's need in their applications. In other words, LexAccess allows users to select other databases through JDBC. To use these database options, users need to set up appropriate variables in the configuration file, create two LexAccess related tables and load them into the database. This page uses MySql as an example to illustrate these steps:
Users may choose other databases for LexAccess only if all related tables are created and loaded with data in the database appropriately.
I. Setup MySql
MySql, provided by MySQL AB, is one of the most popular Open Source databases. The LexAccess tool Java uses the following versions of the MySql and it's JDBC driver:
If you have used and installed MySql, you may skip the preceding step.
Create a user account for LexAccess:
Create a database for LexAccess:
You might need your DBA to help you on setting up user account and database for lexAccess. However, there is a shell script provided with lexAccess package to ease this step.
Up to this point, users should have installed the MySql database, created a database in it called lexAccess2008, and opened an account with lexAccess as both username and password.
II. Create and load tables into MySql
There are 2 major tables to be created and loaded into MySql. Each of the tables below needs to be created and loaded. The directory for these data files is: $LA_DIR/data/tables/
|Table Name||Source File||Records|
Please Note that the source codes for loading and checking data into MySql are under $LA_DIR/loadDb/sources/gov/nih/nlm/nls/lexAccess/loadDb/MySql. Both
Users need to run LoadXXX for both 2 tables. The Java program LoadXXX will:
To load these tables, users need to:
This step is optional. Users may run CheckXXX (similar setup steps as above) to check and perform queries to table XXX to make sure all tables are created and loaded appropriately.
There are two scripts are provided to ease the processes of loading and checking data in the database:
At this point, all lexAccess data are loaded into created tables in the database.
III. Configure MySql in LexAccess
Location of configuration file:
Change the setup in the configuration file
There are two ways to setup the MySql database, as shown below:
Make sure the JDBC driver is included in classpath. For examples, edit file $LA_DIR/bin/lexAccess and modify (fill in) the value to JDBC
Now, the Lexical Tool are ready to run with MySql database
IV. Use different port number for MySql in LexAccess
The default port of MySql is 3306. In case that different port number (for example, 3307) is used in your MySql database, you will need to add the port number after the database host (localhost:3307).
|Contact us at: firstname.lastname@example.org||The Lexical Systems Group||Last Update:|