← Назад

Редактор таблиц локальной базы данных.

Local data base table editor.

DBEDIT Интерактивная программа.


Designation

Soluble problems and method

The program is used for interactive editing of the arbitrary tables of the local database. The following possibilities are provided:

  • Browsing and editing of the data tables and the list tables.
  • Browsing and editing of the headers of traces.
  • Creation and deleting of the data tables and the list tables.
  • Deleting of modifications.
  • Junction of the LDB tables of one type.
  • Graphics and table editing of contents.
  • The calculator for execution of typical operations on the values in the columns of the table.
  • Export of the table contents to a text file.
  • Saving of the tables and modifications in the other project.
  • Deleting of the lockings.

Interaction with other programs

The program can be used for changing of the contents of the LDB tables and headers of traces obtained as a result of operation of any programs of the packet. The tables and modifications created by the program are suitable for usage in applications and system programs of the packet.

The program allows to delete the LDB tables, modifications and lockings created by any program of the packet.


Description

Session

As the program allows to solve the various problems on managing the local database, below is given the description of standard operations which are most important.

Main objects of interactive operation are the main window of the LDB editor and the windows of the graphics and table editors.

The main window is the controlling center. The main full-table operations are accessible via it. It is used also for selection of the operative project.

The table and graphics editors can be used both separately and together. In the second case their contents will automatically be synchronized. The program allows to run only one window of the table and one window of the graphics editor. In all cases the same LDB table is edited.

Attention! All operations of editing of the current table are carried out in the RAM. For saving results of editing to disk it is necessary to make appropriate operations (see item 3.1.1.5). Only already created tables are automatically saved (see item 3.1.1.1). If the contents of the opened table have changed (as a result of operation of other program), and the user wants to edit a new variant, it is necessary to close the table (menu item of the main window File - > Close dbt), having lost the made changes, and then to open it repeatedly.

At operations on disk (creation, opening, deleting, junction, saving with other name, export), it is necessary to take into account, in what project the operation will be made. At the moment of opening (or creation) of the LDB table it is linked to the current project. Later it is possible to change the current project. That gives the following possibilities to the user:

  • Saving of the table in the other project.
  • Junction of the table with the table located in the other project.

Further the last selected project is called current. The project is considered operative, if it includes the currently opened LDB table.


Full-table operations

All full-table operations are defined for the project, therefore it is necessary to define the current project before any of them. It is done by selection of the menu item of the main window File - > Project.


Creation of the table

It is carried out by selection of the menu item of the main window File - > Create dbt. The user is offered to select the type of the created table from the list, and then to set a name of the table. Thus it is necessary to take into account the distinctions in names of the data tables and the list tables.

If any table is already opened in the editor, it should previously be closed (menu item of the main window File - > Close dbt), with saving the results of editing if it is necessary.

The data table has a name of a type VSP.wellname.sp. TABLETYPE.mod, where wellname is a name of the well, which concerns the created table (character name consisting of latin characters, digits, underline and minus signs), sp - number of the shot point which concerns the created table (non-zero positive number not greater than 9999) relates, TABLETYPE - the type of the table (is forbidden to change), mod - number of the table used to distinguish one table of the given type from another (non-zero positive number not greater than 9999).

The list tables have a name of a type VSP.TABLETYPE, and as a rule TABLETYPE is finished with LIST (for example, FBLIST). Thus, there can not be two different list tables of one type in the project.


Opening of the table

It is carried out by selection of the menu item of the main window File - > Open dbt. Further in a submenu suggests the way of selection of the table and mode of opening (only to view view only or to change modify). There are several ways of selection of the table:

from list...
To select the list table containing the links to the the data tables of one type. Further it is necessary to select a line from the list table containing reference to the required data table. The reference is always stored in a column DTBSPTR. It is not possible to edit list table in such a way.

It is the most preferable way of loading data, because the user sees the additional descriptive information describing table during selection of the table from the list. The name of the list table usually starts by the same characters, as the name of the data table, and is ended by a word LIST. For example, the list table of hodographs has a name VSP.FBLIST, and the data tables, references to which are stored in the list have the names VSP.*.*.FBINFO.*.

