SQLVIEWCATALOG

Catalog for SQL view spec

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
VIEWNAME nvarchar(128) Default = '' Name of the SQL view.
DESCRIPTION nvarchar(max) Default = '' Description of the SQL view.
SQLVIEWSPECXML xml XML spec that defines the SQL View.
DATEADDED datetime Default = getdate() Indicates the date this record was added.
DATECHANGED datetime Default = getdate() Indicates the date this record was last changed.
TS timestamp Timestamp.
TSLONG bigint (Computed) yes CONVERT(bigint, TS) Numeric representation of the timestamp.
MARTKEY nvarchar(255) Default = ''

Foreign Keys

Foreign Key Field Type Null Notes Description
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_SQLVIEWCATALOG_DATEADDED DATEADDED yes
IX_SQLVIEWCATALOG_DATECHANGED DATECHANGED
PK_SQLVIEWCATALOG ID yes yes
UC_SQLVIEWCATALOG_VIEWNAME VIEWNAME yes

Triggers

Trigger Name Description
TR_SQLVIEWCATALOG_AUDIT_UPDATE
TR_SQLVIEWCATALOG_AUDIT_DELETE