Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
fetlock
Starting Member
8 Posts |
Posted - 2004-03-30 : 16:05:47
|
| I'm working on a design for collecting data from a variety of forms. Anyone have experience with something along these lines, or can anyone spot areas for improvement / big problems with the design?I want to receive and save data from any number of forms, with any number of form elements, and pull the data out for reporting. The coding part I'm comfortable with.If this were just one form, or forms that I knew the structure of ahead of time, I'd just build tables based on their structure... but it's not, so I'm thinking of approaching it by type and length of data:Table FormSetup (Data about the form on first submit, collected from hidden fields)formid int PKformName vc(50)formEmailTo vc(50)formSubject vc(50)formFrom vc(50)formRedirect vc(50)Table FormSubmit (Data about each submission, which form it belongs to)formsubmitid int Pkformid int Fksubmitdate datetimesubmitersIP vc(20)Table FormDataVCShort (Form data that's a short vc)shortid int PKformfieldid int FKcontent vc(50)Table FormDataVCMed (Form data that's a short vc)medid int PKformfieldid int FKcontent vc(500)Table FormDataVCLong (Form data that's a short vc)longid int PKformfieldid int FKcontent vc(2000)Table FormDataFields (Data about each field in the form)formfieldid int PKformid int FKfieldName vc(150)fieldLength int (length of first or avg data for this field...needed?)fieldtable vc(30) (table name where this data is...needed? iffy?)fieldOrder int (what order the field is listed on the form)...and a disclaimer, table names, field names, lenghts, etc are all just rough draft... off top of my head, just trying to get the idea across... and those short-med-long tables could be divided out further... maybe...It's not super efficient, but, it might be better than using FSO and writing a txt or csv file and dumping the data there... and better than doing nothing and hearing users beg for a way to collect the data they receive from these emails... |
|
|
|
|
|
|
|