Skip to content

Stage 2

Refer Stage 1

The records are stored in record blocks arranged as linked lists, with header/preamble along with it to traverse between these blocks if required,

Reference (Need to be reviewed later)

NITCbase follows a 8-layer object oriented architecture. In the course of this project, you will be implementing all these layers. They are described below.

  1. Algebra Layer: Handles the high level relational algebraic operations of our database
  2. Schema Layer: Handles the schema operations such as creation, deletion
  3. Block Access Layer: Handles high-level operations on the disk such as search and insert
  4. B+ Tree Layer: Handles all index related operations.
  5. Cache Layer: Handles caching of the relation and attribute catalog
  6. Buffer Layer: Handles buffered operations on all disk blocks
  7. Physical Layer: Provides the low-level operations on the disk blocks. This layer has already been implemented and provided to you.
  8. The Frontend Interface: Responsible for interacting with the user, receiving the commands, and translating them to the appropriate function in the Schema/Algebra layer. Most of this layer has already been implemented and provided to you. You will only need to make minor additions to this layer.

Important Question

Pasted image 20241223234945.pngPasted image 20241223235026.png

Create Table Command

CREATE TABLE tablename(attr1_name attr1_type, attr2_name attr2_type, ... )
schema Students

We need to display all the records for this table, we can use the metadata in record catalog to find the number of records

we require getHeader(), getRecord() in Buffer Layer

typedef union Attribute {
    double nVal;
    char sVal[ATTR_SIZE];
} Attribute