Skip to content

myzWILLmake/MiniSQL-BufferManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

MiniSQL-BufferManager

A part of co-operative work for DSD(Database System Design)

Issues

  1. DropTable函数中,因为要求在table上的所有index也需要全部删除。这里 RecordManager 和 IndexManager 协商下看怎么解决比较好
  2. Block头文件和IndexBlock头文件有所更新,查看下改动吧。

Block:

#define RECORD_LEN          512
#define EACH_BLOCK_RECORDS  8

class Record {
public:
    bool empty;
    char data[RECORD_LEN - 1];
};


class Block {
public:
    std::string tableName;
    bool active;				//代表该block使用中
    int blockNo;
    
    Record records[EACH_BLOCK_RECORDS];
    int recordNum;
    
    Block();
};

IndexBlock:

class IndexBlock {
public:
    char* address;
    bool pin;
    bool dirty;
    bool active;					//代表该block使用中
    std::string tableName;		//加上table和attr的信息方便使用closeIndexBlock(IndexBlock*) 这个函数
    std::string attrName;
    int blockNo;
    IndexBlock();
};

About

A part of co-operative work for DSD(Database System Design)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages