Database Constraints

Chapter Updated 07/07/24


Description

  • Constraints are rules used to improve or enforce data integrity, reliability and accuracy.
  • Available in level 7 files.
  • Built into the library if XB_DBF7_SUPPORT is enabled at library build time.

    Types

    Standard Properties
  • 1 - Required
  • 2 - Min
  • 3 - Max
  • 4 - Default
  • 6 - Database Constraint
    Custom Properties
  • Limited documentation available on Custom Properties.
    Referential Integrity Properities
  • Linkages between tables ie; Table1->ForeignKey Must exist in Table2->PrimaryKey

    Current library support

    As of release 4.2.7, the Xbase64 library supports constraints that have been added to tables via some other means (dBASE native applications).
    It does not currently include functionality to
  • Create new constraints
  • Delete existing constraints
  • Modify existing constraints.

    Future intended support

    Future versions of the Xbase64 library are intended to include additional constraint support for
  • Adding new constraints
  • Deleting existing constraints
  • Modify existing constraints

    Constraint related methods

    MethodDescription
    xbBool GetConstraintsEnabled() constGet constraint logic status.
    xbBool void SetConstraintsEnabled( xbBool bSwitch )Turn constraint logic processing on and off.