I am bussy with making an form builder.
I have these tables:
Code:
/*==============================================================*/
/* Table: TBL_FB_CONTROL */
/*==============================================================*/
create table TBL_FB_CONTROL
(
CONTROL_ID int not null,
FORM_ID int null,
NAME varchar(50) null,
LABEL varchar(50) null,
ACTION varchar(50) null,
LETTERTYPE varchar(50) null,
LETTERGROOTTE int null,
GETAL varchar(50) null,
LETTER varchar(50) null,
GETALLETTER varchar(50) null,
SUBMIT varchar(50) null,
SIZE int null,
DATAPICKER varchar(50) null,
constraint PK_TBL_FB_CONTROL primary key clustered (CONTROL_ID)
);
alter table TBL_FB_CONTROL
add constraint FK_TBL_FB_C_REFERENCE_TBL_FB_F foreign key (FORM_ID)
references TBL_FB_FORM (FORM_ID)
on update restrict
on delete restrict;
Code:
/*==============================================================*/
/* Table: TBL_FB_FORM */
/*==============================================================*/
create table TBL_FB_FORM
(
FORM_ID int not null,
CONTROL varchar(50) null,
TYPE varchar(50) null,
"GROUP" varchar(50) null,
constraint PK_TBL_FB_FORM primary key clustered (FORM_ID)
);
Code:
/*==============================================================*/
/* Table: TBL_FB_TYPE */
/*==============================================================*/
create table TBL_FB_TYPE
(
TYPE_ID int not null,
FORM_ID int null,
BUTTON varchar(50) null,
LABEL varchar(50) null,
LISTBOX varchar(50) null,
PASSWORDFIELD varchar(50) null,
RADIOBUTTON varchar(50) null,
TEXTAREA varchar(50) null,
TEXTFIELD varchar(50) null,
constraint PK_TBL_FB_TYPE primary key clustered (TYPE_ID)
);
alter table TBL_FB_TYPE
add constraint FK_TBL_FB_T_REFERENCE_TBL_FB_F foreign key (FORM_ID)
references TBL_FB_FORM (FORM_ID)
on update restrict
on delete restrict;
Code:
/*==============================================================*/
/* Table: TBL_FB_GROUP */
/*==============================================================*/
create table TBL_FB_GROUP
(
GROUP_ID int not null,
FORM_ID int null,
constraint PK_TBL_FB_GROUP primary key clustered (GROUP_ID)
);
alter table TBL_FB_GROUP
add constraint FK_TBL_FB_G_REFERENCE_TBL_FB_F foreign key (FORM_ID)
references TBL_FB_FORM (FORM_ID)
on update restrict
on delete restrict;
Code:
/*==============================================================*/
/* Table: TBL_FB_INPUTDATA */
/*==============================================================*/
create table TBL_FB_INPUTDATA
(
INPUTDATA_ID int not null,
constraint PK_TBL_FB_INPUTDATA primary key clustered (INPUTDATA_ID)
);
But I am not sure about the table inputdata. because that is the table who will store the user input data. Can anybody help me what I have forgotten?
THX.