Table MstrCd

Description of table MstrCd

This table contains names and descriptions for each of the rows used to describe a particular data element. For instance, if there was a table of table entry for Gender, this table may contain a row for Male and a row for Female related to the table of table for Gender.


Code preview of table MstrCd

use StudentCentered
go

if exists (select 1
from sysindexes
where id = object_id('dbo.MstrCd')
and name = 'TblOfTbl_FK'
and indid > 0
and indid < 255)
drop index dbo.MstrCd.TblOfTbl_FK
go

if exists (select 1
from sysobjects
where id = object_id('dbo.MstrCd')
and type = 'U')
drop table dbo.MstrCd
go

/*==============================================================*/
/* Table: MstrCd */
/*==============================================================*/
create table dbo.MstrCd (
ID int not null,
TblOfTbl_ID int not null,
Nm varchar(100) not null,
Descr varchar(255) not null,
Cd varchar(10) null,
SortOrder int null,
CrtrID varchar(18) not null default suser_sname(),
CrtDt datetime not null default getdate(),
UpdtID varchar(18) not null default suser_sname(),
UpdtDt datetime not null default getdate(),
EffDt datetime not null default getdate(),
EndDt datetime null,
constraint MstrCd_PK primary key nonclustered (ID)
on SmallIDX
)
on SmallTBL
go

/*==============================================================*/
/* Index: TblOfTbl_FK */
/*==============================================================*/
create index TblOfTbl_FK on dbo.MstrCd (
TblOfTbl_ID
)
on SmallIDX
go


List of columns of the table MstrCd

Name

Code

Master Code Identifier

ID

Table Of Table Identifier

TblOfTbl_ID

Name

Nm

Description

Descr

Code

Cd

SortOrder

SortOrder

Creator Identifier

CrtrID

Create Date

CrtDt

Update Identifier

UpdtID

Update Date

UpdtDt

Effective Date

EffDt

End Date

EndDt


Column ID of the table MstrCd

Card of the column ID of the table MstrCd

Name

Master Code Identifier

Code

ID

Data Type

int

Mandatory

TRUE


Description of the column ID of the table MstrCd

Unique ID assigned and maintained by the database for the MstrCd table.


Column TblOfTbl_ID of the table MstrCd

Card of the column TblOfTbl_ID of the table MstrCd

Name

Table Of Table Identifier

Code

TblOfTbl_ID

Data Type

int

Mandatory

TRUE


Description of the column TblOfTbl_ID of the table MstrCd

Foreign key to the TblOfTbl table.


Column Nm of the table MstrCd

Card of the column Nm of the table MstrCd

Name

Name

Code

Nm

Data Type

varchar(100)

Mandatory

TRUE


Description of the column Nm of the table MstrCd

Name of an attribute within a virtual table.


Column Descr of the table MstrCd

Card of the column Descr of the table MstrCd

Name

Description

Code

Descr

Data Type

varchar(255)

Mandatory

TRUE


Description of the column Descr of the table MstrCd

Description for an attribute within a virtual table.


Column Cd of the table MstrCd

Card of the column Cd of the table MstrCd

Name

Code

Code

Cd

Data Type

varchar(10)

Mandatory

FALSE


Description of the column Cd of the table MstrCd

Coded value for an attribute within a virtual table.


Column SortOrder of the table MstrCd

Card of the column SortOrder of the table MstrCd

Name

SortOrder

Code

SortOrder

Data Type

int

Mandatory

FALSE


Description of the column SortOrder of the table MstrCd

Used when a non-natural sort order is required for the list of attributes.


Column CrtrID of the table MstrCd

Card of the column CrtrID of the table MstrCd

Name

Creator Identifier

Code

CrtrID

Data Type

varchar(18)

Mandatory

TRUE


Description of the column CrtrID of the table MstrCd

The user identification of the person or process that created the record.


Column CrtDt of the table MstrCd

Card of the column CrtDt of the table MstrCd

Name

Create Date

Code

CrtDt

Data Type

datetime

Mandatory

TRUE


Description of the column CrtDt of the table MstrCd

The date the source row of data was created.


Column UpdtID of the table MstrCd

Card of the column UpdtID of the table MstrCd

Name

Update Identifier

Code

UpdtID

Data Type

varchar(18)

Mandatory

TRUE


Description of the column UpdtID of the table MstrCd

The user identification of the person or process that last updated the record.


Column UpdtDt of the table MstrCd

Card of the column UpdtDt of the table MstrCd

Name

Update Date

Code

UpdtDt

Data Type

datetime

Mandatory

TRUE


Description of the column UpdtDt of the table MstrCd

The date of the last update.


Column EffDt of the table MstrCd

Card of the column EffDt of the table MstrCd

Name

Effective Date

Code

EffDt

Data Type

datetime

Mandatory

TRUE


Description of the column EffDt of the table MstrCd

The date that this row of data becomes effective.


Column EndDt of the table MstrCd

Card of the column EndDt of the table MstrCd

Name

End Date

Code

EndDt

Data Type

datetime

Mandatory

FALSE


Description of the column EndDt of the table MstrCd

The date that this row of data ceases to be effective.