Keydef Table: Key Definition Metadata
For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.
A key defines a unique identifier for a class. The keydef table contains metadata that defines the keys for user classes. The OLE DB provider for Commerce Server uses metadata from the keydef table and other metadata to store instances of user classes in the database.
For classes whose key is a single data member, you can use GenerateKeyDef on the ClassDef and IsPrimaryKey on the KeyMember. A key that consists of multiple data members must always be defined by using the Key and Key Member metadata. For more information about the Key Member metadata, see Keymem Table: Key Member Definition Metadata.
For information about how to create a new class key, see Creating a New Class Key.
The following table describes the columns in the keydef table. There is a row in the keydef table for each key that is defined.
Column name |
Type |
Allow null |
Requirement |
Description |
---|---|---|---|---|
ClassKeyDefID |
int |
no |
Leave blank |
Stores the internal identifier for the key. |
CatalogID |
int |
yes |
Leave blank |
Stores the identifier for the schema catalog. |
CatalogName |
nvarchar (128) |
yes |
Leave blank |
Stores the name of the schema catalog, "DWSchema". |
ClassDefName |
nvarchar (57) |
yes |
Required |
Stores the name of the class associated with the key. |
ClassID |
int |
yes |
Leave blank |
Stores the identifier of the class associated with the key. |
ClassKeyDefName |
nvarchar (128) |
yes |
Required |
Stores the name of the class key. Must be unique across a catalog. |
CreatedTime |
datetime |
yes |
Reserved |
Records when the key was created. |
Description |
nvarchar (128) |
yes |
Optional |
Stores the description of the object. |
DisplayName |
nvarchar (128) |
yes |
Optional |
Stores the display name of the object. |
IsPrimaryKey |
tinyint |
yes |
Optional |
Indicates whether this is the primary key. The default is False (0). |
MajorVersion |
int |
yes |
Reserved |
Stores the major version number for the key. |
MinorVersion |
int |
yes |
Reserved |
Stores the minor version number for the key. |
ModifiedTime |
datetime |
yes |
Reserved |
Records when the key was last modified. |
Status |
int |
yes |
Reserved |
Reserved. |