sct nosql memory database is a data structure storage database that supports rich data structure types.
start and configuration
download the install package, unpack it to install dir, run client or server
explanation:
sct_nosql_local.exe the local nosql db server
sct_nosql_c_mem.exe the nosql db's client, the program will print the help default
sct_nosql_s_mem.exe the nosql db's server
sct_nosql4bin_local.exe this is load nosql db server use binary protocol, it is experiment current,and better for c++
nosql user guide.txt the docuement about nosql's command
sct_ndb.toml the configuration of server,sever's listen port and user/password, default user and password is: user/user, root/root
sct_ndb.toml.sample the configuration's sample
lic.dat the license,there is license for permanent use
init.nos.sample load command file sample
init.nos the initial load command file(it can be not exsits)
Install_Service.bat the installer as service, it will install as service and auto start
Install_Service.bat the uninstaller as service
.log the server's log,it can be delete
sdk the sdk for c or python
others the runtime files, don't delete it
note: the last command file is in the install package
if there is question please mailto sct001@shucantech.com
Basic data types include: i08, u08, i16, u16, i32, u32, i64, u64, float, double, string, date, time, datetime
The first layer of the database uses a hash mapping structure by default, and the default maximum number of keys generated is 1024*1024
If a string key is used, store the relationship of a string key<->integer key.
If you use the string key when querying, first query the corresponding integer key from this mapping.
The string key is enclosed in double quotation marks ("), and the string supports C++ standard character escape \n,\x,\u,\U, etc.
Each stored hash structure can be one of the following
the specification of basic type:
i08 the c++ input integer(support prefix 0b, 0x, 0)
i16 the c++ input integer(support prefix 0b, 0x, 0)
i32 the c++ input integer(support prefix 0b, 0x, 0)
i64 the c++ input integer(support prefix 0b, 0x, 0)
u08 the c++ input integer(support prefix 0b, 0x, 0)
u16 the c++ input integer(support prefix 0b, 0x, 0)
u32 the c++ input integer(support prefix 0b, 0x, 0)
u64 the c++ input integer(support prefix 0b, 0x, 0)
float the c++ input float
double the c++ input double
string enclosed in double quotation marks ("), and the string supports C++ standard character escape \n,\x,\u,\U, etc
note:as the key string must enclosed with ",as input paramter it can be ignore if there is no space
date yyyy-mm-dd y is year,m is month,d is day
time hh:mm:ss.n h is hour,m is minute,s is second,n is nanosecond
datetime "yyyy-mm-dd hh:mm:ss.n" data and time enclosed in double quotation marks
trie //The storage data type only supports string vector //Sequential container stack //Stack container queue //Queue container deque //Double queue container heap //Heap container set //Binary balanced tree container map //Binary balanced tree key-value mapping container list //Linked list container multiset //Multi-valued binary balanced tree container multimap //Multi-valued binary balanced tree key-value mapping container hashtable //Hash table container (only integer types are supported, and the default size must be specified) hashmap //Hash table key value mapping container (only key integer type is supported, and the default size must be specified)
The key value management uses the following command
kvs //Display all stored key-value stores and stored container types, key and value types, the number of stores and the ten and hexadecimal values of key values. kvs key //Only display the corresponding key storage information, if it does not exist, return to failure. erase key //Delete the corresponding key, if it does not exist, return to failure. clear //Clear all key value information. create container type key type [value type] [parameter] [string key] //Create a container value. The non-key-value mapping container does not need to specify the value type, the non-hash type does not need to specify the parameters, and the string key does not need to specify the string key. backup path //Backup the entire database to a file restore path //Recover all data from data files
Each container can use the get/set/ins/del command to get/set/insert/delete
The command format is:
command key_or_string_key operation parameters
Different containers can use different operations, unsupported operations return failures
Each container operation supports the following:
all count nth first last range first_k last_k idx ptr val ptr_n ptr_p coutain ucontain lege ltge legt ltgt rank max min max_k min_k eq gt lt ge le value
The data structure of various operations corresponds to the implementation of the standard data structure, and the corresponding operation complexity is retained.
The following are some examples of usage:
create trie create trie "abc" create vector u64 create stack i32 create queue string create deque date create heap double create set float create list string create multiset i32 create vector u64 "abc" create stack i32 "abc" create list string "abc" create queue string "abc" create deque date "abc" create heap double "abc" create set float "abc" create multiset i32 "abc" create map i32 string create multimap i32 string create hashtable i32 200 create map i32 string "abc" create multimap i32 string "abc" create hashtable i32 200 "abc" create hashmap i32 string 200 erase 11 erase "abc" backup "aaa.nos" restore "aaa.nos" get command matrix operation all count nth first last range first_k last_k idx ptr val ptr_n ptr_p contain ucontain lege ltge legt ltgt rank max min max_k min_k eq gt lt ge le value container trie Y Y N N N N N N N N N N N Y Y N N N N N N N N N N N N N N N vector Y Y Y Y Y Y Y Y Y N N N N N N N N N N N N N N N N N N N N N stack Y Y N N Y N N N N N N N N N N N N N N N N N N N N N N N N N queue Y Y N Y Y N N N Y N N N N N N N N N N N N N N N N N N N N N deque Y Y Y Y Y Y Y Y Y N N N N N N N N N N N N N N N N N N N N N heap Y Y N N N N N N N N N N N N N N N N N N N Y N N N N N N N N set Y Y N N N N N N N N N N N N N Y Y Y Y Y Y Y Y Y Y Y Y Y Y N map Y Y N N N N N N N N N N N N N N N N N N Y Y N N Y N N N N Y list Y Y Y Y Y Y Y Y Y Y Y Y Y N N N N N N N N N N N N N N N N N multiset Y Y N N N N N N N N N N N N N Y Y Y Y Y Y Y Y Y Y Y Y Y Y N multimap Y Y N N N N N N N N N N N N N N N N N N Y Y N N Y N N N N Y hashtable Y Y N N N N N N N N N N N N N N N N N N N N N N Y N N N N N hashmap Y Y N N N N N N N N N N N N N N N N N N N N N N Y N N N N Y //get: get "abcd" all; get 100 all get 100 nth 10 get 100 ptr 123 get 100 idx 123 get 100 first get 100 last get 100 range 1 1000 get 100 first_k 200 get 100 last_k 200 get 100 lege 2 10 get 100 ltge 2 100 get 100 legt 2 100 get 100 ltgt 2 100 get 100 max get 100 min get 100 max_k 10 get 100 min_k 10 get 100 eq 1.1 get 100 gt 1.2 get 100 lt 1.5 get 100 ge 2.0 get 100 le 3.0 get 100 rank 1.11 //trie get 100 contain "abc" get 100 ucontain "abc" //list get 100 ptr 322 ins 100 ptr 1202340023 get 100 ptr_n 1202340023 set 100 ptr 1202340023 999 //map get 100 value "abc" set command matrix operation all nth first last range first_k last_k val lege ltge legt ltgt max min max_k min_k eq gt lt ge le value container trie N N N N N N N N N N N N N N N N N N N N N N vector Y Y Y Y Y Y Y N N N N N N N N N N N N N N N stack Y N N Y N N N N N N N N N N N N N N N N N N queue Y N Y Y N N N N N N N N N N N N N N N N N N deque Y Y Y Y Y Y Y N N N N N N N N N N N N N N N heap N N N N N N N N N N N N N Y N N N N N N N N set N N N N N N N N Y Y Y Y Y Y Y Y Y Y Y Y Y N map N N N N N N N N N N N N Y Y N N Y N N N N Y list Y Y Y Y Y Y Y Y N N N N N N N N N N N N N N multiset N N N N N N N N Y Y Y Y Y Y Y Y Y Y Y Y Y N multimap N N N N N N N N N N N N Y Y N N Y N N N N Y hashtable N N N N N N N N N N N N N N N N Y N N N N N hashmap N N N N N N N N N N N N N N N N Y N N N N Y set 100 all 999 set 100 nth 9 999 set 100 first 999 set 100 last 999 set 100 range 1 100 999 set 100 first_k 200 999 set 100 last_k 200 999 set 100 lege 2 10 999 set 100 ltge 2 100 999 set 100 legt 2 100 999 set 100 ltgt 2 100 999 set 100 max 999 set 100 min 999 set 100 max_k 10 999 set 100 min_k 10 999 set 100 eq 1.1 999 set 100 gt 1.2 999 set 100 lt 1.5 999 set 100 ge 2.0 999 set 100 le 3.0 999 //ins ins command matrix operation nth first last val direct_value container trie N N N N Y vector Y Y Y N N stack N N Y N N queue N N Y N N deque N Y Y N N heap N N N N Y set N N N N Y map N N N N Y list Y Y Y Y N multiset N N N N Y multimap N N N N Y hashtable N N N N Y hashmap N N N N Y ins 100 999 ins 100 nth 10 999 ins 100 first 999 ins 100 last 999 ins 100 200 300 //delete del command matrix operation all nth first last range first_k last_k ptr lege ltge legt ltgt rank max min max_k min_k eq gt lt ge le container trie Y N N N N N N N N N N N N N N N N N N N N N vector Y Y Y Y Y Y Y N N N N N N N N N N N N N N N stack Y N N Y N N N N N N N N N N N N N N N N N N queue Y N Y N N N N N N N N N N N N N N N N N N N deque Y N Y Y N Y Y N N N N N N N N N N N N N N N heap Y N N N N N N N N N N N N N Y N N Y N N N N set Y N N N N N N N Y Y Y Y Y Y Y Y Y Y Y Y Y Y map Y N N N N N N N N N N N N Y Y N N Y N N N N list Y Y Y Y Y Y Y Y N N N N N N N N N N N N N N multiset Y N N N N N N N Y Y Y Y Y Y Y Y Y Y Y Y Y Y multimap Y N N N N N N N N N N N N Y Y N N Y N N N N hashtable Y N N N N N N N N N N N N N N N N Y N N N N hashmap Y N N N N N N N N N N N N N N N N Y N N N N del 100 all del 100 nth 10 del 100 first del 100 last del 100 range 1 1000 del 100 first_k 200 del 100 last_k 200 del 100 lege 2 10 del 100 ltge 2 100 del 100 legt 2 100 del 100 ltgt 2 100 del 100 max del 100 min del 100 max_k 10 del 100 min_k 10 del 100 eq 1.1 del 100 gt 1.2 del 100 lt 1.5 del 100 ge 2.0 del 100 le 3.0