#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< string > tuple) { if(tuple.size() != att.size()){ cout << "\n ERROR" << endl; } else { //Loop through the attribute columns for(int i = 0; i < att.size(); i++) { att[i].pushBack(tuple[i]); } } } void projectQuery(string input) { cout << "-----------Initiated Query Projection---------" << endl; for(int i = 0; i < att.size(); i++) { if(att[i].getName() == input) { cout << "Column Title: " << input << endl; for(int j = 0; j < att[i].getSize(); j++) { cout << att[i].values[j] << endl; } break; } else cout << "Attribute input not valid" << endl; } } void display() { cout<<"\n\nDisplay of relation--------------------------------"<