as file...
To select the table for editing from all set of list and data tables available in the project. It can be necessary for realization of special operations:
  • Browsing and editing of the list table (name of type VSP. *).
  • Browsing and editing of the table unavailable from list tables. This can happen, if none of the list tables has reference to the required data table.
  • Browsing of the table of history of processing (name of the table is VSP.4HISTORY). It is necessary to take into account, that while the table of a history of processing is opened in the editor, it is unavailable for addition of new records, i.e. all programs wishing to make record in a history of processing at this moment, will not be able to do it.
seismic file...
To select modification, the headers of traces of which should are needed to be viewed or changed. The modification is encoded by a name S???, where??? - three digits. The work with modification has some features described in item 3.1.4.

If any table is already opened in the editor, it should previously be closed (menu item of the main window File - > Close dbt), the results of editing can be previously saved.


Deleting of the table

It is carried out by selection of the menu item of the main window File - > Delete dbt. Further in a submenu the way of selection of the object of the data which is to be deleted is offered to the user. Available ways:

from list...
To select the list table, then to select the line with the reference to the data table from it. As a result the data table and the line in the list table with the reference to it will be deleted. The reference is always stored in a column DTBSPTR.
as file...
To select the table from all available in the project and to delete it. Attention! It is necessary to be cautious with this operation, because it is possible to delete the list table with the set of the references and useful auxiliary information and to embarrass access to the data tables. Also it is possible to delete the data table in such a way, that in the corresponding list table the reference to it will remain. It will call the error message in programs at attempt to open the data table.
seismic file...
To select modification and to delete it. To save the results of processing, it is recommended to check up, if the user really wants to delete this modification.
lock...
To remove locking of the data object. This requirement arises in the case if some data objects given (modifications and tables) have become unavailable as a result of abortion of some programs. For more details about lockings see item 3.1.1.8.

In the first case the user first selects the list table from among accessible in the project, and then selects the line in this table. First the line selected from the table list is deleted, and then the table, to which this line refers to (value of the pointer in column DTBSPTR).

In the second case the user simply selects a name of the table, which he wants to delete.


Junction of the tables

It is carried out by selection of the menu item in the window of the table editor File - > Merge dbt. Further in a submenu the path of selection of the table from the list table (item from list) or from all tables of the current project (item as file) is offered to the user. Contents of the selected table line by line is added in the end of the table which is edited. It is not taken into account what columns were selected for editing.


Saving contents of the table

Two variants of saving of contents of the table are possible:

  • Recording of the made changes to the initial LDB table on the disk. The menu item of the main window File - > Save dbt.

    If the opened LDB table is modification, number of traces and their order in modification after saving will not vary despite of the changes, done by the user.

  • Saving of the table to the indicated LDB table on the disk. The menu item of the main window File - > Copy dbt as. In this case user is offered to select or to enter a name of the target LDB table (or modification), to which the recording will be made.

    It is necessary to point out, that the name and operative project of the current table will not vary. But to change the current project, the changes will be saved to it. So it is possible to copy the LDB tables and modifications in other project.

    Besides, if the opened table is the headers of modification, during copying the traces in new modification will go in the same order, in which they were arranged by the user. If the user has deleted or created lines during editing, this will change the number of lines in new modification in comparison with initial. The bodies of traces will correspond to traces in the initial modification taken according to indexes INDEX (see the description of a special field INDEX).


Selection of table columns for editing

After the table is opened or created, to make changes to it, it is necessary to select columns for editing. It is done for localization of attention of the user, because there can be many columns in the applied tables and simultaneous work with them all can be inconvenient.

In a working area of the main window of the program there are two lists designated Unselected columns and Selected columns accordingly. Immediately after opening the table the left list contains names and types of all columns of the opened table, and the right list is empty. With the help of the controlling buttons, located between lists, the user can move columns from the left column in right and back. The columns which have appeared in the right column are considered selected for editing. With the help of the button Arg- > the user should select a column of argument among them. The column of argument is marked in the right list with the Arg symbol. This column is considered argument, while all other columns are considered the functions of this argument. For example, in the case of loading the table of a first break hodograph it will be logical to choose ZOP (depth of a point of reception) as an argument.


Export of contents of the table

For saving contents of the table in a text file it is necessary to select the menu item of the window of the table editor File - > Export - > ASCII file. In the appeared dialog box it is necessary to set a name of an output file (button Select or text field to the left of it). Depending on designation of a target text file it is possible to customize with the help of the resources, represented in the dialog box.

