46 lines
856 B
C++
Executable file
46 lines
856 B
C++
Executable file
#include <fstream>
|
|
#include <iostream>
|
|
#include <vector>
|
|
#include "Relation.h"
|
|
|
|
//still in progress
|
|
class DBEngine {
|
|
vector<Relation> tables;
|
|
int size;
|
|
|
|
public:
|
|
DBEngine(){
|
|
size = 0;
|
|
}
|
|
|
|
void createTable(string n, vector<Attribute> a) {
|
|
Relation r(n, a);
|
|
tables.push_back(r);
|
|
}
|
|
|
|
void createTable(Relation r) {
|
|
tables.push_back(r);
|
|
}
|
|
|
|
void showTables(String name) {
|
|
for(int i = 0; i < tables.size(); i++) {
|
|
if (tables.getTableName() == name) {
|
|
name.display();
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
void saveToFile() { /*Becca*/ }
|
|
void insertTuple() { /*William*/ }
|
|
void deleteTuple() { /*William*/ }
|
|
void selectTuples() { /*Becca*/ }
|
|
void project() { /*Brandon*/ }
|
|
void product() { /*Brandon*/ }
|
|
void unionComp() { /*William*/ }
|
|
|
|
|
|
vector<Relation> getRelations() {
|
|
return tables;
|
|
}
|
|
};
|