Own conception vs. foreign, way first: scheme of screen is scheme of data


Complexity of database scheme and intricacy of program adjustment, built for this database, is rough equal. However it is always difficult to understand foreign thoughts, than to state own ones to yourself. So we shall create scheme of database-for-yourself faster, that shall imagine map of interrelations of foreign ajdustments [1]. And if only scheme and map would be on balance, it is clear, what you should prefer.

But what forces us to choose bad decision, and even to pay for it? What third weight we have to throw off the first cup, that to find double benefit at once? We have to throw programming off - or to reduce it in maximum degree.

It is possible, if we pay attention to one subtlety - output fields are bound by relations IDEF1. Screen of program has scheme, and this scheme completely repeats scheme of database!

For example, if we extract employees of any department





than obtained hierarchy is tracing-paper from relations of database




There is second subtlety - syntax, expressing hierarchy, e.g. "Departments.Persons" is absent in SQL at all. Client cannot separate in cartesian products, what fields concern to one table, what to another. So taking information from database, we lose a part of information!

Instead of inserting lost information by machine, we try to make it manually, forcing a man to trace work of computer. It occupies till 50% of working time. Tracing is written in notation LOOP/FETCH. We take by one record to find records, bound with it. And this problem till now is not reflexed by industry.

Strong decision exists. It is expressions like "SELECT * FROM Departments.Persons" [2]. Development of this idea is presented in part "Hierarchical data output" of separate presentation [3]. In moment, when we can reflect scheme of database on scheme of screen, passing manual trace, we can write personal software.


All proposals are public domain.


[1] We leave fact, that almost each foreign application does not automize part of process of consumer

[2] Author already casually mentioned it between decisions of 2-nd and 3-rd problems in previous article. Besides this, departments and persons can be bound not directly, but via intermediate table, e.g. via table "Sections" - then mentioned query will look so

select Departments.Persons
from   Departments.Sections.Persons
where  Departments/@name="E-banking";

[3] Slides # 3-62


Dmitry Turin



Используются технологии uCoz