Update DBEngine.h

This commit is contained in:
Brandon Jackson 2015-09-15 23:48:50 -05:00
parent e2776d2459
commit 7d858e8b10

View file

@ -3,10 +3,10 @@
#include <vector>
#include "Relation.h"
//still in progress
//still in progress
class DBEngine {
vector<Relation> tables;
int size;
int size;
public:
DBEngine(){
@ -55,7 +55,24 @@ public:
void project(Relation r, string n) { r.projectQuery(n); }
void product() { /*Brandon*/ }
/*
Relation product(string p_name, Relation table_1, Relation table_2) {
vector<Attribute> all_att;
//Insert table 1 attributes
all_att.insert(all_att.begin(), (table_1.getAttributes()).begin(), (table_1.getAttributes()).end());
//Insert table 2 attributes
all_att.insert(all_att.begin(), (table_2.getAttributes()).begin(), (table_2.getAttributes()).end());
Relation temp(p_name, all_att);
vector<string> table1_stuff;
return temp;
}
*/
bool unionComp(Relation r1, Relation r2) {
return ((r1.getSize() == r2.getSize()) && (r1.getDomains() == r2.getDomains()));