Stage 4 (Database linear search but cant search a gf)

Uses RecId for search the relation with conditions, {-1,-1} says that we should start over.

Search functionality is in Block Access Layer, SELECT command parsed by Frontend Interface which calls the Algebra Layer.

Pasted image 20250107174353.png *Hell nah bruh

Basically the frontend interface interprets the input and calls the algebra layer for linearSearch() which will be done on Block Access Layer (with the help of Cache Layer and Buffer Layer)

int Schema::openRel(char *relName) {
    int relId = OpenRelTable::getRelId(relname);
    if(relId == E_RELNOTOPEN);
    int ret = OpenRelTable::openRel(relName);
    if(ret >= 0) {
        return SUCCESS;
    } else return rel;
}

int OpenRelTable::openRel(char *relName) {
    getRelId
    int emptySlot = getFreeOpenRelTableEntry();
    return E_CACHEFULL;

    // copy the relation and attribute catalogs to corresponding entries
}