cancel
Showing results for 
Search instead for 
Did you mean: 

Default database name in KDB+

davidcole101
New Contributor
Is there a default database name in KDB+ ?
 
I have installed KDB+ (trial version) in Linux and created a table with some sample data:
 
I can use a select statement in an SQL client (Squirrel) to see the data in KDB+.
 
Otherwise how can I create named database? so I can reference the database name (and username/password) from another application with JDBC connection to the test KDB+ system?
 
Thanks for your help!
 
 
6 REPLIES 6

mklee
New Contributor
Default setup of KDB has no entitlement service, you need to implement the service yourself by overriding various .z handles (http://code.kx.com/wiki/Reference)

Thanks...
 
I couldn't make much sense of the .z handles...
 
Is there anywhere that explains how to create a named database instance, username, password and schema?
 
Cheers

On Monday, September 16, 2013 2:17:19 PM UTC+1, mklee wrote:
Default setup of KDB has no entitlement service, you need to implement the service yourself by overriding various .z handles (http://code.kx.com/wiki/Reference)


On Mon, Sep 16, 2013 at 7:49 PM, <david...@googlemail.com> wrote:
Is there a default database name in KDB+ ?
 
I have installed KDB+ (trial version) in Linux and created a table with some sample data:
 
I can use a select statement in an SQL client (Squirrel) to see the data in KDB+.
 
Otherwise how can I create named database? so I can reference the database name (and username/password) from another application with JDBC connection to the test KDB+ system?
 
Thanks for your help!
 
 

--
You received this message because you are subscribed to the Google Groups "Kdb+ Personal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to personal-kdbpl...@googlegroups.com.
To post to this group, send email to personal...@googlegroups.com.
Visit this group at http://groups.google.com/group/personal-kdbplus.
For more options, visit https://groups.google.com/groups/opt_out.

you don't actually create a "named" database as �such, like in sql variants. You process is just the one database. Within there you can create namespaces if you want (e.g. .mynamespace.a:1).

User name/pw - see -u, can provide an md5'd password file and pass into the process. E.g. file can be:

david:<md5 password>
cols:<md5 password>

The start the q process:

q -p 12345 -u file.pass

Similarly, you don't create a schema as such in KDB. You can can have a q file that contains the functions and tables that are required though. So to create an empty table (simple example):

myTable: ([] time:`time$(); sym:`sym$(); price:`float$());



Thanks Manish.
 
If I have an application trying to connect to KDB+ via JDBC and expects an entry for schema, what do I put in?
 
Currently my connection is failing from that application:
 
'TRACE start schema verification for datasource
TRACE more then one schema found not matching case, can't choose'
 
Can I manually set a schema name in KDB+ (via q) or put some deafult string for the schema name?


On Tuesday, September 17, 2013 11:23:44 AM UTC+1, manish patel wrote:
you don't actually create a "named" database as  such, like in sql variants. You process is just the one database. Within there you can create namespaces if you want (e.g. .mynamespace.a:1).

User name/pw - see -u, can provide an md5'd password file and pass into the process. E.g. file can be:

david:<md5 password>
cols:<md5 password>

The start the q process:

q -p 12345 -u file.pass

Similarly, you don't create a schema as such in KDB. You can can have a q file that contains the functions and tables that are required though. So to create an empty table (simple example):

myTable: ([] time:`time$(); sym:`sym$(); price:`float$());




On Tue, Sep 17, 2013 at 11:09 AM, <david...@googlemail.com> wrote:
Thanks...
 
I couldn't make much sense of the .z handles...
 
Is there anywhere that explains how to create a named database instance, username, password and schema?
 
Cheers

On Monday, September 16, 2013 2:17:19 PM UTC+1, mklee wrote:
Default setup of KDB has no entitlement service, you need to implement the service yourself by overriding various .z handles (http://code.kx.com/wiki/Reference)


On Mon, Sep 16, 2013 at 7:49 PM, <david...@googlemail.com> wrote:
Is there a default database name in KDB+ ?
 
I have installed KDB+ (trial version) in Linux and created a table with some sample data:
 
I can use a select statement in an SQL client (Squirrel) to see the data in KDB+.
 
Otherwise how can I create named database? so I can reference the database name (and username/password) from another application with JDBC connection to the test KDB+ system?
 
Thanks for your help!
 
 

--
You received this message because you are subscribed to the Google Groups "Kdb+ Personal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to personal-kdbpl...@googlegroups.com.
To post to this group, send email to personal...@googlegroups.com.
Visit this group at http://groups.google.com/group/personal-kdbplus.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Kdb+ Personal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to personal-kdbpl...@googlegroups.com.
To post to this group, send email to personal...@googlegroups.com.
Visit this group at http://groups.google.com/group/personal-kdbplus.
For more options, visit https://groups.google.com/groups/opt_out.

Never used JDBC so don't have a clue, but are you using the example as in�http://code.kx.com/wiki/Cookbook/InterfacingWithJava#Is_there_a_JDBC_interface.3F�?



forget what you know about other sql database systems when you start working with kdb.
the database part of q/kdb+ is just a side effect of the q language. here tables are just another datatype with some operators that work on them (select, update, etc). the core part is an efficient vector/functional language and system.

try to read the documents on http://kx.com/q/d and code.kx.com.

regards,
felix