simple_DBMS
1.0.0
このプロジェクトは、国立交通大学のデータベース システム入門の教材として、C を使用して実装された簡単な DBMS です。
$ make check
$ python3 test/system/system_test.py ./shell [test_case..]
test_cases が指定されていない場合は、デフォルトですべてのシステム テストが実行されます。
$ make
$ ./shell
現在のテーブル スキーマはハードコードされており、include/User.h 内のスキーマは、User_t をチェックして各フィールドの詳細を取得できます。
Userテーブル| フィールド名 | データ型 |
|---|---|
| ID | 整数 |
| 名前 | 文字[255] |
| 電子メール | 文字[255] |
| 年 | 整数 |
| 指示 | 説明 |
|---|---|
| 入れる | insert コマンドでは、一度に 1 つのUser_tレコードのみを挿入できます |
| 選択する | select コマンドは、現在のデータベース内のすべてのUser_tレコードのみを出力します。 |
プロセス終了後はメモリのみにレコードが保存されません。
$ ./shell
ファイル モードでは、指定した <DB ファイル> にレコードが保存され、次回の実行時に同じ実行コマンドでレコードを自動的に再ロードできます。
$ ./shell <DB file>
├─ include/ Header files
├─ src/ Source files
│ ├─ shell.c Entry point, which contains main()
│ └─ Util.c Some utility functions
├─ test/ Unit tests & system tests
│ ├─ include/ Test header files
│ ├─ system/ System tests
│ └─ *.c Unit tests source file
└─ Makefile Makefile for make