# nosqlite2db **Repository Path**: jfyuan/nosqlite2db ## Basic Information - **Project Name**: nosqlite2db - **Description**: 一个简单的文件存储数据库 - **Primary Language**: C - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2021-05-13 - **Last Updated**: 2025-03-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README This is a simple and very lite nosql implement, in order to replace sqlite. nosqlite now supports the following main operations: 1. set - add or replace a record 2. get - find a record 3. remove - remove a record advantages: 1. only 300 lines of ansi c code 2. it consumes very low memory, about 10MB for 1000000 records 3. more better performance than sqlite, about 400000 qps compile and run the test case: gcc nosqlite.c test.c -o test ./test compile and run the dict2db, convert dict to db: gcc nosqlite.c dict2db.c -o dict2db ./dict2db sample.dict sample.db compile and run the benchmark: gcc nosqlite.c benchmark.c -o benchmark ./benchmark sample.dict sample.db capacity check-value-or-not introduction in Chinese: http://justcodeit.info/blog/a-simple-nosqlite-implementation.html NOTICE: the max value size is 64KB by default, that's because `NOSQLITE_VINT` is defined as `unsigned short`, if you want to store larger value you should add a compiling argument `-DNOSQLITE_VINT="unsigned int"`, also there's a testcase in `test.c`: gcc -DNOSQLITE_VINT="unsigned int" nosqlite.c test.c -o test ./test