Database Design

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Arielle
    New Member
    • Jul 2006
    • 76

    Database Design

    I'm trying to now design the back end for a gigantic web form. The web form consists of a number of seperate pages...

    There are two pages that every form will include... (Information and General page) and then there are 13 other pages that may or may not be included based on user's input. I'm trying to decide how to create the database.

    I'm thinking of having the information form as the core form with an id and timestamp for the entire form being done. Then a second form that contains the user id and form IDs for the subsequent forms so that I can pull which forms are actually associated with the form entry.

    finally have each form as its own table..

    Does that make sense? Any suggestions?
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Arielle,

    Sound like you want to maintain an index yourself. And that is NOT a good idea!

    It depends on whether your user has a unique userid associated to him/her. If so, you can use that userid as the key stored in all subsequent forms. That way you can relate all forms to that unique userid.

    However, if you do not have a unique userid, you must generate an Id at the INSERT of the first 2 forms and keep that Id during your session. You could store the Id in e.g. $_SESSION['id'], so you don't have to pass it via GET or POST to subsequent forms
    .
    Since the first 2 forms are mandatory, I suggest that you write the Info and the General form both at the same time. Because if the user breaks the session after the first form you have no way of getting back to him/her again.

    Question is, what if the user decides to break off the session after the first 2 forms and decides to come back later to do the remaning ones?

    Food for thought.

    Ronald :cool:

    Comment

    Working...