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/Relation.h
William Bracho Blok c052e7cbf0 Create Relation.h
2015-09-15 20:23:47 -05:00

45 lines
827 B
C++

#include <iostream>
#include <vector>
#include "Attribute.h"
using namespace std;
//NOT DONE
class Relation {
//a table with rows and columns
string name; //the name of the relation (table)
vector<Attribute> att;
vector<string> attributeNames;
public:
//Relation();
void initializeRelation(string n, vector<string> attNames, vector<Attribute> a)
{
attributeNames = attNames;
name = n;
att = a;
}
void addTuple(vector< Attribute> tuple);
void display()
{
cout<<"\n\nDisplay of relation--------------------------------"<<endl;
cout<<"Relation name: "<<name<<endl;
for (int i = 0; i < attributeNames.size(); ++i)
{
cout<<"\nAttribute name: "<<attributeNames[i]<<": ";
/*
for (int i = 0; i < att[i].getSize(); ++i)
{
//cout<<" "<<att[i]<<" ";
}
*/
}
}
};