CREATE TABLE textq_responses (
    textq_response_id int NOT NULL,
	textq_result_id int NOT NULL,
	text_question_id int NOT NULL,
	response_big_string_id int NOT NULL,
	feedback_big_string_id int NOT NULL,
	mark int,
	CONSTRAINT PK_textq_responses PRIMARY KEY
	(
		textq_response_id
	),
	CONSTRAINT FK_tq_response_to_objects FOREIGN KEY
	(
		textq_response_id
	) REFERENCES objects (
		id
	),
	CONSTRAINT FK_tq_response_to_results FOREIGN KEY
	(
		textq_result_id
	) REFERENCES textq_results (
		textq_result_id
	),
	CONSTRAINT FK_tq_response_to_questions FOREIGN KEY
	(
		text_question_id
	) REFERENCES text_questions (
		text_question_id
	),
	CONSTRAINT FK_tq_res_to_big_strings FOREIGN KEY
	(
		response_big_string_id
	) REFERENCES big_strings (
		big_string_id
	),
	CONSTRAINT FK_tq_fee_to_big_strings FOREIGN KEY
	(
		feedback_big_string_id
	) REFERENCES big_strings (
		big_string_id
	)
)
GO


INSERT INTO classes (type, db_name, table_name, java_class)
	VALUES(44,	'building2', 'textq_responses', 'org.bodington.assessment.TextQResponse')
GO

INSERT INTO fields (type, sequence, field, set_method_name, get_method_name, set_java_class, get_java_class, flags, foreign_type, set_method_name_foreign, get_method_name_foreign )
	VALUES(44, 1, 'textq_response_id', 'setTextQResponseId', 'getTextQResponseId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 1, null, null, null )
GO

INSERT INTO fields (type, sequence, field, set_method_name, get_method_name, set_java_class, get_java_class, flags, foreign_type, set_method_name_foreign, get_method_name_foreign )
	VALUES(44, 2, 'textq_result_id', 'setTextQResultId', 'getTextQResultId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 0, null, null, null )
GO

INSERT INTO fields (type, sequence, field, set_method_name, get_method_name, set_java_class, get_java_class, flags, foreign_type, set_method_name_foreign, get_method_name_foreign )
	VALUES(44, 3, 'text_question_id', 'setTextQuestionId', 'getTextQuestionId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 0, null, null, null )
GO

INSERT INTO fields (type, sequence, field, set_method_name, get_method_name, set_java_class, get_java_class, flags, foreign_type, set_method_name_foreign, get_method_name_foreign )
	VALUES(44, 4, 'response_big_string_id', 'setResponseBigStringId', 'getResponseBigStringId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 0, null, null, null )
GO

INSERT INTO fields (type, sequence, field, set_method_name, get_method_name, set_java_class, get_java_class, flags, foreign_type, set_method_name_foreign, get_method_name_foreign )
	VALUES(44, 5, 'feedback_big_string_id', 'setFeedbackBigStringId', 'getFeedbackBigStringId', 'org.bodington.database.PrimaryKey', 'org.bodington.database.PrimaryKey', 0, null, null, null )
GO

INSERT INTO fields (type, sequence, field, set_method_name, get_method_name, set_java_class, get_java_class, flags, foreign_type, set_method_name_foreign, get_method_name_foreign )
	VALUES(44, 6, 'mark', 'setMark', 'getMark', 'java.lang.Integer', 'java.lang.Integer', 0, null, null, null )
GO
