Download

SQL scripts for mytest sample database

These tar or zip files contain the SQL scripts to create the mytest sample database.

Date Filename Size sha1sum
2017.06.13 rsql_mytestdb_scripts.tgz 5205 4b9167846fdd03f4e4097af8a5a1284273144a97
2017.06.13 rsql_mytestdb_scripts.zip 8390 dc2a5e2107f732ef1212c1dc181c09921d57bbc3

RSQL Server and Client, Version 0.6.0

This tar file contains the server and client executable binaries.

Date Filename OS Arch Size sha1sum
2017.06.13 rsql-0_06_00-linux_amd64.tgz Linux 64-bit 9138988 f8f712f88cfb1fd6959910de259b67628b319418
2017.06.14 rsql-0_06_00-darwin_amd64.tgz OS X 64-bit 8784652 7faa923f2468665b224c7905b1cef476adb7694d
2017.06.13 rsql-0_06_00-windows_amd64.zip Windows 64-bit 9255064 568b282c26d364719a780ab49250324475d3d1ed

Installation procedure for Linux and OS X

Installation procedure for Windows

Driver for Csharp (Framework 4.5.1)

Date Filename OS Arch Size sha1sum
2017.04.18 Rsqldrv.dll Windows 64-bit 57344

Create a lib (or choose any other name) directory under your project directory, and download this dll file into this location.

Then, add the reference to this library in Visual Studio.

Finally, in the multiple examples of code, such as https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader(v=vs.110).aspx, change the line using System.Data.SqlClient; by using Rsqldrv.SqlClient;.

Driver source code is at https://github.com/rin01/Rsqldrv

Installation from source code

If you want to compile tool_tblfile_reader, which is a tool that displays on the terminal the B-tree content of a table or index file:

The argument must be the path of a table file or index file. You can find it by typing, for the tables in mytest database:

$ rcli -Q='use mytest; show id t'

2017/03/14 17:43:38 --- executing batch <query string>:1 ---
TABLE                                               FILEPATH
--------------------------------------------------  --------------------
mytest.dbo.country                                  data/d102/s0/t7000001
mytest.dbo.customer                                 data/d102/s0/t7000003
       idx_name                                            index/d102/s0/i7000004
       idx_name_birthdate                                  index/d102/s0/i7000005
mytest.dbo.items                                    data/d102/s0/t7000009
mytest.dbo.orders                                   data/d102/s0/t7000006
       idx_custid                                          index/d102/s0/i7000007
       idx_order_date                                      index/d102/s0/i7000008
mytest.dbo.product                                  data/d102/s0/t7000002

element count: 5

2017/03/14 17:43:38 return code: 0

To display the content of the data file for the country table:

$ tool_tblfile_reader /var/opt/rsql1/data//d102/s0/t7000001

type: TD_TYPE_BASE_TABLE, dbid.schema.(gtblid)tblid: 102.0.(7000001)7000001
highest allocated page no, excepted allocator pages, is page_no=2
PAGE_SIZE=16384
PZONE_NUMBER_OF_PAGES_IN_ZONE=65536

---------- PAGE_INFO: 1 ---------
pinf_column_array_capacity          : 1024
pinf_nk_array_capacity              : 12
pinf_nk_array_coll_capacity         : 360
|
pinf_column_count                   : 3
pinf_column_base_seqno              : 0,1,2
pinf_column_datatypes               : 0:BIGINT, 1:INT, 2:VARCHAR
pinf_nk_count                       : 1
pinf_nk_base_seqno                  : 1
pinf_nk_collations                  : []
|
pinf_next_rowid                     : 10
pinf_next_identity                  : -9223372036854775807
|
pinf_root_page_no                   : 2
|
pinf_total_leaf_tuples_count        : 10
pinf_total_leaf_pages _count        : 1
|
pinf_zone_bitmaps_count             : 1
pinf_zone_bitmap_array_size         : 8192
|
pinf_zone_rootbitmap_array_size     : 2048

---------- LEAF: 2 ---- 176/16134 16310-----
pg_tuple_count: 10, pg_prev_no: BOT, pg_next_no: EOT
|                   0|          0|USA       |
|                   1|          1|France    |
|                   2|          2|Italy     |
|                   3|          3|Germany   |
|                   4|          4|Russia    |
|                   5|          5|Japan     |
|                   6|          6|China     |
|                   7|          7|Sweden    |
|                   8|          8|New Zeala~|
|                   9|          9|UK        |

Total number of tuples read in leaf pages: 10