J語言自帶的資料庫JD

lt發表於2016-08-29

J語言自帶的資料庫有2種,一種是JDB,從J803版後廢棄,另一種是JD,需要64位。下面試驗JD.
1. 下載J805版本的J安裝包。

http://www.jsoftware.com/download/j805/install/j805_win64.zip

把它解壓縮到D:\目錄,自動產生j64-805目錄。

2.下載JDB外掛。

http://www.jsoftware.com/jal/j805/addons/data_jd_2.3.2_win.zip

把它解壓到j64-805/addons目錄。

3.執行。 在D:\j64-805目錄下執行jconsole.cmd,然後在命令列中輸入:

load 'data/jd'

系統提示:

|Jd requires addon jfiles: assert  

表示缺少jmf外掛,繼續下載並解壓jfiles外掛。

http://www.jsoftware.com/jal/j805/addons/data_jfiles_1.0.6_win.zip

繼續輸入:

load 'data/jdb'

又提示缺少jmf外掛,繼續下載並解壓jmf外掛。 http://www.jsoftware.com/jal/j805/addons/data_jmf_1.0.16_win.zip

再次執行

load 'data/jdb'  

顯示了缺少MSVCR120.dll,下載vcredist_x64.exe (VC2013)並安裝。

再次執行

load 'data/jdb'  

顯示

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Jd key: missing or invalid
email: jdinfo@jsoftware.com
to provide basic info and request a key

non-commercial or evaluation key is free
and does not require a license agreement

See Jd documentation at:
d:/j64-805/addons/data/jd/doc/index.html

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


|assertion failure: assert
|       assert 0[echo nokey_jd_

發郵件申請key後,按照回覆郵件提示安裝。

再次執行

load 'data/jdb'  

顯示

Jd is Copyright 2016 by Jsoftware Inc. All Rights Reserved.
Jd is provided "AS IS" without warranty or liability of any kind.

Commercial users must have a Jd License from Jsoftware.

Keep addons (base, JHS, jmf, etc) up to date.

There is a slight bias for JHS as the front end.
JHS is the base technology for Jd client/server.

JAL does not lock against other tasks using the same Jd folder.
Update with tasks using the same Jd folder will cause problems.

Different J installs should be used for production and development.

Run test suite (takes several minutes): jdtests_jd_''

Bookmark documentation in your browser:
   file:///d:/j64-805/addons/data/jd/doc/index.html

   jdxwelcome_jd_'' NB. run this to avoid long welcome message

Get started:
   jdex_jd_''      NB. list examples from docs
   jdex_jd_'reads' NB. run reads
   jdrt_jd_''      NB. list tutorials
   jdrt_jd_'intro' NB. run intro

輸入:

jdtests_jd_''

提示:
28 seconds to run csv tests
24 seconds to build demos
...

輸入:

jdex_jd_'reads'

顯示:

   jdadminx'example'[olddan=:jdaccess''
   jd'gen ref2 a 3 1 b 2'
   jd'reads from a'
+----+-----+----+------------+
|akey|adata|aref|a0          |
+----+-----+----+------------+
|0   |0    |0   |abc defabc d|
|1   |1    |1   |efabc defabc|
|2   |2    |0   | defabc defa|
+----+-----+----+------------+
   jd'reads from b'
+----+------------+
|bref|bb12        |
+----+------------+
|0   |abc defabc d|
|1   |efabc defabc|
+----+------------+
   jd'reads akey,adata from a'
+----+-----+
|akey|adata|
+----+-----+
|0   |0    |
|1   |1    |
|2   |2    |
+----+-----+
   jd'reads from a,a.b'
+------+-------+------+------------+------+------------+
|a.akey|a.adata|a.aref|a.a0        |b.bref|b.bb12      |
+------+-------+------+------------+------+------------+
|0     |0      |0     |abc defabc d|0     |abc defabc d|
|1     |1      |1     |efabc defabc|1     |efabc defabc|
|2     |2      |0     | defabc defa|0     |abc defabc d|
+------+-------+------+------------+------+------------+
   jd'reads from a where akey<3'
+----+-----+----+------------+
|akey|adata|aref|a0          |
+----+-----+----+------------+
|0   |0    |0   |abc defabc d|
|1   |1    |1   |efabc defabc|
|2   |2    |0   | defabc defa|
+----+-----+----+------------+
   jd'reads from a,a.b where akey<3 and b.bref=0'
+------+-------+------+------------+------+------------+
|a.akey|a.adata|a.aref|a.a0        |b.bref|b.bb12      |
+------+-------+------+------------+------+------------+
|0     |0      |0     |abc defabc d|0     |abc defabc d|
|2     |2      |0     | defabc defa|0     |abc defabc d|
+------+-------+------+------------+------+------------+
   jd'reads asdf:b.bb12 from a,a.b where akey<3 and b.bref=0'
+------------+
|asdf        |
+------------+
|abc defabc d|
|abc defabc d|
+------------+
   jd'reads sum adata from a where akey>0'
+-----+
|adata|
+-----+
|3    |
+-----+
   jd'reads sum adata by aref from a'
+----+-----+
|aref|adata|
+----+-----+
|0   |2    |
|1   |1    |
+----+-----+

詳細內容,參考

http://www.jsoftware.com/jdhelp/

相關文章