Connect to Kx Systems, Inc. kdb+ databases
The kx
function creates a kx
object. The
kx
object represents a Kx Systems®, Inc. kdb+ database connection.
After you create a kx
object, you can use the object functions to run
Kx Systems, Inc. kdb+ commands, retrieve data from the Kx Systems, Inc. kdb+ database, and write data back to the database.
Before you connect to the database, add the Kx Systems, Inc. file jdbc.jar
to the MATLAB®
Java® class path by using the javaaddpath
command. The
following code adds the JAR file to the MATLAB
Java class path. This code assumes that the full path of the JAR file is
c:\q\java\jdbc.jar
.
javaaddpath c:\q\java\jdbc.jar
Alternatively, add the JAR file to the static Java class path. For details about dynamic and static class paths, see Java Class Path.
Note
Earlier versions of the Kx Systems, Inc. kdb+ database provide this JAR file with the name
kx.jar
. If you are running an earlier version of the
database, rename kx.jar
as jdbc.jar
to add
this file to the MATLAB
Java class path.
c = kx(ipaddress,port,
uses a customer identifier for the database connection.customerid
)
isconnection | Determine if connections to Kx Systems, Inc. kdb+ databases are valid |
close | Close connections to Kx Systems, Inc. kdb+ databases |
get | Retrieve Kx Systems, Inc. kdb+ connection object properties |
exec | Run Kx Systems, Inc. kdb+ commands |
fetch | Request data from Kx Systems, Inc. kdb+ databases |
tables | Retrieve table names from Kx Systems, Inc. kdb+ databases |
insert | Write data to Kx Systems, Inc. kdb+ databases |