List of articles   Terminology   Choose language


The most typical data


Difference between XML-data and XML-requests

Through HTTP-protocol, browser can sends xml-data, Which should be memorized - it sends them from form, and can sends requests themselves, written by xml - it sends them from auto-table and from auto-tree. DBMS receives both of them through HTTP-protocol, but it's necessary to direct xml-data into one engine, and xml-requests - into other. To this delimitation is possible, xml-messages differ by root sag: it is formdata in XML-data, and it is tabledata (for auto-table) or treedata (for auto-tree) in XML-requests. Xml-data call trigger, hung on operation 'insert' into table 'formdata', which is written by mixture of DML and TML, and xml-requests are executed as is, if they correspond to standart MTD (most typical data):

Content of request (i.e. tabledata and its sub-trees, treedata and its sub-trees) are written into database before executing request in the same way, as it is make for formdata.

User name and password for database is asked through HTTP.

MTD, executed in database, is commited automatically.

Switching-off of MTD

To switch-off reaction of MTD at tabledata, it's enough to hang trigger on operation 'insert' into 'tabledata' (trigger can be written by mixture of DML and TML).

create trigger TriggerName for tabledata
after insert as begin
-- empty trigger
end;;

To switch-off reaction of MTD at treedata, it's enough to hang trigger on operation 'insert' into 'treedata' (trigger can be written by mixture of DML and TML).

create trigger TriggerName for treedata
after insert as begin
-- empty trigger
end;;

Order of sorting for MTD

Records of table are sorted by all indexes, existing for it. Width of index is quantity of columns, used in it. Closeness of index is quantity of permutations, by which order of following of columns in index can be brought to order of following of columns in table. Sorting is executed:

Types of requests

Tabledata

Single table

Request of browser

<tabledata>
  <_ name="A" event="TableDown" arg="50">
</tabledata>
means requirement to send first 50 records, accessable to concrete user, of table (or view-), which has name 'A' (name and password of user are transferd through HTTP). DBMS sends records as sags, name of which coincide with name of table (view), and names of seributes of which coincide with names of fields of table (view).
<a a1="v1_1"  a2="v1_2"  a3="v1_3" >
<a a1="v2_1"  a2="v2_2"  a3="v2_3" >
...
<a a1="v50_1" a2="v50_2" a3="v50_3">
Simultaneously with data, browser can ask quantity of records in table by request
<tabledata>
  <_ name="A" event="TableDown" arg="50">
  <_ name="A" event="count">
</tabledata>
and server sends answer
<a a1="v1_1"  a2="v1_2"  a3="v1_3" >
<a a1="v2_1"  a2="v2_2"  a3="v2_3" >
...
<a a1="v50_1" a2="v50_2" a3="v50_3">
<_ name="A" event="count" arg="10 000">

Requests

<tabledata>
  <_ name="A" event="TableDown" arg="50">
  <a a1="v1_50" a2="v2_50" a3="v3_50">
</tabledata>
and
<tabledata>
  <_ name="A" event="TableUp" arg="50">
  <a a1="v1_51" a2="v2_51" a3="v3_51">
</tabledata>
means accordingly requirements to send 50 records after or before specified record.

Request

<tabledata>
  <_ name="A" event="TableDelete">
  <a a1="v1_2" a2="v2_2" a3="v3_2">
</tabledata>
means requirement to delete specified record, and server sends answer
<ok>
or
<miss>
And request (if value of name of sag file contains name of seribute, e.g. a3, and besides that, value of filename of sag file is equal to value of seribute a3, than server consider, that mentioned file is content of seribute)
<tabledata>
  <_ name="A" event="TableInsert">
  <a a1="v1_new" a2="v2_new" a3="tiger.jpg">
  <file    name="a3"   filename="tiger.jpg">Y29udGVudHMgb2YgZmlsZTEudHh0</file>
</tabledata>
means requirement to insert specified record, and server sends answer
<ok>
or
<miss>
Request
<tabledata>
  <_ name="A" event="TableUpdate">
  <a a1="v1_3"       a2="v2_3" a3="v3_3">
  <a a1="v1_changed" a2="v2_3" a3="tiger.jpg">
  <file        name="a3" filename="tiger.jpg">Y29udGVudHMgb2YgZmlsZTEudHh0</file>
</tabledata>
means requirement to change first of specified records (it must be in database) by second record. Server sends answer
<ok>
or
<miss>

Relation "masterS-subordinate" between tables

Request

<tabledata>
  <_ name="S" event="TableDown" arg="40">
  <m m1="v15_1"  m2="v15_2"  m3="v15_3">
  <n n1="v23_1"  n2="v23_2"  n3="v23_3">
  <p p1="v47_1"  p2="v47_2"  p3="v47_3">
</tabledata>
means, that Server answers in usual way
<s s1="v1_1"  s2="v1_2"  s3="v1_3" >
...
<s s1="v40_1" s2="v40_2" s3="v40_3">

Special request to single table

Request

<tabledata>
  <_ name="B" event="SelectDown" arg="40">
</tabledata>
means the same, as request
<tabledata>
  <_ name="B" event="TableDown" arg="40">
</tabledata>
but answer must be sent in special way
<option value="subs1" >word1 <option>
<option value="subs2" >word2 <option>
<option value="subs3" >word3 <option>
...
<option value="subs40">word40<option>
Simultaneously with data, browser can ask quantity of rows in table by request
<tabledata>
  <_ name="B" event="SelectDown" arg="40">
  <_ name="B" event="count">
</tabledata>
and server sends answer
<option value="subs1" >word1 <option>
<option value="subs2" >word2 <option>
<option value="subs3" >word3 <option>
...
<option value="subs40">word40<option>
<_ name="B" event="count" arg="100">
Requests
<tabledata>
  <_ name="B" event="SelectDown" arg="40">
  <option id="id40" value="subs40">word40<option>
</tabledata>
and
<tabledata>
  <_ name="B"  event="SelectUp" arg="40">
  <option id="id41" value="subs41">word41<option>
</tabledata>
means accordingly requirements to send 40 records after or before specified record.

Request

<tabledata>
  <_ name="B" event="SelectDownRough" arg="40" arg2="word">
</tabledata>
asks And requests
<tabledata>
  <_ name="B" event="SelectDownRough" arg="40" arg2="word">
  <option value="subs40">word40<option>
</tabledata>
and
<tabledata>
  <_ name="B" event="SelectUpRough" arg="40" arg2="word">
  <option value="subs40">word40<option>
</tabledata>
mean accordingly requirements to send 40 "rough equal" records, which are after or before specified "rough equal" record.

Treedata

Request of browser

<treedata>
  <_ name="A" event="TreeClick" arg="2">
</treedata>
means, that Thus server answers
  <li id=3           > folder_name3 </li>
  <li id=4 filled=yes> folder_name4 </li>

Requests

<treedata>
  <_ name="A" event="TreeDrag" arg="3">
  <_ name="A" event="TreeDrop" arg="5">
</treedata>
and
<treedata>
  <_ name="A" event="TreeCopy" arg="3">
  <_ name="A" event="TreeDrop" arg="5">
</treedata>
mean accordingly requirement to assign value "5" into field 'fk' of record, in which field 'pk'=3, and requirement to copy record, in which field 'pk'=3, and to assign 'fk'=5 in copy - and to send confirmation
<ok>
or
<miss>

Dmitry Turin



List of articles   Terminology   Choose language


Сайт управляется системой uCoz