Results 1 to 2 of 2

Thread: Hdo I List all possible variations????

  1. #1
    Join Date
    May 2003
    Posts
    2

    Hdo I List all possible variations????

    I'm having a db programming drama. We have a series of questionnaires;
    each questionnaire is comprised of a series of forms that a user must
    fill out. A document is produced at the end of the questionnaire. Some
    of the fields are required and some are not, depending on how the
    fields are filled out can make the document look very different.

    My aim is to produce something that lists all the possibilities that
    the question can be filled out in. The list of the form fields are in
    a SQL Server 200 database table "tblDocPageFields", the structure of
    the table is similar to this:

    tblDocPageFields
    - ID
    - Page ID
    - Field Name
    - Field Order

    Another table specifies whether the field is required or not which
    contains the fieldID and a validation Message to be displayed if the
    field is not filled in.

    tblDocPageFieldsReq
    - ID
    - FieldID
    - ValidationText

    For example if I have a document with 2 fields and the first one of
    them are required the possibilities are:

    Field1 Field2

    Filled Nothing
    Filled Filled

    NothingFilled

    I need to be able to list this somehow, as some of the surveys have a
    huge amount of questions that need to be checked for all
    possibilities. Does any one have any idea How I can accomplish this
    through a stored procedure or ASP logic or something… Please help!!!

    [email protected]

  2. #2
    Join Date
    Oct 2002
    Location
    Salt Lake City
    Posts
    4
    The first thing comes to mind is to build a decision tree, then use a nested set model for it. The possible completed forms, valid or invalid, would be the path from the root to some particular leaf.

    Since you did not bother to post any DDL, constriants, or other specs, I can only guess at what you are doing.

    Right now, it looks like you are modeling the physical layout of the paper forms and not the logic. And frankly, it looks like a typical OO mess, right down to the use of names that begin with "tbl-" and columns called "id" (what particular kind of id is it? What kind of attribute is it in the reality you are modeling?) everywhere. Read ISO-11179 for the proper data element naming conventions and get a book on data modeling.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •