Database Table Survey

[This is preliminary documentation and is subject to change.]

Table Survey holds base data for surveys. Each record holds base data for one survey.

Note that table Survey only holds data, that exits in one copy per survey. Data specific for each accreditatino body, that takes part in the survey process, is stored in SurveyIterationBody.-

Data on which standards are part of the survey ("distribution") is stored in SurveyStandardVersion.

Fields

Field Name

Type

Note

Description

Id

INT

Primary Key

Internal unique id

CreatedDateTime

DATETIME

Date and time for creation of survey

CreatedBy

INT

Foreign key to Employee

Id of user who created the survey

UpdatedDateTime

DATETIME

Date and time for latest update of survey

UpdatedBy

INT

Foreign key to Employee

Id of user who latest updated the survey

DeletedDateTime

DATETIME

Date and time for (logical) deletion of survey

DeletedBy

INT

Foreign key to Employee

Id of user who (logically) deleted the survey.

NB: Not used - logical deltion of survyes is not implemented.

OrgUnitType

VARCHAR (20)

Partial foreign key to OrgUnit

OrgUnitCode

VARCHAR (20)

Partial foreign key to OrgUnit

SequenceNumber

INT

Sequence of survey within OrgUnit. Surveys are numbered consecutively from 1.

DateFrom

DATETIME

Start date of survey - NB: note that each "survey phase" has its own date interval too

DateTo

DATETIME

End date of survey - NB: note that each "survey phase" has its own date interval too

SurveyType

INT

Reference to SurveyType

SurveyStatus

INT

Reference to SurveyStatus

StateName

VARCHAR(50)

Foreign key to StateMachineLookUp

Current state of survey - states and transitions between them are defined by state machine

Comment

VARCHAR(MAX)

Comment on survey

BlogThreadIdClarifications

INT

TODO: delete

BlogThreadIdObjectionsSurveyors

INT

TODO: delete

BlogThreadIdObjectionsInstitution1

INT

TODO: delete

BlogThreadIdObjectionsInstitution2

INT

TODO: delete

AccreditationPeriodExpires

DATETIME

Date for expiration of accreditation period