Hello, I am building a calibration tool (given a checklist the user needs to select the fields that agree (or not) with a link or script.
Ex.: 1)Colaborador inicia o atendimento conforme diretrizes. a) conforme b) não conforme c) não se aplica.
At first the tool will allow you to select the field type (radio, checkbox, select and text). Currently I have a good deal ready, the question is: what is the best way to structure my bank? How should I relate the answers and the questions? Currently my tables are like this:
Form Table
CREATE TABLE [dbo].[formulario](
[id] [varchar](13) NULL,
[nome] [varchar](150) NULL,
[descricao] [varchar](max) NULL,
[pergunta] [varchar](150) NULL,
[resposta] [varchar](150) NULL,
[tipo] [varchar](100) NULL,
[iPergunta] [int] NULL,//indice da pergunta
[iResposta] [int] NULL,//indice da resposta
[qtdPerguntas] [int] NULL,//total de perguntas
[qtdRespostas] [int] NULL,
[responsavel] [varchar](150) NULL,
[criacao] [datetime] NULL,
[atualizacao] [datetime] NULL
)
Response Table:
CREATE TABLE [dbo].[resposta](
[formulario] [varchar](13) NULL,
[pergunta] [varchar](150) NULL,
[resposta] [varchar](150) NULL,
[respondente] [varchar](150) NULL,
[data] [datetime] NULL
)
I need another table so that adm can tell what the correct answers are, but this structure does not seem appropriate.