Updating Attributes
Updating Attributes of RDBMS Cursor Dataset Overlays
Archiving and Updating Attributes
Archiving and Adding New Attributes
Adding New Attributes to RDBMS Cursor Dataset Spatial Tables
Updating Attributes of RDBMS Cursor Dataset Overlays
When updating attribute data on an RDBMS cursor dataset overlay it is recommended that the user uses the Properties of Polygon dialog box:
To display the box:
-
Select a feature.
-
Right mouse click and select Properties...
- In the Properties of Polygon dialog, select the Schema tab.
This dialog box generates one update statement whether one or more attributes is changed.
Updates made via the Properties Control Bar or through the table view cause updates statements to be made for each attribute changed which causes unnecessary processing for the database server.
Archiving and Updating Attributes
The method to update attributes is particularly important if RDBMS cursor dataset database archiving has been switched on.
Each update statement executed by the RDBMS cursor dataset database generates archive information.
If an update activity in SIS Desktop 9 requires you to change the value of one or more attributes as a part of a single feature edit then the feature properties dialog box should be used to update the attributes. If any other method is used an archive will be created for each attribute changed.
The worst case scenario is that unnecessary archiving will be created.
Archiving and Adding New Attributes
Adding new attributes to an RDBMS overlay results in a change to the structure of the underlying RDBMS table. The creation of new attributes adds new columns to the table.
Information contained in columns added to a table after archiving has been switched on will not be archived.
It is recommended that users do not change the structure of a table after applying archiving to that table.
Qualified database administrators could use the following workflow to get around this situation:
- Create a copy of the archived table.
- Drop the archived table.
- Alter the structure of the main table.
- Re-apply archiving to the main table.
- Copy the data from the copy of the original archived table to the new archive table.
- Drop the copy of the original archive table.
Adding New Attributes to RDBMS Cursor Dataset Spatial Tables
You can add new attributes to spatial layers created using the RDBMS Cursor Datasets. The process is the same as adding a new column to the underlying database table. The overlay must have been created by the owner of the table in order to add a new attribute.
To add a new attribute right-click on the database overlay in the Maps Control Bar and select Dataset > Properties...
The Cursor Dataset Details dialog will be displayed:
Option | Description | |
Data Columns |
Name/Type/Indexed: Fields in the dataset. |
|
Feature Table and Feature Code Column |
Table The Feature Table to use for feature-coded Items in this Dataset. Feature-coded Items get information about their Feature Code from this Feature Table. Column The Field that will be used to set the Feature Code on Items in the Dataset. |
|
Click the drop-down menu to create a new field or delete an existing field. |
||
Click the drop-down menu to create a new column index or delete an existing field. |
||
Geometry Editing |
Select the dimensions and the version from the drop-down menu. |
|
Transactions |
Begin/Rollback/Commit Begin starts a new transaction on the dataset, the Rollback and Commit buttons will become active. You now have two options: Rollback - all of the edits made within the transaction will be undone (as a whole). Commit - all edits made within the transaction will be committed (save all of the edits made within the transaction). |
|
More Properties |
Allows you to view and modify further dataset properties. |
In the case of Oracle the following AOracleSpatialCursorDts dialog is displayed:
Option | Description | |
Coordinates |
The coordinate system that the dataset items are defined in. To view or edit the coordinate system details drop-down the combo box list, and press the right arrow at the bottom. |
|
Feature Table |
The feature table to use for feature-coded items in this dataset. Feature coded items get information about their feature code either from this feature table, or, if set, their own Feature Table property. |
|
Scale |
The default viewing scale for this dataset. This will affect how Text items convert their point heights into world sizes. |
Click Close.
Click OK.
Click Finish on the Cursor Dataset Details dialog.
The attribute name should conform to any naming convention in place for the RDBMS cursor dataset database.
The following are typical conditions that may apply:
- The name should be less than 30 characters (Cadcorp recommend no more than 20 characters if tools such as the Cadcorp Archive Wizard are to be used)
- Attributes should start with an alphabetic character.
- Attributes need to be unique within the table.
- Attributes names should not contain spaces and should be in upper case.
By creating or deleting a column in this dialog, you are editing the structure of the underlying table.
SIS Desktop 9 will display the new column in SIS Desktop 9 as long as there is no saved schema (implicit or express) on the current overlay.
Adding a column to the schema on the Overlays dialog will not add a column to the RDBMS Cursor Dataset table, it will just add a column to the overlay.
This then becomes a feature of the SIS Workspace Definition (SWD), not the RDBMS Cursor Dataset table and cannot hold any user defined data.
Columns should only be added to the schema if they are expression-based on other columns or system properties.