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/OUTPUT.txt
Rebecca Schofield 38a4fdefe3 more testing
2015-09-15 23:13:28 -05:00

45 lines
1,020 B
Text
Executable file

Assuming previously defined Attribute, compiled in a vector known as 'vec' and with subsequent numbers added
To create a table:
engine.createTable("table1", vec);
This creates a Relation object with the appropriate Attribute objects. It displays nothing.
To display the table:
engine.showTables(engine.getTableFromName("table1"));
This results in such output:
Display of relation--------------------------------
Relation name: table1
Attribute name: name
Elements: Fry Bender Leela Zoidberg
Attribute name: age
Elements: 22 5 22 50
With table3 having an equal domain to table1, this:
cout << engine.unionComp(engine.getTableFromName("table1"), engine.getTableFromName("table3"));
This will display:
1
To project a table's column:
engine.project((engine.getTableFromName("table1")), "name");
This will display:
-----------Initiated Query Projection---------
Column Title: name
Fry
Bender
Leela
Zoidberg