From a966090eeacde14b65aeba447a13551df317eecf Mon Sep 17 00:00:00 2001 From: Brandon Jackson <1drummer@att.net> Date: Tue, 15 Sep 2015 02:57:09 -0500 Subject: [PATCH 01/22] Update db_engine.cpp --- db_engine.cpp | 110 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 99 insertions(+), 11 deletions(-) diff --git a/db_engine.cpp b/db_engine.cpp index 30fa0b7..b88d9d4 100755 --- a/db_engine.cpp +++ b/db_engine.cpp @@ -1,12 +1,50 @@ #include "db_engine.h" +using namespace std; + db_engine::db_engine(){ // } //create a new table in memory -db_engine::createCmd(){ - //// +//creates a vector +//DONE +void db_engine::createCmd(string tableName, vector attributes, vector pkeys){ + string output = ""; + output += "CREATE TABLE " + tableName + " ("; + + vector::iterator it = attributes.begin(); + while (it != attributes.end()){ + if (it == attributes.begin()) + if ((it + 1) != attributes.end()) + output += *it + ","; + else + output += *it; + else + output+= " " + *it; + + ++it; + } + + output += ") PRIMARY KEY ("; + + vector::iterator it2 = pkeys.begin(); + while (it2 != pkeys.end()){ + if (it2 == pkeys.begin()) + if ((it2 + 1) != pkeys.end()) + output += *it2 + ","; + else + output += *it2; + else + output+= " " + *it2; + + ++it2; + } + + output += ");"; + + cout << output; + //cmdList.push_back(output); } //open a txt file, parse SQL script, load data in table @@ -14,42 +52,92 @@ db_engine::createCmd(){ // //} -//save all the commands to the db text file +//should write cmdList to a .txt file +//DONE void db_engine::saveCmd(){ - // + ofstream dbCmdFile; + dbCmdFile.open("dbCmds.txt", ios_base::app); + + vector::iterator it = cmdList.begin(); + while (it != cmdList.end()){ + dbCmdFile << *it << "\n"; + ++it; + } + + cmdList.clear(); } -//display the table currently stored in memory -void db_engine::showCmd(){ - // +//display the database +//DONE +void db_engine::showCmd(string tableName){ + cmdList.push_back("SHOW " + tableName + ""); } //add a tuple to a table in the memory +//BECCA void db_engine::insertQuery(){ - // + //table.push_back(); } //remove a tuple from a table in the memory +//BECCA void db_engine::deleteQuery(){ // } //search and return one more tuples from a table in the memory +//WILLIAM void db_engine::selectQuery(){ // } //return a subset of attributes (columns) -void db_engine::projectQuery(){ - // +//BRANDON +vector db_engine::projectQuery(vector< vector > table, vector attributes, string query){ + /* + So basically this is what's going on: + - Take the table to iterate through, this is the 2D vector (input 1) + - Take the vector of attributes that pertains to the respective table (input 2) + - Take a string that will be used for the program to search for in the attributes (input 3) + - In the attributes vector, iterate through each attribute until the attribute (string) matches the input query + - For every iterator, have a counter that counts how many attributes are skipped over in the vector until the attribute is found + - This counter will be used to iterate through each vector (row) in the list, skip over that many attributes, and push that into a result vector + - Once all vector's elements at the specified attribute are pushed back, return the result vector + */ + int counter = 0; //counter for iterating through the attributes, initialized at 0 for reasons + vector result; + + //Loop through the vector until we have found a string in it that matches the query + for(int i=0; i < attributes.size(); i++){ + counter++; + if(attributes[i] == query) + break; + else + continue; + } + + //So let's say we have a 2-D Vector (the table) that contains all of the rows, we iterate through each row + std::vector< std::vector >::const_iterator row; + std::vector::const_iterator col; + + for (row = table.begin(); row != table.end(); ++row) { + //Instead of col != row->end() we have it counter, in order for the program to access the correct data under the correct attribute + for (col = row->begin(); col != counter; col++) { + result.push_back(col); //Now we store that row's attribute into the result vector + } + } + + return result; } //each row in the first table is paired with all the rows in the second table -void db_engine::productQuery(){ +//BRANDON +vector< vector > db_engine::productQuery(vector< vector > table_1, vector< vector > table_2){ // } //true if relations have the same # of attributes and each attribute must be from the same domain +//WILLIAM bool db_engine::unionComp(){ return false; } From 68263bd0131327022c7ecb655a976cecddbada0a Mon Sep 17 00:00:00 2001 From: Brandon Jackson <1drummer@att.net> Date: Tue, 15 Sep 2015 02:57:33 -0500 Subject: [PATCH 02/22] Update db_engine.h --- db_engine.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/db_engine.h b/db_engine.h index f319f02..05e7b60 100755 --- a/db_engine.h +++ b/db_engine.h @@ -1,12 +1,19 @@ +#include +#include +#include + +using namespace std; + class db_engine { - //member variables + vector cmdList; + //vector> table; public: db_engine(); - void createCmd(); + void createCmd(string tableName, vector attributes, vector pkeys); //void openCmd(); void saveCmd(); - void showCmd(); + void showCmd(string tableName); void insertQuery(); void deleteQuery(); void selectQuery(); From 91ae6e305ad99640e7f7ab430a77ae5ecf38cb64 Mon Sep 17 00:00:00 2001 From: William Bracho Blok Date: Tue, 15 Sep 2015 18:56:40 -0500 Subject: [PATCH 03/22] Create Attribute.h --- Attribute.h | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Attribute.h diff --git a/Attribute.h b/Attribute.h new file mode 100644 index 0000000..87b2c25 --- /dev/null +++ b/Attribute.h @@ -0,0 +1,58 @@ +#include +#include + +using namespace std; + +//Funtional, might need more functionality + +//template +class Attribute { + //a named column of a relation + string name; + vector values; + bool isKey; + int size; + +public: + + void initializeAttribute(string n, vector a){ + + name = n; + values = a; + } + + string getName(){ + return name; + } + + Attribute(){ } + + void display() + { + cout<<"Atribute name:\t"< v){ + this.values = v; + } + + Attribute(const Attribute& a){ + this.values = a.getAll(); + } + + Attribute& operator=(const Attribute& a){ + this.values = a.getAll(); + } + + + + vector getAll(){ + return this.values; + } +*/ +}; From 163270d71a8ceceaa595f84264e9bb813c88fd37 Mon Sep 17 00:00:00 2001 From: William Bracho Blok Date: Tue, 15 Sep 2015 18:59:58 -0500 Subject: [PATCH 04/22] Create test2.cpp --- test2.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test2.cpp diff --git a/test2.cpp b/test2.cpp new file mode 100644 index 0000000..5b0a6f8 --- /dev/null +++ b/test2.cpp @@ -0,0 +1,26 @@ +#include +//#include "DBEngine.h" +#include +#include "Attribute.h" + +using namespace std; + +int main() { + + /* + DBEngine engine; + Relation r; + Attribute a; + */ + + vector shamWow; + pendejo.push_back("rag"); + pendejo.push_back("sponge"); + pendejo.push_back("wooow"); + pendejo.push_back("cloth"); + + Attribute atributo; + atributo.initializeAttribute("atributo",shamWow); + + atributo.display(); +} From 0dba891839ed0880f8d16f875f16306d0fd86cc3 Mon Sep 17 00:00:00 2001 From: William Bracho Blok Date: Tue, 15 Sep 2015 19:11:46 -0500 Subject: [PATCH 05/22] Update test2.cpp --- test2.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test2.cpp b/test2.cpp index 5b0a6f8..280656a 100644 --- a/test2.cpp +++ b/test2.cpp @@ -14,10 +14,10 @@ int main() { */ vector shamWow; - pendejo.push_back("rag"); - pendejo.push_back("sponge"); - pendejo.push_back("wooow"); - pendejo.push_back("cloth"); + shamWow.push_back("rag"); + shamWow.push_back("sponge"); + shamWow.push_back("wooow"); + shamWow.push_back("cloth"); Attribute atributo; atributo.initializeAttribute("atributo",shamWow); From b842955e3e44b707b4b4ca12d6f386a275ba19f9 Mon Sep 17 00:00:00 2001 From: Brandon Jackson <1drummer@att.net> Date: Tue, 15 Sep 2015 20:16:58 -0500 Subject: [PATCH 06/22] Update test.cpp --- test.cpp | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/test.cpp b/test.cpp index 491d9f9..0c956a1 100755 --- a/test.cpp +++ b/test.cpp @@ -1,5 +1,67 @@ +/* #include +#include "DBEngine.h" + +using namespace std; int main() { - std::cout << "Hello World!"; -} \ No newline at end of file + + + //DBEngine engine; + vector my_vector = {"Name", "Grade", "Happiness"}; + string at1 = "Name", at2 = "Grade", at3 = "Happiness"; + + + Attribute attribute_1(at1);//, attribute_2(at2), attribute_3(at3); + + + //Relation r(line1, my_attributes); + + //r.displayTableName(); +*/ + +#include +//#include "DBEngine.h" +#include +#include "Attribute.h" + +using namespace std; + +int main() { + + /* + DBEngine engine; + Relation r; + Attribute a; + */ + + vector shamWow; + shamWow.push_back("rag"); + shamWow.push_back("sponge"); + shamWow.push_back("wooow"); + shamWow.push_back("cloth"); + + Attribute atributo; + atributo.initializeAttribute("atributo",shamWow); + atributo.display(); + + vector doom; + doom.push_back("zombieman"); + doom.push_back("revenant"); + doom.push_back("imp"); + doom.push_back("archvile"); + + Attribute atributo2; + atributo2.initializeAttribute("attribute_2", doom); + atributo2.display(); + + + + + string line1 = "Table_1"; + + + + //Relation r(line1, my_attributes); +} + From 990dfa0056c04acf298b44132f07c87151aa5853 Mon Sep 17 00:00:00 2001 From: Brandon Jackson <1drummer@att.net> Date: Tue, 15 Sep 2015 20:17:21 -0500 Subject: [PATCH 07/22] Create Attribute.h --- Attribute.h | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Attribute.h diff --git a/Attribute.h b/Attribute.h new file mode 100644 index 0000000..9d53d4c --- /dev/null +++ b/Attribute.h @@ -0,0 +1,47 @@ +#include +#include + +using namespace std; + +//Funtional, might need more functionality + +//template +class Attribute { + //a named column of a relation + string name; + + bool isKey; + int size; + +public: + + vector values; + + void initializeAttribute(string n, vector a){ + + name = n; + values = a; + } + + string getName(){ + return name; + } + + Attribute(){ } + + void display() + { + cout<<"Atribute name:\t"< getElements(){ + return values; + } + */ +}; From b24f5117f4ddfb071097405cbdb7ea16617d2be8 Mon Sep 17 00:00:00 2001 From: Brandon Jackson <1drummer@att.net> Date: Tue, 15 Sep 2015 20:17:52 -0500 Subject: [PATCH 08/22] Create Relation.h --- Relation.h | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Relation.h diff --git a/Relation.h b/Relation.h new file mode 100644 index 0000000..c41db03 --- /dev/null +++ b/Relation.h @@ -0,0 +1,47 @@ +#include +#include +#include "Attribute.h" + +using namespace std; + +//NOT DONE +class Relation { + //a table with rows and columns + string name; //The title the user gives it + vector< Attribute > att; //A vector of the columns + +public: + Relation(); + + //constructor + Relation(string n, vector< Attribute > a) { + name = n; + att = a; + } + + void addTuple(vector< string > tuple) { + + //Loop through the attribute columns + for(int i = 0; i < att.size(); i++) { + + //Loop through the elements in the i'th column + for(int j = 0; j < att[i].values.size(); j++){ + + //In this column, at this element's spot, assign an element from the tuple vector to this spot + (att[i].values[j]).assign(tuple[i]); + } + } + } + + void displayTableName() { + cout << "The table name is: " << name << endl; + } + + vector< Attribute > getAttributes(){ + return att; + } + + int getSize() { + return att.size(); + } +}; From f5db5ac3ecb4f238c86edd533aec3640104255ad Mon Sep 17 00:00:00 2001 From: Brandon Jackson <1drummer@att.net> Date: Tue, 15 Sep 2015 20:19:10 -0500 Subject: [PATCH 09/22] Update and rename db_engine.cpp to DBEngine.cpp --- DBEngine.cpp | 73 ++++++++++++++++++++++++++ db_engine.cpp | 143 -------------------------------------------------- 2 files changed, 73 insertions(+), 143 deletions(-) create mode 100755 DBEngine.cpp delete mode 100755 db_engine.cpp diff --git a/DBEngine.cpp b/DBEngine.cpp new file mode 100755 index 0000000..a854dec --- /dev/null +++ b/DBEngine.cpp @@ -0,0 +1,73 @@ +#include "DBEngine.h" + +using namespace std; + +DBEngine::DBEngine(){ + // +} + +//create a new table in memory +void DBEngine::createCmd(){ + // +} + +//open a txt file, parse SQL script, load data in table +//void DBEngine::openCmd(){ + // +//} + +//should write cmdList to a .txt file +void DBEngine::saveCmd(){ + // +} + +//display the database +void DBEngine::showCmd(){ + // +} + +//add a tuple to a table in the memory +void DBEngine::insertQuery(){ + // +} + +//remove a tuple from a table in the memory +void DBEngine::deleteQuery(){ + // +} + +//search and return one more tuples from a table in the memory +void DBEngine::selectQuery(){ + // +} + +//return a subset of attributes (columns) +/* +vector DBEngine::projectQuery(Relation table, string query){ + + /* + So basically this is what's going on: + - Take the table to iterate through, this is the relation (input 1) + - Take a string that will be used for the program to search for in the attributes (input 2) + - Iterate through each attribute until the attribute (string) matches the input query + - For every iterator, have a counter that counts how many attributes are skipped over in the vector until the attribute is found + - This counter will be used to iterate through each vector (row) in the list, skip over that many attributes, and push that into a result vector + - Once all vector's elements at the specified attribute are pushed back, return the result vector + + + for(int i = 0; i < table.getSize(); i++) { + + + } + +} +*/ +//each row in the first table is paired with all the rows in the second table +void DBEngine::productQuery(){ + // +} + +//true if relations have the same # of attributes and each attribute must be from the same domain +bool DBEngine::unionComp(){ + return false; +} diff --git a/db_engine.cpp b/db_engine.cpp deleted file mode 100755 index b88d9d4..0000000 --- a/db_engine.cpp +++ /dev/null @@ -1,143 +0,0 @@ -#include "db_engine.h" - -using namespace std; - -db_engine::db_engine(){ - // -} - -//create a new table in memory -//creates a vector -//DONE -void db_engine::createCmd(string tableName, vector attributes, vector pkeys){ - string output = ""; - output += "CREATE TABLE " + tableName + " ("; - - vector::iterator it = attributes.begin(); - while (it != attributes.end()){ - if (it == attributes.begin()) - if ((it + 1) != attributes.end()) - output += *it + ","; - else - output += *it; - else - output+= " " + *it; - - ++it; - } - - output += ") PRIMARY KEY ("; - - vector::iterator it2 = pkeys.begin(); - while (it2 != pkeys.end()){ - if (it2 == pkeys.begin()) - if ((it2 + 1) != pkeys.end()) - output += *it2 + ","; - else - output += *it2; - else - output+= " " + *it2; - - ++it2; - } - - output += ");"; - - cout << output; - //cmdList.push_back(output); -} - -//open a txt file, parse SQL script, load data in table -//void db_engine::openCmd(){ - // -//} - -//should write cmdList to a .txt file -//DONE -void db_engine::saveCmd(){ - ofstream dbCmdFile; - dbCmdFile.open("dbCmds.txt", ios_base::app); - - vector::iterator it = cmdList.begin(); - while (it != cmdList.end()){ - dbCmdFile << *it << "\n"; - ++it; - } - - cmdList.clear(); -} - -//display the database -//DONE -void db_engine::showCmd(string tableName){ - cmdList.push_back("SHOW " + tableName + ""); -} - -//add a tuple to a table in the memory -//BECCA -void db_engine::insertQuery(){ - //table.push_back(); -} - -//remove a tuple from a table in the memory -//BECCA -void db_engine::deleteQuery(){ - // -} - -//search and return one more tuples from a table in the memory -//WILLIAM -void db_engine::selectQuery(){ - // -} - -//return a subset of attributes (columns) -//BRANDON -vector db_engine::projectQuery(vector< vector > table, vector attributes, string query){ - /* - So basically this is what's going on: - - Take the table to iterate through, this is the 2D vector (input 1) - - Take the vector of attributes that pertains to the respective table (input 2) - - Take a string that will be used for the program to search for in the attributes (input 3) - - In the attributes vector, iterate through each attribute until the attribute (string) matches the input query - - For every iterator, have a counter that counts how many attributes are skipped over in the vector until the attribute is found - - This counter will be used to iterate through each vector (row) in the list, skip over that many attributes, and push that into a result vector - - Once all vector's elements at the specified attribute are pushed back, return the result vector - */ - int counter = 0; //counter for iterating through the attributes, initialized at 0 for reasons - vector result; - - //Loop through the vector until we have found a string in it that matches the query - for(int i=0; i < attributes.size(); i++){ - counter++; - if(attributes[i] == query) - break; - else - continue; - } - - //So let's say we have a 2-D Vector (the table) that contains all of the rows, we iterate through each row - std::vector< std::vector >::const_iterator row; - std::vector::const_iterator col; - - for (row = table.begin(); row != table.end(); ++row) { - //Instead of col != row->end() we have it counter, in order for the program to access the correct data under the correct attribute - for (col = row->begin(); col != counter; col++) { - result.push_back(col); //Now we store that row's attribute into the result vector - } - } - - return result; -} - -//each row in the first table is paired with all the rows in the second table -//BRANDON -vector< vector > db_engine::productQuery(vector< vector > table_1, vector< vector > table_2){ - // -} - -//true if relations have the same # of attributes and each attribute must be from the same domain -//WILLIAM -bool db_engine::unionComp(){ - return false; -} From d28e68beb0f54939cd2557505887b8232e7fe0ce Mon Sep 17 00:00:00 2001 From: Brandon Jackson <1drummer@att.net> Date: Tue, 15 Sep 2015 20:19:49 -0500 Subject: [PATCH 10/22] Update and rename db_engine.h to DBEngine.h --- db_engine.h => DBEngine.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) rename db_engine.h => DBEngine.h (52%) diff --git a/db_engine.h b/DBEngine.h similarity index 52% rename from db_engine.h rename to DBEngine.h index 05e7b60..bd807fe 100755 --- a/db_engine.h +++ b/DBEngine.h @@ -1,19 +1,21 @@ #include #include #include +#include "Relation.h" using namespace std; -class db_engine { - vector cmdList; - //vector> table; +class DBEngine { + //member variables + //NOT DONE + //vector tables; public: - db_engine(); - void createCmd(string tableName, vector attributes, vector pkeys); + DBEngine(); + void createCmd(); //void openCmd(); void saveCmd(); - void showCmd(string tableName); + void showCmd(); void insertQuery(); void deleteQuery(); void selectQuery(); From f748c986fa156e5c33682cb2e87642103e393c00 Mon Sep 17 00:00:00 2001 From: William Bracho Blok Date: Tue, 15 Sep 2015 20:21:19 -0500 Subject: [PATCH 11/22] Update Attribute.h --- Attribute.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Attribute.h b/Attribute.h index 87b2c25..5be40a0 100644 --- a/Attribute.h +++ b/Attribute.h @@ -29,13 +29,18 @@ public: void display() { - cout<<"Atribute name:\t"< v){ this.values = v; From 2b1141bfe7763ced81537203e2c9f15bfe71d958 Mon Sep 17 00:00:00 2001 From: William Bracho Blok Date: Tue, 15 Sep 2015 20:21:50 -0500 Subject: [PATCH 12/22] Update test2.cpp --- test2.cpp | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/test2.cpp b/test2.cpp index 280656a..2a02bcb 100644 --- a/test2.cpp +++ b/test2.cpp @@ -1,7 +1,8 @@ #include //#include "DBEngine.h" #include -#include "Attribute.h" +//#include "Attribute.h" +#include "Relation.h" using namespace std; @@ -23,4 +24,25 @@ int main() { atributo.initializeAttribute("atributo",shamWow); atributo.display(); + + vector doom; + doom.push_back("zombieman"); + doom.push_back("revenant"); + doom.push_back("imp"); + doom.push_back("archvile"); + + Attribute atributo2; + atributo2.initializeAttribute("atributo2",doom); + + atributo2.display(); + + vector setOfAttributes; + vector attNames; + attNames.push_back("attName1"); + attNames.push_back("attName2"); + + Relation myLittleRelation; + myLittleRelation.initializeRelation("randomName", attNames, setOfAttributes); + + myLittleRelation.display(); } From c052e7cbf09b7922b7d37dafb098c78e70faa847 Mon Sep 17 00:00:00 2001 From: William Bracho Blok Date: Tue, 15 Sep 2015 20:23:47 -0500 Subject: [PATCH 13/22] Create Relation.h --- Relation.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Relation.h diff --git a/Relation.h b/Relation.h new file mode 100644 index 0000000..69ccfea --- /dev/null +++ b/Relation.h @@ -0,0 +1,45 @@ +#include +#include +#include "Attribute.h" + +using namespace std; + +//NOT DONE +class Relation { + //a table with rows and columns + string name; //the name of the relation (table) + vector att; + vector attributeNames; + +public: + //Relation(); + + void initializeRelation(string n, vector attNames, vector a) + { + attributeNames = attNames; + name = n; + att = a; + } + + void addTuple(vector< Attribute> tuple); + + void display() + { + cout<<"\n\nDisplay of relation--------------------------------"< Date: Tue, 15 Sep 2015 20:35:43 -0500 Subject: [PATCH 14/22] Update Attribute.h --- Attribute.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Attribute.h b/Attribute.h index 5be40a0..b57879e 100644 --- a/Attribute.h +++ b/Attribute.h @@ -29,8 +29,8 @@ public: void display() { - cout<<"\nAtribute name:\t"< Date: Tue, 15 Sep 2015 20:36:07 -0500 Subject: [PATCH 15/22] Update test2.cpp --- test2.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test2.cpp b/test2.cpp index 2a02bcb..0167b02 100644 --- a/test2.cpp +++ b/test2.cpp @@ -37,6 +37,9 @@ int main() { atributo2.display(); vector setOfAttributes; + setOfAttributes.push_back(atributo); + setOfAttributes.push_back(atributo2); + vector attNames; attNames.push_back("attName1"); attNames.push_back("attName2"); From b2fa6c1a556167f37e7051581ba25abb0beb523e Mon Sep 17 00:00:00 2001 From: William Bracho Blok Date: Tue, 15 Sep 2015 20:36:33 -0500 Subject: [PATCH 16/22] Update Relation.h --- Relation.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Relation.h b/Relation.h index 69ccfea..8668481 100644 --- a/Relation.h +++ b/Relation.h @@ -32,12 +32,7 @@ public: cout<<"\nAttribute name: "< Date: Tue, 15 Sep 2015 20:55:21 -0500 Subject: [PATCH 17/22] attribute works as expects --- Attribute.h | 25 ++++++++++++++++++------- Relation.h | 14 ++++++++------ a.out | Bin 0 -> 29594 bytes test.cpp | 38 ++++++++++++-------------------------- 4 files changed, 38 insertions(+), 39 deletions(-) create mode 100755 a.out diff --git a/Attribute.h b/Attribute.h index 9d53d4c..2c51e1b 100755 --- a/Attribute.h +++ b/Attribute.h @@ -9,25 +9,36 @@ using namespace std; class Attribute { //a named column of a relation string name; - - bool isKey; + string type; + bool key; int size; public: vector values; - - void initializeAttribute(string n, vector a){ - + + Attribute(string n, string t, bool k){ name = n; - values = a; + type = t; + key = k; + size = 0; + } + + void addRow(string v) { + values.push_back(v); } string getName(){ return name; } - Attribute(){ } + string getType(){ + return type; + } + + bool isKey(){ + return key; + } void display() { diff --git a/Relation.h b/Relation.h index c41db03..568f020 100755 --- a/Relation.h +++ b/Relation.h @@ -6,21 +6,19 @@ using namespace std; //NOT DONE class Relation { - //a table with rows and columns string name; //The title the user gives it - vector< Attribute > att; //A vector of the columns + vector att; //A vector of the columns public: Relation(); //constructor - Relation(string n, vector< Attribute > a) { + Relation(string n, vector a) { name = n; att = a; - } + } void addTuple(vector< string > tuple) { - //Loop through the attribute columns for(int i = 0; i < att.size(); i++) { @@ -28,11 +26,15 @@ public: for(int j = 0; j < att[i].values.size(); j++){ //In this column, at this element's spot, assign an element from the tuple vector to this spot - (att[i].values[j]).assign(tuple[i]); + att[i].addRow(tuple[i]); } } } + string getTableName() { + return name; + } + void displayTableName() { cout << "The table name is: " << name << endl; } diff --git a/a.out b/a.out new file mode 100755 index 0000000000000000000000000000000000000000..d8082f0af5f9dda34369707a36b35b40de1e84a9 GIT binary patch literal 29594 zcmeHwdwf*Yz3-Zt3=9zS0I>+PMvRCGArHWSC<94wq5&cyEn0Ol$qXc#WYWwe1TO25D56R$-D8!K~Wm4fv#Wdj- z7mGz=3NTLm-I79R#xy*wRBPx`d=9`2{7da7qSWq|5e?^?XrZCDkdXPsf?GvR*ty(H zYA8gWL{N^lj$I~`fORsWp`q-UL!)HKlSiT{x9D=21gw)04TqFr8tU><4gXt|-Ys@F zQcSxE#C7r*gF4&lKZN~^-@nLYxPOsbMl@Wk^l7N&u7(`#{Io&axmo3xu3mCfej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b0..03a58ce 100755 --- a/test.cpp +++ b/test.cpp @@ -5,40 +5,26 @@ using namespace std; -int main() { +int main() { + Attribute atributo("shamWow", "VARCHAR(10)", false); - /* - DBEngine engine; - Relation r; - Attribute a; - */ + atributo.addRow("rag"); + atributo.addRow("sponge"); + atributo.addRow("wooow"); + atributo.addRow("cloth"); - vector shamWow; - shamWow.push_back("rag"); - shamWow.push_back("sponge"); - shamWow.push_back("wooow"); - shamWow.push_back("cloth"); - - Attribute atributo; - atributo.initializeAttribute("atributo",shamWow); atributo.display(); - vector doom; - doom.push_back("zombieman"); - doom.push_back("revenant"); - doom.push_back("imp"); - doom.push_back("archvile"); + Attribute atributo2("doom", "VARCHAR(20)", false); + + atributo2.addRow("zombieman"); + atributo2.addRow("revenant"); + atributo2.addRow("imp"); + atributo2.addRow("archvile"); - Attribute atributo2; - atributo2.initializeAttribute("attribute_2", doom); atributo2.display(); - - - string line1 = "Table_1"; - - //Relation r(line1, my_attributes); } From e90e0c990f9c3f90c3200d60f8f12d7213beadb5 Mon Sep 17 00:00:00 2001 From: William Bracho Blok Date: Tue, 15 Sep 2015 21:03:01 -0500 Subject: [PATCH 18/22] Update Relation.h --- Relation.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Relation.h b/Relation.h index 8668481..6f69bfa 100644 --- a/Relation.h +++ b/Relation.h @@ -21,7 +21,16 @@ public: att = a; } - void addTuple(vector< Attribute> tuple); + void addTuple(vector tuple) + { + else + { + for(int i = 0; i < att.size(); ++i) //for all the attributes + { + att[i].pushBack(tuple[i]); + } + } + } void display() { From 6004fe724f5d771999d1c05bb6e65ea8ba2804ab Mon Sep 17 00:00:00 2001 From: William Bracho Blok Date: Tue, 15 Sep 2015 21:03:35 -0500 Subject: [PATCH 19/22] Update test2.cpp --- test2.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test2.cpp b/test2.cpp index 0167b02..1c23c06 100644 --- a/test2.cpp +++ b/test2.cpp @@ -47,5 +47,14 @@ int main() { Relation myLittleRelation; myLittleRelation.initializeRelation("randomName", attNames, setOfAttributes); + + //adding tuple business----------------------- + + vector tuple; + tuple.push_back("hadoken"); + tuple.push_back("soryuken"); + + myLittleRelation.addTuple(tuple); + myLittleRelation.display(); } From 70e29704301f9c16d5c608ec3a448801b29b5828 Mon Sep 17 00:00:00 2001 From: William Bracho Blok Date: Tue, 15 Sep 2015 21:04:08 -0500 Subject: [PATCH 20/22] Update Attribute.h --- Attribute.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Attribute.h b/Attribute.h index b57879e..92c435b 100644 --- a/Attribute.h +++ b/Attribute.h @@ -41,6 +41,11 @@ public: { return values.size(); } + + void pushBack(string s) + { + values.push_back(s); + } /* Attribute(vector v){ this.values = v; From 92a5ba2e9388746268e52b43f0c15b03d1f645b1 Mon Sep 17 00:00:00 2001 From: Rebecca Schofield Date: Tue, 15 Sep 2015 21:13:15 -0500 Subject: [PATCH 21/22] updated DB engine --- DBEngine.h | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/DBEngine.h b/DBEngine.h index 32e96c2..e889297 100755 --- a/DBEngine.h +++ b/DBEngine.h @@ -5,21 +5,17 @@ using namespace std; -class DBEngine { - //member variables - //NOT DONE - //vector tables; +class DBEngine { + vector tables; public: DBEngine(); - void createCmd(); - //void openCmd(); - void saveCmd(); - void showCmd(); - void insertQuery(); - void deleteQuery(); - void selectQuery(); - void projectQuery(); - void productQuery(); - bool unionComp(); + + void addRelation(Relation r) { + tables.push_back(r); + } + + vector getRelations() { + return tables; + } }; From dce018766019028ef22322c8fa3128bc2c2f991e Mon Sep 17 00:00:00 2001 From: Rebecca Schofield Date: Tue, 15 Sep 2015 21:33:15 -0500 Subject: [PATCH 22/22] new framework --- DBEngine.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/DBEngine.h b/DBEngine.h index b621ed4..ed5de9c 100755 --- a/DBEngine.h +++ b/DBEngine.h @@ -22,14 +22,14 @@ public: tables.push_back(r); } - void showTable() {} - void saveToFile() { /*???*/ } - void insertTuple() {} - void deleteTuple() {} - void selectTuples() {} - void project() {} - void product() {} - void unionComp() {} + void showTable() { /*Becca*/ } + void saveToFile() { /*Becca*/ } + void insertTuple() { /*William*/ } + void deleteTuple() { /*William*/ } + void selectTuples() { /*Becca*/ } + void project() { /*Brandon*/ } + void product() { /*Brandon*/ } + void unionComp() { /*William*/ } vector getRelations() {