The Community_Faq Table
Content that is common to all modules such as title, description, and view count resides in the Community_ContentPages
table. Additional module-specific content requires a second table for storage. For the FAQ module, we can store the FAQ question in the contentPage_title
field of Community_ContentPages
, and the FAQ introduction in the contentPage_description
field. We still need to store the FAQ answer and the additional references text for the FAQ, so we will use the following DDL to create a table:
CREATE TABLE [Community_Faqs] ( [Faq_ContentPageID] [int] NOT NULL , [Faq_Answer] [ntext] NOT NULL , [Faq_Reference] [ntext] NULL, CONSTRAINT [PK_Community_Faqs] PRIMARY KEY CLUSTERED ( [Faq_ContentPageID] ), CONSTRAINT [FK_Community_Faqs_Community_ContentPages] FOREIGN KEY ( [Faq_ContentPageID] ) REFERENCES [Community_ContentPages] ( [contentPage_id] ) ON DELETE CASCADE )
The naming conventions and data types we use for the table are consistent with the other modules...