Home » Categories » Solutions by Business Process » Profiler

Restructure a Database

Datafile Software

Restructure a Database

This lets you either amend the database name / formulae or to restructure an existing data base and then automatically copies the data across into the new database structure, optionally leaving a copy of the old database on disk with a different file suffix (OLD rather than DFD). If you only change data item names, or add to or change calculated items in the file, then in fact the file does not need to be copied ¾ this information is just changed in the file header block.

Firstly you are asked whether you wish to restructure the database.

If you choose ‘No’ you are taken into the ‘Amend Database Names / Formulae’ processes. If ‘Yes’ you are taken into the Database Restructure options.

Amend Database Names/Formulae

This facility lets you change any of the following aspects of an existing database:

The database descriptive name

The date format used for the database.

Any data item name

The data item numbers used in the formulae in *, %, F, & and = type items

The range specified for C or T type items (but note that you cannot increase the size of the tables overall

Note

If you want to add, delete, or re-arrange data items within the database, you must use the Restructure a Database option.

The process asks for the database you wish to amend and then takes you into the process discussed in ‘Create New Database’ earlier but limited to the options above.

Restructure a Database

First you must specify the database in the usual way, using the <F4–Select> key to give the database pathname. After selecting the database, the present database structure is shown in a window, allowing you to scroll up and down in the usual way.

At the cursor position you may use one of the following keys:

<Escape> to complete or abandon the database restructure.

Up and down arrow keys, <Page Up>, <Page Down>, <Home> and <End> to reposition the cursor on a data item in the file structure

<Insert> or <Enter> to insert a new item when the cursor is at a blank item

<Delete> key to remove the data item at the cursor position

<Enter> if you wish to make a change to an item (whether change its name or its specification)

<F4–Select> to add, change, or remove any of the indexes, or (in Premier systems) change some of the advanced features

As you make a change, this is noted against the item as "change”, "insert” or "delete”. You can look at the original database structure with the <F7–Option>, which overlays the modified structure with the original structure for you to review.

If you change or insert a data item, you can use the <F4–Select> key to choose one of the data item types from a window of the possible types. Once you’ve chosen a data item type, then you may also be offered the <F4–Select> and <F7–Option> keys to help you to complete the item parameters — for example, with the *, %, = and F-type items that depend on other data items for their values.

Ending the Restructure Process

You end the restructuring process by keying <Escape>. You are shown a summary of the changes you have made, together with the indexes that now apply to the database

The possible actions are:

Update Database with Changes - This option takes you on to complete the database restructure, including any data re-organisation that is required, as described below.

Abandon New Database Structure - This option abandons any changes that you may have specified to this database and returns you to the menu from which you made this choice.

Continue Restructure - This option puts you back into the restructure window so that you can make further changes to the database structure.

Update Database with Changes - If choose to update the changes made some additional parameters are prompted.

Extract existing data to the new database structure - If you want to restructure the data to match the new structure, reply Y. If you reply N to this question, then a new database to the new structure is created, with the same size as the old database, but with no data in it.

Copy table entries from old to new database - For databases that use table entries, this question determines whether or not to copy the table entries from the original structure to the new.

The restructuring now takes place, by creating a new database whilst still preserving the old database file. When complete you are asked:

If you reply N, then the original database remains in place, with its suffix changed from "DFD” to "OLD”. Reply Y, and the old database is deleted.

Custom Fields
  • Release ID: Standard
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Maintain Constants
Viewed 1340 times since Fri, Jun 29, 2012
Pass Orders to Datafile Software - EDI Order Processing
Viewed 1402 times since Thu, Jul 5, 2012
G8 - Organise Pointers
Viewed 1325 times since Thu, Jun 28, 2012
Application Files – User-Id Filenames
Viewed 745 times since Thu, Jun 18, 2020
Screen Options - Increment Code within ‘Location’
Viewed 1468 times since Fri, Oct 26, 2012
A1 Background Note on EDI
Viewed 1391 times since Thu, Jul 5, 2012
Maintain Table Entries
Viewed 1344 times since Fri, Jun 29, 2012
Create New Database
Viewed 1989 times since Fri, Jun 29, 2012
Configuration - User Defined Report Set-up
Viewed 1495 times since Fri, Jun 29, 2012
Extract Between Databases
Viewed 1328 times since Fri, Jun 29, 2012