From 7d858e8b10463e2cb1cdd27e9b3a76e5132d3c57 Mon Sep 17 00:00:00 2001 From: Brandon Jackson <1drummer@att.net> Date: Tue, 15 Sep 2015 23:48:50 -0500 Subject: [PATCH] Update DBEngine.h --- DBEngine.h | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/DBEngine.h b/DBEngine.h index dadb143..57ea9d8 100755 --- a/DBEngine.h +++ b/DBEngine.h @@ -3,10 +3,10 @@ #include #include "Relation.h" -//still in progress +//still in progress class DBEngine { vector 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 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 table1_stuff; + + + return temp; + } + */ bool unionComp(Relation r1, Relation r2) { return ((r1.getSize() == r2.getSize()) && (r1.getDomains() == r2.getDomains()));