This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
dmspine64backup/DBEngine.h

43 lines
1.2 KiB
C
Raw Normal View History

2015-09-25 00:30:32 -05:00
#pragma once
2015-09-15 16:30:25 -05:00
#include <fstream>
#include <iostream>
#include <vector>
#include "Relation.h"
2015-09-15 23:48:50 -05:00
//still in progress
2015-09-17 18:30:45 -05:00
class DBEngine{
2015-09-15 21:31:19 -05:00
vector<Relation> tables;
2015-09-25 00:30:32 -05:00
vector<string> commands;
2015-09-15 23:48:50 -05:00
int size;
2015-09-25 00:30:32 -05:00
2015-09-15 16:30:25 -05:00
public:
2015-09-17 18:30:45 -05:00
DBEngine();
void createTable(string n);
void createTable(string n, vector<Attribute> a);
void createTable(Relation r);
void insertValues(string r, vector <string> v);
2015-09-17 18:30:45 -05:00
vector<Relation> getRelations();
//void showTable(Relation r);
2015-09-22 09:03:42 -05:00
Relation& getTableFromName(string n);
2015-09-17 18:30:45 -05:00
void saveToFile(vector<string> cmds);
2015-09-25 00:30:32 -05:00
Relation selection(string attName, string s, Relation r);
2015-09-17 18:30:45 -05:00
Relation projection(vector<string> input, Relation r);
<<<<<<< HEAD
2015-09-25 00:30:32 -05:00
Relation product(string s1, Relation r1, Relation r2);
2015-09-28 16:18:49 -05:00
void rename(Relation& r, vector<string> oldnames, vector<string> newnames);
2015-09-25 00:30:32 -05:00
void save();
2015-09-28 16:18:49 -05:00
void save(string n);
void storeCommands(string s);
Relation setUnion(Relation r1, Relation r2);
2015-09-17 18:30:45 -05:00
//void setDiff();
2015-09-25 00:30:32 -05:00
//void crossProduct();
=======
2015-09-25 00:30:32 -05:00
void save();
2015-09-28 15:57:57 -05:00
void storeCommands(string s);
2015-09-22 09:03:42 -05:00
void rename(Relation& r, vector<string> oldnames, vector<string> newnames);
2015-09-24 21:00:31 -05:00
Relation setUnion(Relation r1, Relation r2);
2015-09-26 07:09:44 -05:00
Relation setDiff(Relation r1, Relation r2);
Relation crossProduct(Relation r1, Relation r2);
>>>>>>> master
2015-09-15 16:30:25 -05:00
};