1 Star 0 Fork 0

Lin-Yanjun / myjql

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

MyJQL

This is the repo for FDU 2022 - Introduction to Database - Project 2 - MyJQL

Introduction

MyJQL is a simplified redis-like key-value database, which supports three kinds of operations: get key, set key value, and del key. B-Tree index is automatically created for key.

  • include and src: Core implementation of MyJQL.
  • driver: Header and source for MyJQL driver. After compilation, you can include myjqlclient.h and link myjqlclient.lib (in Windows) or libmyjqlclient.a (in Linux). In this way, your own program will be able to store data to and retrieve data from MyJQL.
  • main: myjqlserver.c is the server. myjqlshell.cpp is the client, which also serves as an example utilizing the driver.
  • test: Tests for core implementation. test_myjql.cpp is used to examine the full functionality.

Build

MyJQL supports Windows and Linux (Ubuntu).

Shell/CMD/PowerShell (in the root directory of this repo):

mkdir build
cd build
cmake ..
cmake --build .

Release Build

MSVC:

cmake --build . --config Release

gcc:

cmake .. -DCMAKE_BUILD_TYPE=Release

Run Tests

Change directory into build/test (if you are currently in build):

cd test

List tests:

ctest -N

Run tests:

  • MSVC:

    ctest -C Debug
    ctest -C Release
  • gcc:

    ctest

Usage

  • Start the server: myjqlserver.
  • Start several clients: myjqlshell.
  • Input commands to the clients:
    • set key value: set key to value.
    • get key: get value based on key.
    • del key: delete value based on key.
    • exit: exit the client shell.
  • To safely stop the server:
    • Use ctrl + c in Windows and Linux.
    • In Windows, you also can close it directly.

空文件

简介

复旦大学2022春数据库(H) 基于复旦教学myjql框架,使用C语言,实现简易的redis数据库底层机制,包括页内的分槽式管理、空闲空间的哈希表管理、索引的B+树管理等技术 展开 收起
C 等 3 种语言
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C
1
https://gitee.com/demon0511/myjql.git
git@gitee.com:demon0511/myjql.git
demon0511
myjql
myjql
master

搜索帮助