CREATE TABLE [dbo].[testquestion]
(
[instanceid] [nvarchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[sectionnum] [smallint] NOT NULL,
[questionnum] [smallint] NOT NULL,
[questionid] [nvarchar] (85) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[qtype] [smallint] NOT NULL,
[points] [float] NOT NULL,
[review] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF__testquest__revie__7CAF6937] DEFAULT ('N'),
[version] [int] NOT NULL CONSTRAINT [DF__testquest__versi__7DA38D70] DEFAULT ((1)),
[comments] [nvarchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[update_meaning] [nvarchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[last_updated] [datetime] NULL,
[updater_legal_name] [nvarchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[update_meaning_text] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[last_updater_uid] [nvarchar] (85) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[elapsedTime] [decimal] (20, 0) NULL,
[weight] [float] NOT NULL CONSTRAINT [DF__testquest__weigh__7E97B1A9] DEFAULT ((0)),
[guess] [nvarchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[answer] [nvarchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[choice_order] [nvarchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[latest_version_bundle_id] [nvarchar] (85) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[teststart] [datetime] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[testquestion] ADD CONSTRAINT [PK_TESTQUESTION] PRIMARY KEY CLUSTERED ([instanceid], [sectionnum], [questionnum]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [NUK_TESTQUESTION_1] ON [dbo].[testquestion] ([latest_version_bundle_id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[testquestion] ADD CONSTRAINT [FK_BUNDLE_ID_TESTQUESTION] FOREIGN KEY ([latest_version_bundle_id]) REFERENCES [dbo].[language_bundle] ([bundle_id])
GO
ALTER TABLE [dbo].[testquestion] ADD CONSTRAINT [FK_testquestion_questionid] FOREIGN KEY ([questionid]) REFERENCES [dbo].[question] ([questionid])
GO
EXEC sp_addextendedproperty N'MS_Description', N'A record of a specific question response for a specific test instance (e.g Exam, Survey, Certification etc). This table will record the answers for single choice, multiple choice and true/false question types.', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_Description', N'correct answer ', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', 'COLUMN', N'answer'
GO
EXEC sp_addextendedproperty N'MS_Description', N'choice order of single choice or multiple choice question types ', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', 'COLUMN', N'choice_order'
GO
EXEC sp_addextendedproperty N'MS_Description', N'comments when regrading the question', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', 'COLUMN', N'comments'
GO
EXEC sp_addextendedproperty N'MS_Description', N'elapsed time of the question (NULL = no time limit is set to the question)', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', 'COLUMN', N'elapsedTime'
GO
EXEC sp_addextendedproperty N'MS_Description', N'answer from user', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', 'COLUMN', N'guess'
GO
EXEC sp_addextendedproperty N'MS_Description', N'test instance id (reference to testinstance table)', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', 'COLUMN', N'instanceid'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Date and time that the record was updated', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', 'COLUMN', N'last_updated'
GO
EXEC sp_addextendedproperty N'MS_Description', N'e-Signature property: user ID of updater', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', 'COLUMN', N'last_updater_uid'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Language Bundle ID', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', 'COLUMN', N'latest_version_bundle_id'
GO
EXEC sp_addextendedproperty N'MS_Description', N'question points', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', 'COLUMN', N'points'
GO
EXEC sp_addextendedproperty N'MS_Description', N'question type (reference to code_questiontype table) [1=Single Choice, 2=True/False, 3=Matching, 4=Essay, 5=Fill-In-The-Blank, 6=Rating, 7=Multiple Choice, 8=Triple Rating, 9=Audio Capture, 10=Drag And Drop, 11=Hotspot - QuestionType.java and QuestionTypeManager.java]', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', 'COLUMN', N'qtype'
GO
EXEC sp_addextendedproperty N'MS_Description', N'question id (reference to question table)', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', 'COLUMN', N'questionid'
GO
EXEC sp_addextendedproperty N'MS_Description', N'question number in the section', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', 'COLUMN', N'questionnum'
GO
EXEC sp_addextendedproperty N'MS_Description', N'can review (Y=Yes, N=No)', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', 'COLUMN', N'review'
GO
EXEC sp_addextendedproperty N'MS_Description', N'test section number', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', 'COLUMN', N'sectionnum'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Startdate of the question for Elapsed Time Computation', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', 'COLUMN', N'teststart'
GO
EXEC sp_addextendedproperty N'MS_Description', N'e-Signature property: not used anymore', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', 'COLUMN', N'update_meaning'
GO
EXEC sp_addextendedproperty N'MS_Description', N'e-Signature property: contents of update meaning', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', 'COLUMN', N'update_meaning_text'
GO
EXEC sp_addextendedproperty N'MS_Description', N'e-Signature property: legal name of the updater', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', 'COLUMN', N'updater_legal_name'
GO
EXEC sp_addextendedproperty N'MS_Description', N'version number of the question', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', 'COLUMN', N'version'
GO
EXEC sp_addextendedproperty N'MS_Description', N'weight defined in the Question Editor at the time of starting exam', 'SCHEMA', N'dbo', 'TABLE', N'testquestion', 'COLUMN', N'weight'
GO