Create a new b tree index indexmanager 3 for each

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: tem catalogs and keep them open (they will be used heavily) close database SystemManager::closeDb 1.  Close system catalog tables 2.  chdir("..") drop database <dbName> SystemManager::dropDb 1.  system("rm –rf <dbName>") –  Need to #include <stdlib.h> create table <relName>(...) SystemManager::createTable 1.  Create the specified table (RecordManager) 2.  Update system catalogs to record informa6on about table and its a[ribute create index <relName>(<attrName>) SystemManager::createIndex 1.  Open table (RecordManager) 2.  Create a new B+ tree index (IndexManager) 3.  For each record in table (RecordFileScan) 1.  Insert key, recordID into index 4.  Update system catalogs to reflect existence of index load <relName> <fileName> SystemManager::load 1.  Bulk ­load the contents of comma ­separated file into table 2.  For each line in file: 1.  Parse the line, create a record 2.  Insert record into table 3.  Insert keys for record into any indices •  How to read the file: (C) #include <stdio.h>; use fopen, getc*, fclose (C++) #include <fstream>; use ifstream::open, ifstream::getline*, ifstream::close •  How to parse a line: –  lines look like "22,Dustin,7,45.0" – no commas inside strings –  use strtok (<string.h>), strtol and str...
View Full Document

This document was uploaded on 03/12/2014 for the course CSCI 165B at UC Davis.

Ask a homework question - tutors are online