Hypercube from database
There exist typical operation of looking database table as hypercube:
one column contains value in node of multidimensional cube, other columns - specify multidimensional coordinates
(smaller quantity of coordinate items is shown in browser, bigger quantity is still not inquired from database).
Example of so hypercube is displayed below, where
"h" and "H" - are headers of dimensions (e.g. "customer", "goods", "city", etc),
"v" and "V" - are items of multidimensional coordinates (names of cumtomer, names of goods, names of cities),
"a" - is value in node of multidimensional cube.
-----------------------------------------------------
| | H | V | V |
| -----------------------------------------
| | H | V | V | V | V |
| -----------------------------------------
| | H | V | V | V | V | V | V | V | V | V |
-----------------------------------------------------
| h | h | h |
------------- -------------------------------------
| | | v | | a | a | a | a | a | a | a | a | a |
| | |---| |-----------------------------------|
| | v | v | | a | a | a | a | a | a | a | a | a |
| | |---| |-----------------------------------|
| v | | v | | a | a | a | a | a | a | a | a | a |
| |---|---| |-----------------------------------|
| | | v | | a | a | a | a | a | a | a | a | a |
| | v |---| |-----------------------------------|
| | | v | | a | a | a | a | a | a | a | a | a |
|---|---|---| |-----------------------------------|
| | | v | | a | a | a | a | a | a | a | a | a |
| | |---| |-----------------------------------|
| | | v | | a | a | a | a | a | a | a | a | a |
| | v |---| |-----------------------------------|
| | | v | | a | a | a | a | a | a | a | a | a |
| | |---| |-----------------------------------|
| | | v | | a | a | a | a | a | a | a | a | a |
| |---|---| |-----------------------------------|
| v | | v | | a | a | a | a | a | a | a | a | a |
| | |---| |-----------------------------------|
| | v | v | | a | a | a | a | a | a | a | a | a |
| | |---| |-----------------------------------|
| | | v | | a | a | a | a | a | a | a | a | a |
| |---|---| |-----------------------------------|
| | | v | | a | a | a | a | a | a | a | a | a |
| | v |---| |-----------------------------------|
| | | v | | a | a | a | a | a | a | a | a | a |
------------- -------------------------------------
We enter html-element dialogue, displaying records of database table as hypercube
(that database table is demonstrated especially so,
instead of representation as table or tree,
property type must be equal cube).
In attribute roll, we specify name of database table
<dialogue roll="A"/>
dialogue {
type: cube;
}
or SQL-request
<dialogue roll="select * from A where a15=100"/>
dialogue {
type: cube;
}
and in properties
- thead1 - name of column, containing items for 1-st horizontal dimension
- thead2 - name of column, containing items for 2-nd horizontal dimension
- thead3 - name of column, containing items for 3-rd horizontal dimension
- etc
- tside1 - name of column, containing items for 1-st vertical dimension
- tside2 - name of column, containing items for 2-nd vertical dimension
- tside3 - name of column, containing items for 3-rd vertical dimension
- etc
- tbody - name of column, containing values in nodes of multidimensional cube
dialogue {
thead1: §a3;
thead2: §a4;
thead3: §a9;
tside1: §a3;
tside2: §a2;
tside3: §a5;
tbody: §a7;
}
and also
- address - domain name or IP-address of DBMS
(by default it's the same address, from which html-document is obtained)
- size - quantity of simultaneously displayed items
for last horizontal and for last vertical dimensions, i.e. width and height of html-element
- type=cube
Connection with database occurs via separate TCP-port by protocal SQL5.
When browser meets this html-element during loading document, it:
- reads first portions of items for each dimension
(if column, containing item, simultaneously refers to some master table, then
reads records of this tables,
demonstrates value of second its field as item,
specifies name of this table as header of dimension)
select * from A limit 50;
than reads valus in node of multidimensional cube, corresponding to these items
- ask quantity of items for last horizontal and last vertical dimensions
(to display in sliders)
Note: field of view A refers to the same column of some table C,
to which field of table B, entered into view, refers.
Displayed values are demonstrated so:
P.S.
dialogue with any value of property type
(equal to record, tree, or cube)
can be master html-element for
dialogue with any value of property type.
Html-document itself, requests from all dialogue, containing in it,
answers to request go sequentially via the same TCP-connection
(answers are separated from each other and from html-document by bament
<?new/?>,
answers come after end of accepting html-document).
Dmitry Turin