Own conception vs. foreign: client, moving around database scheme
This article proposes other possible decision of problems, formulated in
previous work. We recall, that speach goes about refusal to customize a complex foreign application. In this paper for this refusal, author proposes fast way to fill database by special client, written once and forever for all database schemes. Idea consists of:
- only one table is presented on client screen of in each moment
[1]
- client screen displays other table at click on field, referring to other table. We shall name this transition as
relay-race transition
[2]
- table in client is supplemented by virtual fields (not existing in database table), which are virtual links to tables, referencing to this table by real foreing keys (there are so much virtual fields, how much tables references to this table). Client screen displays other table, represented by virtual field, at click on this virtual field (thus client is forced to load database scheme from its system tables to know, what tables refer to this table). We shall name this transition as
set's transition
[3]
It is possible to edit records in client, to add new records, to remove records
[4]. And pressing
botton "Choice" on some record
after relay-race transition returns to displaing previous table and copying primary key of chosen record into referring field of previous record. Such approach allows
do without programmer at all - user simply travels on database, in which nothing is programmed
[5]. For convenience of user:
- only one record, which was refered, is displayed just after relay-race transition. Pressing
button "All" in menu of program-client displays all records of table, in which this record is, beginning this record
[6] (it is possible to make scrolling upwards to look, what records are above this record)
- only refering records are displayed just after set's transition. Pressing
button "All" in menu of program-client displays all records of table, in which there records are, and these records will be emphasized by color
Table can be displayed by one of three ways: with substituting value from other table instead of referring field into
body or into
header of table, and at presence of reference from table to itself - with demonstrating table as
table or as
tree (way is specified in a system table
[7]).
Whole
period of work of program-client is one long transaction. At exit from program, it will ask to commit or to rollback changes, made during its work. Besides this,
each screen of program is savepoint of DBMS: pressing
button "Back", user not only comes back to previous screen, but also rollback all changes, made in last screen
[8]. Also for his convenience, it is desirable for program-client:
- to journalize all actions, made by user in screen - and to have
button "Next" to execute them once again, if user has rollbacked transaction by button "Back"
- to have
button "Commit", commiting transaction in current state
User will create a database scheme faster, than he will adjust a foreign software. And programming is unnecessary at all to fill scheme.
P.S.
Invisibility of some records for operator SELECT is reached by introducing field of enumerable (integer) datatype and is stated in detail in part "Right for each record" of separate
presentation
[9]. Invisibility of some columns of table for operator SELECT is reached by expression like "REVOKE select ON TABLE tab/@fld TO username".
All proposals are public domain.
[1] Table is displayed with scrolling, column of primary key is not shown. Table, displayed just after loading of program-client, is specified in a system table of DBMS - client reads its name from system table, and requests exactly it
[2] Term obtains own origin from slide #8 of
presentation
[3] Term obtains own origin from slide #7 of
presentation
[4] Thus program-client should have buttons "Add" and "Del" in own menu
[5] Field of view A refers to the same column of certain table C, to which field of table B, entered into view, refers
[6] Slide #45 of
presentation tells details about necessary SQL-construction
select * from ... order by ... downward ... ;
[7] Way to display is specified for each table in system table of DBMS. If table should be represented as tree, it has several fields, refering to itself, than field, which should be used to construct tree, is specified in system table too
[8] Program-client puts savepoints in DBMS before transition to each next screen. Button "Choice" does not rollback transaction, i.e. does not rollback changes, made in screen (both made at once, and made after pressing button "All")
[9] Slides # 161-163
Dmitry Turin
Используются технологии
uCoz