# BzDB **Repository Path**: thelastbug/BzDB ## Basic Information - **Project Name**: BzDB - **Description**: 这是一个基于C语言的简易版的数据库 - **Primary Language**: C - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2025-05-24 - **Last Updated**: 2025-05-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # BzDB #### 介绍 这是一个基于C语言的简易版的数据库 教程链接:https://www.bilibili.com/video/BV1Az4y1Y79u ### 数据结构介绍 ``` col_name1 | col_name2 | col_name3 ------------------------------------------------------------------ BzDB_row_t [ BzDB_value_t , BzDB_value_t , BzDB_value_t ] BzDB_row_t [ BzDB_value_t , BzDB_value_t , BzDB_value_t ] BzDB_row_t [ BzDB_value_t , BzDB_value_t , BzDB_value_t ] BzDB_row_t [ BzDB_value_t , BzDB_value_t , BzDB_value_t ] ``` url: https://gitee.com/banzhen/BzDB ```c typedef enum { STRING, INTEGER }BzDB_ValueType; typedef struct BzDB_String{ char data[BzDB_STRING_MAXLEN]; }BzDB_String_t; typedef struct BzDB_Integer{ int data; }BzDB_Integer_t; typedef struct BzDB_Value_t{ BzDB_Integer_t valueint; BzDB_String_t valuestring ; }BzDB_Value_t; typedef struct BzDB_Row_t{ // 一行里面最多MAX_COL_COUNT个数 BzDB_Value_t value[BzDB_MAX_COL_COUNT]; }BzDB_Row_t; typedef struct BzDB_Table_t{ // 存放列名 BzDB_String_t col_names[BzDB_MAX_COL_COUNT]; BzDB_ValueType col_names_type[BzDB_MAX_COL_COUNT]; // 存放行名 BzDB_Row_t row_list[BzDB_MAX_ROW_COUNT]; int used_row_count ; int used_col_count ; int max_row_count ; int max_col_count ; }BzDB_Table_t; ``` http://www.eepw.com.cn/zhuanlan/255172.html