Update DBEngine.h
This commit is contained in:
parent
e2776d2459
commit
7d858e8b10
1 changed files with 20 additions and 3 deletions
23
DBEngine.h
23
DBEngine.h
|
@ -3,10 +3,10 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "Relation.h"
|
#include "Relation.h"
|
||||||
|
|
||||||
//still in progress
|
//still in progress
|
||||||
class DBEngine {
|
class DBEngine {
|
||||||
vector<Relation> tables;
|
vector<Relation> tables;
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DBEngine(){
|
DBEngine(){
|
||||||
|
@ -55,7 +55,24 @@ public:
|
||||||
|
|
||||||
void project(Relation r, string n) { r.projectQuery(n); }
|
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) {
|
bool unionComp(Relation r1, Relation r2) {
|
||||||
return ((r1.getSize() == r2.getSize()) && (r1.getDomains() == r2.getDomains()));
|
return ((r1.getSize() == r2.getSize()) && (r1.getDomains() == r2.getDomains()));
|
||||||
|
|
Reference in a new issue