OGSA-DAI contains a set of simple clients to create test datasets. To
use these clients you will need to get a driver for the database
and then set the CLASSPATH.
Section 3.2, “Data resource drivers” lists information about data resource products supported by OGSA-DAI and where to get associated database drivers.
You should get the database driver JARs for your data resource and put these in the following directory in the OGSA-DAI binary distribution:
OGSA-DAI/thirdparty/lib
To set the CLASSPATH in an OGSA-DAI
binary distribution:
If running under Solaris or Linux run:
$ source setenv.sh
If running under Windows run:
$ setenv.bat
The FAQ "Section C.1.21, “
What do I need in my CLASSPATH to be
able to run OGSA-DAI clients or compile OGSA-DAI client examples?
”" describes what is needed in
the CLASSPATH to run OGSA-DAI clients
if the above are not used.
OGSA-DAI provides a set of simple clients to create a test database
table called littleblackbook which
contains four columns:
id - unique ID (key) of type
INTEGER.
name - first and surname of
type VARCHAR(64).
address - address of
type VARCHAR(128).
phone telephone number of
type VARCHAR(20).
The number of entries in the table is user-selected. Entries are randomnly created.
Run the following from the command-line:
$ java uk.org.ogsadai.dbcreate.CreateTestDB2DB \ [-driverclass DRIVER-CLASS] \ Default: com.ibm.db2.jcc.DB2Driver [-host HOST-NAME] \ Default: localhost [-port PORT-NUMBER] \ Default: 50000 [-database DATABASE-NAME] \ Default: ogsadai [-username USER-NAME] \ Default: ogsadai [-password PASSWORD] \ Default: ogsadai [-tablename TABLE-NAME] \ Default: littleblackbook [-rows NUMBER-OF-ROWS] Default: 10000
Run the following from the command-line:
$ java uk.org.ogsadai.dbcreate.CreateTestMySQLDB \ [-driverclass DRIVER-CLASS] \ Default: org.gjt.mm.mysql.Driver [-host HOST-NAME] \ Default: localhost [-port PORT-NUMBER] \ Default: 3306 [-database DATABASE-NAME] \ Default: ogsadai [-username USER-NAME] \ Default: ogsadai [-password PASSWORD] \ Default: ogsadai [-tablename TABLE-NAME] \ Default: littleblackbook [-rows NUMBER-OF-ROWS] \ Default: 10000 [-rootusername ROOT-USER-NAME] \ Default: root [-rootpassword ROOT-PASSWORD] Default:
This client also attempts to create the database if one does not exist.
Run the following from the command-line:
$ java uk.org.ogsadai.dbcreate.CreateTestOracleDB \ [-driverclass DRIVER-CLASS] \ Default: oracle.jdbc.driver.OracleDriver [-host HOST-NAME] \ Default: localhost [-port PORT-NUMBER] \ Default: 1521 [-database DATABASE-NAME] \ Default: ogsadai [-username USER-NAME] \ Default: scott [-password PASSWORD] \ Default: tiger [-tablename TABLE-NAME] \ Default: littleblackbook [-rows NUMBER-OF-ROWS] Default: 10000
Run the following from the command-line:
$ java uk.org.ogsadai.dbcreate.CreateTestPostgreSQLDB \ [-driverclass DRIVER-CLASS] \ Default: org.postgresql.Driver [-host HOST-NAME] \ Default: localhost [-port PORT-NUMBER] \ Default: 5432 [-database DATABASE-NAME] \ Default: ogsadai [-username USER-NAME] \ Default: ogsadai [-password PASSWORD] \ Default: ogsadai [-tablename TABLE-NAME] \ Default: littleblackbook [-rows NUMBER-OF-ROWS] Default: 10000
Run the following from the command-line:
$ java uk.org.ogsadai.dbcreate.CreateTestSQLServerDB \ [-driverclass DRIVER-CLASS] \ Default: com.microsoft.jdbc.sqlserver.SQLServerDriver [-host HOST-NAME] \ Default: localhost [-port PORT-NUMBER] \ Default: 1433 [-database DATABASE-NAME] \ Default: ogsadai [-username USER-NAME] \ Default: ogsadai [-password PASSWORD] \ Default: ogsadai [-tablename TABLE-NAME] \ Default: littleblackbook [-rows NUMBER-OF-ROWS] Default: 10000
OGSA-DAI provides a simple client to create a test
collection called littleblackbook
which contains documents of the following format:
<entry id=ID> <name>NAME</name> <address>ADDRESS</address> <phone>PHONE</phone;> </entry>
The number of documents in the collection is user-selected. Entries are randomnly created.
Run the following from the command-line:
$ java uk.org.ogsadai.dbcreate.CreateTestExistDB \ [-driverclass DRIVER-CLASS] \ Default: org.exist.xmldb.DatabaseImpl [-host HOST-NAME] \ Default: localhost [-port PORT-NUMBER] \ Default: 8080 [-database DATABASE-NAME] \ Default: db [-username USER-NAME] \ Default: ogsadai [-password PASSWORD] \ Default: ogsadai [-collectionname COLLECTION-NAME] \ Default: littleblackbook [-documents NUMBER-OF-DOCS] Default: 10000