Deleting or Modifying Model Objects and Corresponding Tables

Practical experience shows that a data model is often modified in the development process. You will have to delete and update existing model objects. Because the complete creation of a model object will result in the creation of tables/views, fields and masks as well as their relations, you will usually have to delete or change several objects. Proceed as follows:

How to Completely Delete a Model Object:

  1. Delete any existing test or user data completely.

  2. Delete created default masks and their mask-field relations using the special function Delete Mask in the Mask Data form.

  3. Physically delete the database table or the view in the database using the special function Delete Table/View.

    If the table has been successfully deleted in the database, DataView will output a message.

  4. Delete the model object record in the Entity Data form or in the corresponding sub lists type-relation or refine/aggregate-relation with the help of the standard function Delete. The corresponding table-field assignments will be automatically deleted, too.

  5. Delete all fields created for the model object in the Field Data form with the help of the standard function Delete.

    If the fields have already been used in default mask copies or other application-specific masks, DataView will output a message and prevent the deleting of the fields. In this case you should first remove the fields from the corresponding mask-field relations and refresh the masks.

How to Modify a Model Object:

To modify a model object usually means to remove, to change (e.g. the field type) or to add attribute fields in the corresponding database table. Proceed as follows:

  1. Check whether existing test or user data have to be changed after modification. Do not forget that data in fields which you want to remove will be lost and that data will have to be adjusted if you want to change the data type of a field.

  2. Delete the created default masks and their mask-field relations using the special function Delete Mask in the Mask Data form.

  3. Change the table-field assignment or change the field attributes as desired in the sub-lists table fields of the forms Entity, Type or Relation Data or in the Field Data form.

    Note! The name of the field that has already been created in the field master cannot be changed. If you still want to change it, you will have to delete the field record and create a new one.

  4. Physically modify the database table in the database using the special function Create Table/View.

    With version 4.1 the entity form does not provide any special function for changing tables a longer. DataView automatically checks the existence of tables when it creates them. If the table does not exist, it will be created. If the table exists, DataView will either directly change the table in the database (in case of small modifications) or it starts an export/import process with the help of the binary loader (in case of comprehensive modifications). Before the loader is applied there is a security confirmation.

    Small modifications are enlarging fields, adding fields, changing indexes and non-zero flags.

    Comprehensive modifications are reducing fields, changing the field type, deleting fields (not always a comprehensive modification, depending on the database).

    If the modification is carried out with the help of the loader, you can track in the message window which operations are being executed by the loader. If the table has been successfully changed in the database, DataView will output a message.

  5. Create the default masks using the special functions Create List, Create Form,... again. You must also do this if you do not need the default masks as templates for designing complex masks any longer. DataView internally requires the default masks.

  6. Check whether basic fields for views have been changed. In this case you should maintain the basic fields and refresh the views with Create Table/View in the database.

  7. Check whether changed table- or view-fields are used in copies of default masks all in other application-specific masks. In this case you should maintain the corresponding mask-field relation or the mask-field default relation and refresh the mask.