The SeaBass project is a new Web application server to be able to develop the system development easily by present Java. For instance, I want to strengthen the function often used in Japan like Mail Sending, the slip print, and the template functions etc.
rimdb(read in memory-database)の説明.
rimdbは、読み込み専用のデータベースです.
rimdbは、java1.7で動作します.
rimdbは、メモリ上で動作します.
rimdbは、プログラム起動毎にCSVもしくはJDBC上の情報から、テーブルを作成します.
rimdbは、メモリ上に存在するので、超高速で情報の検索が可能です.
rimdbは、組み込みモードのsqlite3と比べて、50倍高速に検索できます.
rimdbは、他のDB(プロセス間通信)と比べて100倍以上高速に検索できます.
rimdbは、検索対象とする条件やソート条件に対して、インデックス化が必要です.
rimdbは、簡易的なSQL的なもので検索が可能です.
rimdbは、他のDBと違い、限定的なものしか使えません.
rimdbができることは、
などの、比較的標準的なことが行えるのと、
の並べ替えぐらいです.
rimdbは、空間インデックスが利用できますが、限定的で、1テーブルに1つしか 定義できませんし、対象のカラムは32bit整数である必要があります.
空間インデックスの利用方法はサンプルプログラム3を見ればわかると思います.
rimdbは、SQL文でのselectに対して、取得カラム定義ができません.
すべてが取得対象になります.
理由として、別にメモリ上に存在するので、改めて選別が必要ないということです.
rimdbは、検索オブジェクトの再利用が可能です.
たとえば、
select * from test_table where id=? ;
と記す代わりに
$test from test_table where id=?
と構文の先頭に$testこの場合は、testと言う名前でキャッシュ化されるのですが、 このように定義すれば、2度目は、キャッシュ側の検索オブジェクトを再利用します.
詳しくは、サンプルや、コンフィグファイルの説明をみて、サンプルプログラムを 動かしてみてください.
最後にSQLに対しての説明を記したいと思います.
・すべての内容を取得する.
select from test_table ;
・1つのカラムをキーとして情報を取得.
select from test_table where id=1 ;
・1つのカラムをキーとして情報を取得(パラメータ指定)
select from test_table where id=? ;
・ソート処理(昇順).
select from test_table order by id ;
select from test_table order by id asc ;
・ソート処理(降順)
select from test_table order by id desc ;
・ソート処理(複数)
select from test_table order by id desc,name asc ;
・in検索
select from test_table where id in(1,2,3) ;
・in検索(パラメータ指定)
select from test_table where id in(?) ;
select from test_table where id in ? ;
・between検索
select from test_table where id between(100,200) ;
・between検索(パラメータ指定)
select from test_table where id between(?) ;
select from test_table where id between ? ;
・like検索
select from test_table where name like 'abc%' ;
・like検索(パラメータ指定)
select from test_table where name like ? ;
・空間インデックス検索.
select from test_table where point(100,200,1000) ;
・空間インデックス検索(パラメータ指定).
select from test_table where point(?) ;
select from test_table where point ? ;
・複数検索. select from test_table where id=1 and name="ほげ" ;
select from test_table where id=1 or name="ほげ" ;
select from test_table where ( id=1 and name="ほげ" ) or ( abc=100 and def=200) ;
select from test_table where ( id=1 and name="ほげ" ) or ( abc=100 and def=200) and point(100,200,1000) ;