[Net 2000 Ltd. Home][DataBee Home][DataBee Manual][DataBee FAQ]
About DataBee Extraction Set Rules
A DataBee extraction set can contain two types of rule. The most common are Table-To-Table rules which define relationships
between tables. WHERE Clause rules, which DataBee processes first, are used to define the rows which
initially load the tables. Once all of the initial rows have been retrieved, DataBee will use the
Table-To-Table rules to find the data in the remaining tables in the schema required to support those rows.
- WHERE Clause Rules
- DataBee Extraction Set WHERE Clause rules are used to define the initial set of extracted rows for a table.
In a sense, they provide the initial conditions for the extract. Think of it like this: DataBee uses the Table-To-Table
rules to make sure every table contains the rows it needs in order to support the other tables. It is kind of
similar to balancing a set of scales. If no tables have any rows then they will all be in balance - but the
database is empty. The WHERE Clause rules provide the initial data to a few tables - this puts the system
temporarily out of balance until the Table-To-Table rules are used. By the time the Table-To-Table rules
have finished working, the system contains the appropriate rows in every table and a database subset has
been extracted.
There can be any number of WHERE Clause rules providing any number of initial conditions.
- Table-To-Table Rules
- A DataBee extraction set Table-To-Table rule defines a data relationship between two tables. Essentially a Table-To-Table rule
says " based on this join condition extract all the rows from table B needed to support the rows
already retrieved for table A". In DataBee terminology table A would be known as the Parent table
(its rows must be supported by another table), and table B would be the Child (its rows must support the Parent table).
A shorthand notation for this rule is A->B. Note that the direction of the arrow always points from the Parent
to the Child table and can be thought of as meaning "rows in Table A require rows to be in Table B".
In DataBee versions 3.0 (and greater) Table-To-Table rules can be defined between tables which are located in different schemas.
The Extraction Process
Extraction is an iterative process which processes each rule in sequence. Consider the following example:
Table A might have received an initial set of rows from a WHERE Clause rule. Because of a defined A->B rule the
required rows in table B will be retrieved.
If table B also
has a rule that require rows from another table (table C for example) the new rows
just extracted into table B to satisfy the Table A to B rule (A->B) would be used as a base for the retrieval
of the necessary rows from table C. It is quite possible (common really) for rule loops to occur (A->B, B->C then C->A).
If such a loop occurs, and table C does have a rule that requires rows from table A, DataBee will retrieve the
necessary additional rows from table A. The rows that table A already has will not be retrieved - doing so would set off
an endless loop and be inefficient as well.
Of course because more rows have been retrieved for table A then
table B will have to be re-checked (because of the A->B rule). DataBee will continue to cycle through its
list of rules until all tables are in balance and no table has a rule that has not retrieved all of the rows
it requires.
[Net 2000 Ltd. Home][DataBee Home][DataBee Manual][DataBee FAQ]