Turtle DB
A mini DDBMS
ca.uqac.dim.ddb.Engine Class Reference

List of all members.

Public Member Functions

 Engine ()
void put (String name, Relation r)
Table evaluate (Relation query)
Table evaluate (String s)
Table evaluate (Document d)
int getStorageSize ()
int getTuplesReceived ()

Protected Attributes

Map< String, Relationm_tables
int m_tuplesReceived

Detailed Description

An engine does two things:

  1. It locally hosts relations (or fragments thereof)
  2. It receives relational query trees and evaluates them against the locally-hosted relations, then outputs the resulting relation
Author:
sylvain

Constructor & Destructor Documentation

Instantiates a new database query engine.


Member Function Documentation

Locally evaluates a query

Parameters:
queryThe query XML document
Returns:
A new table containing the results of that query

Locally evaluates a query

Parameters:
sThe query string
Returns:
A new table containing the results of that query

Returns the total number of tuples hosted locally by this database engine. This can be used, in conjunction with getTuplesReceived, to compute cost metrics.

Returns:
The number of tuples

Returns the number of tuples this engine received from the outside world. This can be used, in conjunction with getStorageSize, to compute cost metrics.

Returns:
The number of tuples
void ca.uqac.dim.ddb.Engine.put ( String  name,
Relation  r 
)

Stores a new relation within the engine. Normally one would only store instances of Table here (although any relation can be passed).

Parameters:
nameThe relation's name
rThe relation

Member Data Documentation

Map<String,Relation> ca.uqac.dim.ddb.Engine.m_tables [protected]

The documentation for this class was generated from the following file: