assignments for the night

This commit is contained in:
Becca 2015-09-14 18:39:04 -05:00
parent e9e631aa6b
commit 7fe87111fc

View file

@ -8,6 +8,7 @@ db_engine::db_engine(){
//create a new table in memory //create a new table in memory
//creates a vector //creates a vector
//DONE
void db_engine::createCmd(string tableName, vector<string> attributes, vector<string> pkeys){ void db_engine::createCmd(string tableName, vector<string> attributes, vector<string> pkeys){
string output = ""; string output = "";
output += "CREATE TABLE " + tableName + " ("; output += "CREATE TABLE " + tableName + " (";
@ -52,6 +53,7 @@ void db_engine::createCmd(string tableName, vector<string> attributes, vector<st
//} //}
//should write cmdList to a .txt file //should write cmdList to a .txt file
//DONE
void db_engine::saveCmd(){ void db_engine::saveCmd(){
ofstream dbCmdFile; ofstream dbCmdFile;
dbCmdFile.open("dbCmds.txt", ios_base::app); dbCmdFile.open("dbCmds.txt", ios_base::app);
@ -66,36 +68,43 @@ void db_engine::saveCmd(){
} }
//display the database //display the database
//DONE
void db_engine::showCmd(string tableName){ void db_engine::showCmd(string tableName){
cmdList.push_back("SHOW " + tableName + ""); cmdList.push_back("SHOW " + tableName + "");
} }
//add a tuple to a table in the memory //add a tuple to a table in the memory
//BECCA
void db_engine::insertQuery(){ void db_engine::insertQuery(){
//table.push_back(); //table.push_back();
} }
//remove a tuple from a table in the memory //remove a tuple from a table in the memory
//BECCA
void db_engine::deleteQuery(){ void db_engine::deleteQuery(){
// //
} }
//search and return one more tuples from a table in the memory //search and return one more tuples from a table in the memory
//WILLIAM
void db_engine::selectQuery(){ void db_engine::selectQuery(){
// //
} }
//return a subset of attributes (columns) //return a subset of attributes (columns)
//BRANDON
void db_engine::projectQuery(){ void db_engine::projectQuery(){
// //
} }
//each row in the first table is paired with all the rows in the second table //each row in the first table is paired with all the rows in the second table
//BRANDON
void db_engine::productQuery(){ void db_engine::productQuery(){
// //
} }
//true if relations have the same # of attributes and each attribute must be from the same domain //true if relations have the same # of attributes and each attribute must be from the same domain
//WILLIAM
bool db_engine::unionComp(){ bool db_engine::unionComp(){
return false; return false;
} }