About Constraints

The types of constraints supported by AutoCAD Map 3D are described in the following table.

Type of Constraint Description Data Table Behavior
Range Valid values must be within the range specified. You can include or exclude the minimum and maximum values. For example, you can specify 1-10 inclusive, and then 1 and 10 are both valid. Any value outside the specified range generates an error and you must enter a different value.
List You supply the list entries that are valid for the property. Click the down-arrow to display the list, and then choose one of the items as a value for the property.
Not null The value of the property cannot be empty. If you leave the property value empty when you close the Data Table, an error message prompts you to enter a value.
Unique The value of the property must be unique within the feature class. If you define the property as an auto-generated field, or if it is defined in the data store as a key field, it will have this constraint. If you enter a value that is used by any other feature in this feature class, an error message prompts you to change it. You will not see the error message until you check in the feature.

If the table has two columns that together must be unique (like "Lastname" and "Firstname"), a message appears on each column involved in the paired uniqueness constraint.

When you edit the properties in the Data Table, you can enter only the values allowed by the constraint. For example, for a Roads feature, you can specify that the values for the Number_Of_Lanes property be within the range 1 through 8. If you enter 9 lanes, you will receive an error message.

You will see an error message as soon as you enter the invalid value. When you check the feature in, your edits are validated again against the data store and you may be notified of further errors, depending on the capabilities of the data provider.

Not every data provider supports all constraints. The following table shows supported constraints by provider.

Provider Range List Not Null Unique
Oracle Yes Yes Yes Yes
PostgreSQL/PostGIS Yes Yes Yes Yes
SQL Server Yes Yes Yes Yes
SQL Server Spatial Yes Yes Yes Yes
SQLite Yes Yes Yes Yes
MySQL No No Yes Yes
SDF Yes Yes Yes No
ArcSDE No No Yes Yes
SHP No No Yes No

The Schema Editor checks the provider capability and allows only the constraints supported by that provider.