Chapter 1. Quick Start
Index:
HXTT Text (CSV) provides a type 4 JDBC driver for raw data, flat text, CSV file, TSV file, PSV file, UTF file with/without BOM(byte-order marker), fixed-length, and variable-length binary file. It supports JDBC1.2, JDBC2.0, JDBC3.0, and JDBC4.0. It supports Personal Java, JDK1.0.X, JDK1.1.X, JDK1.2.X, JDK1.3.X, JDK1.4.X, JDK1.5.X, and JDK1.6.X. It supports all transactions level of READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, and SERIALIZABLE. It supports JBuilder's Database Pilot, Oracle's JVM, JDeveloper 10G, Dreamweaver UltraDev, Dreamweaver ColdFusion, ObJectRelationalBridge, DBVisualizer, iSQL-Viewer, AquaDataStudio, Sunopsis, MySQL Migration Toolkit, Tomcat, vqServer, Hibernate, SQuirreL SQL Client, Crystal Reports, Jisql, and DbEdit Database Utilites for Eclipse Platform. It supports XOPEN SQLState, RMI, Jini, JNDI, and serialization. It supports { UNION | INTERSECT | EXCEPT | MINUS } [ ALL ] query , INNER JOIN, FULL JOIN, LEFT JOIN, RIGHT JOIN, NATURAL JOIN, CROSS JOIN, self join, GROUP_CONCAT, multiple-row VALUES table, PIVOT table, UNPIVOT table, and subquery which includes single-row subquery, multirow subquery, multiple-column subquery, inline views, and correlated subquery. The current version of the HXTT Text (CSV) packages are available here:
First, you need to download JDK1.6.X from www.javasoft.com if you use Text JDBC 4.0 package(Text_JDBC40.jar). You can download JDK 1.3.X, 1.4.X, JDK1.5.X, or JDK1.6.X if you use Text JDBC 3.0 package(Text_JDBC30.jar) . You can download JDK1.2.X too if you use Text JDBC 2.0 package(Text_JDBC20.jar). You can download JDK1.1.X too if you use Text JDBC 1.2 package(Text_JDBC12.jar).
Secondly, please add Text_JDBC30.jar, Text_JDBC20.jar or Text_JDBC12.jar to your Java class path, for instance, "SET CLASSPATH=c:\javalib\Text_JDBC20.jar;%classpath%". You can also use "java -classpath c:\javalib\Text_JDBC20.jar yourTextclass" to run your class. More information about classpath, please read the "Setting the Classpath" topic in file:///yourdriver|/jdk1.2/docs/tooldocs/tools.html . You can use "java -classpath c:\javalib\Text_JDBC20.jar yourTextclass" too.
Thirdly, you can use 'Class.forName("com.hxtt.sql.text.TextDriver").newInstance();' or Class.forName("com.hxtt.sql.text.TextDriver");' to load this driver.
Fourth, if you have used other JDBC driver, you only need to know the correct
URL format for DriverManager.getConnection(url,"",""); You
can find the Text URL format below. If you were a Java novice, please
read also other Java examples code in Text_JDBC30demo.zip, Text_JDBC20demo.zip
or Text_JDBC12demo.zip.
Text URL format:
Embedded: jdbc:text:[//]/[DatabasePath][?prop1=value1[;prop2=value2]] (You can omit that "//" characters sometimes) or jdbc:%csv:[//]/[DatabasePath][?prop1=value1[;prop2=value2]] (You can omit that "//" characters sometimes) The only difference for two kinds of url format is: with jdbc:csv prefix, the default table type for CREATE TABLE is CSV. For example: "jdbc:text:/." "jdbc:text:/c:/data" for Windows driver "jdbc:text:///c:/data" for Windows driver "jdbc:text:////usr/data" for unix or linux "jdbc:text://///192.168.10.2/sharedir" for UNC path "jdbc:text:/./data" "jdbc:csv:/." "jdbc:csv:/c:/data" "jdbc:csv:////usr/data" Remote Access (client/server mode): jdbc:text://host:port/[DatabasePath] or jdbc:csv://host:port/[DatabasePath] The only difference for two kinds of url format is: with jdbc:csv prefix, the default table type for CREATE TABLE is CSV. For example: "jdbc:text://domain.com:3099/c:/data" if one TextServer is run on the 3099 port of domain.com Compressed Database:(.ZIP, .JAR, .GZ, .TAR, .BZ2, .TGZ, .TAR.GZ, .TAR.BZ2) jdbc url format is the same as embedded url and remote url. For example: "jdbc:text:/c:/test/testtext.zip Memory-only Database: jdbc:text:/_memory_/ URL Database:(http protocol, https protocol, ftp protocol) jdbc:text:http://httpURL jdbc:text:https://httpsURL jdbc:text:ftp://ftpURL For example: "jdbc:text:http://www.hxtt.com/test" SAMBA Database:(smb protocol) jdbc:text:smb://[[[domain;]username[:password]@]server[:port]/[[share/[dir/]file]]][?[param=value]] For example: "jdbc:text:smb://test1:123@100.100.13.94/textfiles".zone" Free JDBC url:(Warning: only use it for special project) jdbc:text:/" or "jdbc:text:///". Then you can use some full UNC path names in SQL to visit anywhere where your Java VM has right to access. For instance: select * from \\amd2500\e$\textfiles\test; elect * from "\\amd2500\d$\textiles".test; select * from ".".test; HXTT Text (CSV) supports seamlessly data mining on memory-only table, physical table, url table, compressed table, SAMBA table in a sql. More details is in Advanced Programming chapter.
Text supports SQL-92. It supports { UNION | INTERSECT | EXCEPT | MINUS } [ ALL ] query , INNER JOIN, FULL JOIN, LEFT JOIN, RIGHT JOIN, NATURAL JOIN, CROSS JOIN, self join, GROUP_CONCAT, and subquery which includes single-row subquery, multirow subquery, multiple-column subquery, inline views, and correlated subquery. The major syntax is listed at here.
Text driver will use index to speed up the query which contains some indexed expressions. Text supports utilizing index file for LIKE, BETWEEN, IN, DISTINCT, ORDER, and some OR operations.