TableSpec Element Attributes

 <TableSpec 
	XMLns="bb_appfx_table"
	XMLns:common="bb_appfx_commontypes" 
	ID="8cbc751d-a9cb-43ff-beca-bfffd265dcf1"
	Name="Constituent Dummy Test Items"
	Description="This table holds constituent test items."
	Author="Technical Training"
	IsCustomizable="true"
	Tablename="USR_CONSTITUENTDUMMYTESTITEMS"
	PrimaryKeyAsForeignKeyTablename="CONSTITUENT"
	CustomIdentifier="true"
	IsBuiltIn="false"
	EnableAuditTrail="true"
	FileGroup="DEFGROUP"> 

Figure: Sample TableSpec element

At first glance, the attributes in the TableSpec element may seem fairly cut and dry, but a few attributes are more notable:

TableSpec Attribute Description

ID

Required. The database ID to use for this item in the catalog table. The primary key for the database table. It is a globally unique identifier that is stored as a uniqueidentifier data type. The ID is automatically generated for you when you create a Table Spec using the SDK.

PrimaryKeyAsForeignKeyTablename

Optional. Indicates that the primary key is also be a foreign key and specifies the name of the foreign table. Typically used with a one-to-one relationship to the table being extended.
CustomIdentifier Optional. Default value = "false." The CustomIdentifier value indicates whether the table supports the concept of a user-definable unique identifier. If this attribute is true, then three fields will be added to the table named CUSTOMIDENTIFIER, SEQUENCEID, and LOOKUPID. CUSTOMIDENTIFIER is an nvarchar(100) field and is used to store a unique identifier specified by the user. If no identifier is specified by the user, then CUSTOMIDENTIFIER defaults to an empty string (''). SEQUENCEID is an integer field that contains a unique integer value for each record in the table and is set automatically. LOOKUPID is a computed field that returns either the value of CUSTOMIDENTIFIER if CUSTOMIDENTIFIER has been specified or a system-generated unique ID based on SEQUENCEID. The LOOKUPID field value can always be considered unique.
TranslationField Optional. Indicates a field to use to provide a human-readable translation for rows in this table (for example, when looking at the audit trail for this table). Up to 100 characters, beginning with A-Z, followed by one or more upper case letters and digits.
IsBuiltIn Optional. Default value = "false." Indicates whether the table represents a standard table defined by Blackbaud or a user-defined customization. It is important to set this field correctly to avoid conflicts with future updates from Blackbaud.
EnableAuditTrail

Optional. Default value = "true." Indicates whether the table should support audit trail functionality. If set to false, the table will not have a corresponding audit table and will not contain the TS, TSLONG, DATEADDED, DATECHANGED, ADDEDBYID, and CHANGEDBYID fields.

FileGroup

SQL Server maps a database over a set of operating-system files. Data and log information are never mixed in the same file, and individual files are used only by one database. Filegroups are named collections of files and are used to help with data placement and administrative tasks such as backup and restore operations. Database objects and files can be grouped together in filegroups for allocation and administration purposes. There are two types of filegroups: primary and user-defined. The primary filegroup contains the primary data file and any other files not specifically assigned to another filegroup. All pages for the system tables are allocated in the primary filegroup. User-defined filegroups are any filegroups that are specified by using the FILEGROUP keyword in a CREATE DATABASE or ALTER DATABASE statement. Log files are never part of a filegroup. Log space is managed separately from data space.

An Infinity database will have the following options that dictate which file group to place the table. Optional. Default value = "DEFGROUP". Indicates which file group in the database to place the table. Use BIOGROUP for biographical info (names, addresses). Use TRANGROUP for really large tables with many rows (Gift, Revenue, line items, etc.).

Figure: Notable TableSpec attributes