Two variants of customization are most typical:

  • The file for inclusion in the report. In this case it is necessary to include a label of date, of the project and name of the table (the option Put origin stamp is switched) in the file, to place the names of columns into the header of the table (option Put head of table is switched), to set fixed width of columns (option Strict column widths is switched) and separator of columns to make one or several blanks (string - separator Column's separator string).
  • The file for import in any other program (for example, spreadsheet). In this case identifying labels and the table header should not be switched, strict of width of columns is not critical (option Put origin stamp, Put head of table, Strict column widths are switched off), but it is necessary to use comma (string - separator Column's separator string - comma) as separators in the format Comma Separated Value (CSV), and the string values should be in quotes (option Quote strings with " " is switched).

If the target text file is supposed to be used in MS DOS, MS Windows or MS Windows NT, it is possible to switch an option DOS text file convensions. In this case text file will be correctly read by all programs in indicated operating systems.


Deleting of lockings

In the case when some programs were terminated incorrectly and have not released the data objects locked for operation and the objects, disabled for operation, it is necessary to remove lockings further operation with them. It can be made with the help of the dialogue panel called by the menu item File - > Delete dbt - > lock.

The lockings can be exclusive Exclusive (eliminating any access to the object) and sharable Sharable (permitting to have reading access for several programs).

The exclusive lockings are very short during normal operation of the programs - their time of life, as a rule, is less than second. If such locking lives longer, most likely it is the hung up locking and it will prevent access to the object of the data. It should be deleted manually.

The sharable lockings exist as long as the program carries out access to the data. Attention! If to delete the sharable locking while the program continues to use the object of the data, it can result in loss of the data.


Editing of the tables

In the table editor (it is called by selection of the menu item Edit - > Table editor of the main window of the program) it is possible to edit arbitrary columns of the LDB tables (according to the common limitations stated in item 4.2). The table editor is more powerful from the point of view of valid operations and their generality in comparison with graphics editor.

From the window of the table editor the export of the data to a text file and association of the one-type LDB tables data is carried out.

In the table editor (in contrast to the graphics editor) it is possible to change the number of lines in the table and contents of each cell.

The most left column of the table editor is the column of column - argument (see item 3.1.1.6), and other columns go in the order of the list Selected columns.

If in the the text and graphics editors are simultaneously started in the program, in a text editor the operations changing number of lines and a column of argument are prohibited. Besides at the moment of start of the graphics editor the LDB table is sorted by increase of value in column of argument.


Basic operations

Current edited cell

Is outlined by a frame and in it contains a text cursor. It is possible to replace cell by pointing the new cell by the mouse and pressing the 1-st mouse button, or with the help of the keyboard, moving frame from cell to cell. Moving of a frame of the current cell up and down is carried out by appropriate arrows on the keyboard. Moving to the right - Tab key, to the left - simultaneous pressing of Shift and Tab.

If the new value, entered into cell, was entered with mistake and the user had no time to press Enter or to leave cell, it is possible to return to the previous value by pressing the key Esc.

Width of the column

If the value is too big for the cell and its part is visible only, the user can expand this column. For this purpose it is necessary to press the Shift key on the keyboard and 2-nd (average) mouse button while the mouse pointer should be on a vertical line of the right boundary of a column. At the moment of pressing the mouse pointer will change and user can change width of a column. After that the mouse button can be released and the column will accept desirable width.

New table line

The last line of the table editor in the mode of changing of number of lines (when the graphics editor is not started) has a special index New and is used for input of new line. As soon as even one cell in this line receives the syntactically correct value (number - in numerical column, line - in character column), indicated name - in the column of pointer on the LDB table), the line is added to the table, receiving the next index, and the empty line with an index New appears below.

Selection of a table line

For realization of the group operations there is a possibility to select the necessary table line. For this purpose it is necessary to press simultaneously the Ctrl key and the 1-st (left) mouse button. Thus the mouse pointer should be on selected line. The repeated operation cancels selection.

The pop-up menu of basic operations

The pressing of 3-rd (right) mouse button in a field of the table editor calls the pop-up menu of basic operations named ROWS, because the operations are done with the table lines.

The pop-up menu. An insertion of lines in the table

The insert is carried out before the line of the current edited cell. The operation Insert inserts one line, and Insert # inserts a set number of lines. The cells of inserted lines are filled with the default values. For numerical columns it is zero, for character it is empty line, for the pointers it is empty pointer " VSP.... ".

Attention! The cells in the table columns which were not selected for editing, get the default values too.

The pop-up menu. Deleting of lines from the table

The operation Delete is used for deleting of lines from the table. If there are selected lines in the table, they are deleted. If such lines are not present, the line from current edited cell is deleted. The new line New cannot be deleted.

The pop-up menu. Duplicating of lines in the table

The operation Duplicate # is used for reproduction of line from current edited cell the indicated number of times. The ordered number of copies of current line is inserted into the table.

Attention! The values only in the cells of columns selected for editing are duplicated! Other columns of the multiplied lines will contain the default values.

The pop-up menu. Selection of lines in the table

For convenient selection of lines the following operations are used:

Select
Selection of the line from the current edited cell.
Select till here
Selection of all lines from previous selected line up to current inclusively. It is convenient to select a plenty of successively going lines.
Select all
Selection of all table lines. If it is necessary to select almost all lines in the table, it is easier first to select all, and then to deselect some lines.
Unselect all
Removes selection from all table lines.


Calculator

For execution of group arithmetic operations on values in the numerical columns of the table there is a specialized calculator called by selection of the menu item Tools - > Calculator in the window of the table editor.

The calculator allows to apply the formula y=x*A+B to the set table lines. There are following options for selection of lines:

  • All rows - All lines of the table.
  • Selected rows - Selected table lines.
  • Rows in range of argument - Table lines, the value of argument in which lays in the indicated interval.

Depending on the requirements the formula y=x*A+B can change. In this formula y designates a target table column, x - the argument of the operation (it is not necessary a column of argument!), A, B - constants.

The variants of the formula are set by selection of argument.

Column
The formula: y=x*A+B

The values of a target column y are obtained by linear conversion of the (A, B) values of the initial column x.

<Target>
The formula: y=y*A+B

The values of a target column y vary according to the linear law (A, B).

<Zero>
The formula: y=B

The number B is assigned to the values of a target column y.

< Row index >
The formula: y=i*A+B

The values of a target column y are generated under the linear law from the number of selected or chosen by value of argument line i from above downwards. In the mode All rows the number is the index of line i It is counted from 1.

During usage of the calculator there is a possibility to undo changes made by the last operation. The given option is called by the button Undo of the dialog box of the calculator.


Special operations for editing of cells

For the convenient input of values in cells with the double click of 1-st (left) mouse button the dialog box permitting to select value from the list is called. The given possibility is present for character columns and columns of the pointers.

Selection of a name of the LDB table

For columns of the DBTPTR type. The dialog box for selection of the LDB table among accessible in the operative project is displayed.

Selection of a name of modification

For columns for the CHAR type with length of 4 characters. The dialog box for selection of a name of modification among accessible in the operative project is output.

Selection of character string

For columns of the CHAR type with length which is not 4 characters. The dialog box for selection among the values in the given column is displayed.


If it is required to sort the table lines by values in the columns, it is possible to use an available resource, which is called by selection of the menu item Edit - > Sort lines in the window of the table editor. The dialog box appears on screen.

In the dialog box the user can set from one to three rules of sorting. For selection of a rule it is necessary to select a column, in which the sorting will be made and to specify, how the values will be sorted: on increase or on decrease.

The rules of sorting are ordered according to the priorities: the greatest weight has the first rule (table lines are sorted according to it). Inside the groups of lines with identical values in the column of first priority the sorting is made according to a rule of the second priority. For a rule of the third priority a way of ordering by analogy to a rule of the second priority.

If it is required to arrange lines according to one criterion only, the second and third priority buttons should be released. This mode is used as default.


Graphics editing

The graphics editor is intended for visualization and visual editing of numerical columns of the LDB table columns. It is called by selection of the menu item Edit - > Graphics editor of the main window of the program.

The graphics editor has a number of the requirements and limitations described here. Because of these limitations it can not be used for editing of the arbitrary columns.

  • The columns for editing should be numerical.
  • The graphs are represented as dependencies of columns on the column of argument.
  • Even one graph i.e. the pair of numerical columns is necessary for the editor.
  • At running of the graphics editor the table is ordered on increase of argument.
  • The values of argument can not vary in the graphics editor and should not vary in the table editor simultaneously.
  • During operation with the graphics editor it is forbidden to change the number of lines in the table.
  • The values of functions can vary only in the nodes.

The working area of the graphics editor represents a field with the scales on which the curves are visualized. The vertical axis is the axis of the argument. Each curve is painted with colour and has its own scale. A scale of argument is in black colour.

In the graphics editor the concept of an active curve is present. This curve is thicker than the others and the nodes are shown on it.

The mouse pointer in a working area is accompanied with the cross-hairs, permitting to watch a current location of the cursor on scales of the argument and the active function. In the three fields in the bottom of the window of the graphics editor the current location of the cursor is shown in numbers. In these fields is shown:

  1. Line: - number of line in the table editor corresponding to a current location of the argument (the vertical coordinate of the cross-hairs reduced to the line number).
  2. ARG: - name of the column - argument and the current value of argument corresponding to the vertical coordinate of the cross-hairs.
  3. The value of the function - corresponds to horizontal coordinate of the cross-hairs for an active curve.

Selection of an active curve

To replace an active curve it is enough to press the left mouse button while its cursor is on a scale of the newly selected curve.

Selection of a visualization range by argument

The setting of a visualization range by argument (Page: top/bottom) is carried out in the dialog box called at selection of the menu item Options - > Pane's tuner.

Selection of a visualization range by value

The setting of a visualization range by the function (Page: top/bottom) is carried out in the dialog box called at selection of the menu item Options - > Curve's tuner.

Changing of visualization parameters of a curve

The curves (the dependencies of columns of functions on a column of argument) can be represented with linear interpolation between nodal points or without interpolation - stepwise. The visualization with interpolation is used by default. It is possible to change a way of drawing (Linear curve or Stairs curve) in the dialog box displayed at selection of the menu item Options - > Curve's tuner.

Fast changing of the axes direction

For changing the direction of axes it is necessary to use a submenu View - > Flip, which has such options:

Argument
To change the direction of an axis of argument to an opposite.
Active curve
To change the direction of an axis of the active function to an opposite.
All curves
To change the direction of axes for all functions to an opposite.

Fast changing of visualization range

If it is necessary to return quickly to a normal range of changing of argument or function after changing of limits of visualization, it is possible to use a submenu View - > Fit, which has such options:

Argument
To select a range of visualization of an argument from least to the greatest value.
Active curve
To select a range of visualization of the active function to fit all values to the area, which is visible by the user.
All curves
To select a range of visualization of all functions to fit all values of functions to the area, which is visible by the user.

Changing of step of graduation of scales and grid

For changing of the step of graduation of scale (it is also step of a grid) of argument and functions, it is necessary to enter the new value of step into a field Grid step of the dialog box Pane's tuner and Curve's tuner accordingly.

Editing the active function

To switch to the edit mode it is necessary to select the menu item View - > Edit mode and to set a new location of nodes with the help of the left mouse button.

Usage of zoom

For increasing / reducing of the working area of the graphics editor, the modes of increasing and reducing magnifier are used. These modes are activated by menu item View - > Zoom in mode and View - > Zoom out mode correspondingly. In the zoom mode the user selects the rectangular area by the mouse, by pressing the left button for fixing of one angle and releasing it in the other corner of the selected area. After release the size of area of visualization will change accordingly.

If the user at the moment of area selection by a rubber rectangle has decided to cancel operation, for this purpose he should press the 3rd (right) mouse button, and after that to release the 1-st. In this case the changing of the visualization area will not take place.

Editing of headers of traces

The program gives possibility to load headers of traces of the indicated modification for browsing and editing. The headers are loaded in the same order, in which they are listed in the file of traces. Attention! During visualization of traces in other programs of the packet the very first trace is visualized in the bottom, and last in order under - at the top of a field of traces.

All words of header are accessible to the user for editing. Besides the special column INDEX of the whole type is added, in which the numbers of traces counted from 0 in the file are written.

It is necessary to edit headers cautiously, as the unsuccessful corrections can strongly affect the operation of the programs with this modification and with the data obtained on it.

At changing the order of lines in the loaded table of headers (for example, as a result of sorting) the order of traces in this modification does not change really. If to swap values in the cells of a column INDEX, during saving the modification (File - > Save dbt) these traces will exchange not places, but headers.

During copying changes (File - > Copy dbt to) the interpretation of headers is a little bit other. During copying, the traces are written in the same order and number, in which the headers are listed. The trace body is taken from the initial modification with the number specified in INDEX. If trace with such number is not present in the initial modification, the empty (zero) trace body is written.


Input data

Data base tables

The program allows to edit the LDB tables with some limitations on the types of columns. The following types of columns are admitted:

  • Scalar columns of types Int1, Int2, Int4, Real4, Real8, Char, DBTPTR.
  • Vector columns such as Char.

The program allows to edit both data tables, and the list tables.

Passport data

As the passport data are stored in the LDB tables, the user can carry out their editing with the help of the given program both in the table and graphics modes. Not to break integrity of data structures of the passport, it is necessary to read their description attentively before editing (see the document " the Description of the passport of the VSP data").


Output data

Data base tables

The program does not allow to change the structure of the tables (to add or to delete columns, to change their types). At the same time the contents of the table during editing can vary arbitrary. It concerns the number of lines and the contents of the cells.

It is necessary to take into account, that during the graphics editing the table lines are sorted by increase of the value of selected column of an argument. Even if the user has not changed the value explicitly, the order of lines can be another. Therefore if any application requires the defined order of lines in the input LDB table, the user should take it into account, if he has decided to edit this table beforehand.

Passport data

See item .

Report data

The program allows to make a text file, which can be used outside the UNIVERS packet. The way obtaining of such file is stated in item 3.1.1.7


Requirements to the environment

Operational environment

For operation with the program it is necessary to define a variable of the environment VSPHOME. It can be defined in the file setup or in the initial profile of the user. The definition of this variable in the file setup should look like (the spaces in the line are not admitted!):

 VSPHOME =/home/vsp
Where /home/vsp - the root directory of the UNIVERS packet. During installation of the packet the root directory can be set in the other way.

Used files

For operation of the program at the home directory of the user should contain the following files: setup, .sdscolor or $VSPHOME/etc/univers.zcp.

The resource file DBEDIT, which should be located in the home directory of the user or in the search paths of search in a variable of environment XFILESEARCHPATH or XAPPLRESDIR, is necessary for the correct operation of the user interface of the program. A usual location of the file DBEDIT is the directory $VSPHOME/app-defaults. In this case variable XFILESEARCHPATH should contain the following search element,

 ...: $ VSPHOME/app-defaults / of % N:...
or the XAPPLRESDIR variable should be defined as
 XAPPLRESDIR = $ VSPHOME/app-defaults

Messages to the user

Bringing messages to the notice of the user


Features of usage

  1. At attempt to start the graphics editor for the table, which has the same value written in the column of selected argument, the program is aborted, producing an error #522 (ERROR __ X_ZERO_SIZE).
  2. If to change the value of cell of the table in the window of the table editor, and after that to save the table without pressing Enter and without transition in other cell, the last change will not be saved.
  3. At saving the LDB table with the other name, the current table remains open and editable.
  4. If simultaneously with the program the multi-colour applications (for example, Netscape Navigator or graphics editor) are started, it can appear, that the required number of colours is unavailable to the program. In this case panel of graphics editing will be completely or partially black. For normal operation, before start of the LDB editor close the conflicting applications.
  5. At loading the data the program locks the access to these data from the other programs. In particular, if the table or modification is opened for viewing (view only), it remains accessible on reading for the other programs. If the table or modification is opened for modification (modify), any access to this data object from other programs will be denied. The given limitation should be understood as the consequence of the simultaneous operation of many programs and many users with the data in one or several projects. In the case of absence of the given limitation the simultaneous access to the same data tables would result in incorrect operation of programs and in loss of results of their operation.
  6. Import and export of table data into text format does not support vector numeric data cell values (that means, text representation for dimensions greater than 1 is not provided).
Contacts
43, Zaitseva st., room 263, Saint Petersburg, 198188, Russia
Phone:
+7 (495) 754-9990
+7 (903) 255-7275
+7 (911) 236-7708
e-mail:
vsp@geovers.com
© 2001-2024 GEOVERS Ltd.