Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Effects of the restructuring on the content of the database

The various modifications which can be made to the schema and to the storage structure have varying effects on the content of the database:

  • BALTER does not modify the content of the database during the restructuring phase when

    • identifier is renamed

    • LOCATION DIRECT or DIRECT-LONG is added or omitted

    • the specifications in the ORDER clause vary between: LAST, FIRST, NEXT, PRIOR or IMMATERIAL

    • set membership is redefined

    • duplicates are allowed or prohibited

    • the SET OCCURRENCE SELECTION clause is changed.

    Such modifications are noted by BALTER in the database definitions only; they have no effect on stored data and need only be taken into account when programming the DB applications.

  • Again, BALTER does not modify the content of the database when any of the following are redefined:

    • the size of a DBTT

    • the number of pages for the dynamic reorganization of tables

    • the size of set tables.

    Such modifications must be carried out by the BREORG utility routine.

  • BALTER modifies the content of the database to a certain degree when any of the following are redefined:

    • PLACEMENT OPTIMIZATION

    • the location of tables

    • the size of a hash area.

    Modifications of this kind do affect the content of the database, but DB consistency does not depend on whether or not BALTER adapts the data stored to the new definition. Since, in addition, BALTER generally has to re-store a large number of records and table lines when carrying out such modifications, it updates the overall database definition, but only adapts the data stored to the new definition if it has to relocate the records or tables in the course of other modifications.

  • BALTER modifies the content of the database when

    • a realm is added to the database

    • a new record type or a new set is defined

    • LOCATION CALC is defined for the first time

    • the hash routine or the CALC keys are modified when LOCATION CALC is used

    • a DBTT is relocated to another realm

    • the definition of a SEARCH key is changed

    • the user or system information of a record type is changed

    • the structure or sort criteria of tables are redefined.

    When effecting such modifications, BALTER adapts the stored data to the modified schema or storage structure by carrying out the following steps in the order specified:

    • formatting the realms added

    • in the case of owner record types, modifying the DBTT and deleting the set tables or relocating them in the database

    • entering, deleting or modifying system records for SYSTEM sets

    • deleting or relocating tables

    • deleting all information concerning record types which no longer occur in the new schema

    • creating hash areas and DBTTs for new record types

    • modifying and re-storing record types (user and system information) and creating new tables

    • removing realms which no longer occur in the new schema from the database.

    If the reuse of database keys was disabled using the BMODTT utility routine, this run must be repeated after restructuring has been performed as BGSIA restores the default setting (database keys of deleted records are reusable or the search for free space begins in a contiguous free area at the end of the realm). Delete identifiers are retained by BALTER when DBTTs are recreated.