Looking for sample code and database schema

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Looking for sample code and database schema

    I've been handed a project to design and implement a survey system for
    our intranet. I'm looking for sample code snippets (ASP Classic) or
    in particular a database schema someone may have already created to
    handle the questions, especially ones such as matrix style questions.
    I know there are some great commercial apps out there to do this, but
    I can't seem to convince the powers that be that my time is actually
    worth anything. :)

    Thanks for any pointers, I'll be roughing out the database schema this
    afternoon (MS-SQL but it doesn't really matter for the database design
    side).

    Jeff
    Jeff Cochran Guest

  2. Similar Questions and Discussions

    1. how to prep database schema
      Hi I ve a huge database created in MySQL by someone else. now i want to view all the tables and their relationships so tht i can design the...
    2. Configurable database schema
      Is there a reasonable way to set up an application such that the database (specifically Oracle) schema owner used by all of the queries is...
    3. Code Sample
      I found this link referenced in another thread - http://flexapps.macromedia.com/flex15/explorer/dragdrop/DragDropGrid.mxml?versio nChecked=true and...
    4. Loading Database Schema
      Hi, Each time I save a file, or open a file, or even thinking about modyfying a file, a stupid stupid stupid stupid message box pops up with...
    5. DB Sample Code
      I'm looking for some sample code that functions as an Access table editor. I had one that gave me a table grid with the hyperlink options to edit,...
  3. #2

    Default Re: Looking for sample code and database schema

    "Jeff Cochran" <jcochran.nospam@naplesgov.com> wrote in message
    news:40393d23.764615198@msnews.microsoft.com...
    > I've been handed a project to design and implement a survey system for
    > our intranet. I'm looking for sample code snippets (ASP Classic) or
    > in particular a database schema someone may have already created to
    > handle the questions, especially ones such as matrix style questions.
    > I know there are some great commercial apps out there to do this, but
    > I can't seem to convince the powers that be that my time is actually
    > worth anything. :)
    >
    > Thanks for any pointers, I'll be roughing out the database schema this
    > afternoon (MS-SQL but it doesn't really matter for the database design
    > side).
    >
    > Jeff
    I was recently working on the same thing.

    I developed a facility to generate surveys from a database.

    Here's what I came up with:

    Table 1: Survey
    SurveyID AutoNumber
    SurveyName Text (50)
    SurveyText Text (255)
    DateCreated Date/Time
    DateChanged Date/Time

    Table 2: Survey_Questions
    SurveyID Number
    QuestionID Number
    QuestionText Text (50)
    QuestionType Text (10)
    QuestionOpts Text (255)
    DateCreated Date/Time
    DateChanged Date/Time

    Table 3: Survey_Responses
    SurveyID Number
    ResponseID AutoNumber
    ResponseText Memo
    ResponseDate Date/Time


    "SurveyName" would be a brief title of the Survey.
    "SurveyText" would be a full description of the Survey.

    "QuestionType" is "Checkbox", "Radio", "Select", "Selects" (i.e. Multiple),
    "Text", or "Textarea".

    "QuestionOpts" are either:

    a) Valid choices for "Checkbox", "Radio", "Select", and "Selects"; for
    example,
    "QuestionText" = "What is your formal education?"
    "QuestionType" = "Checkbox"
    "QuestionOpts" = "High School^Associates^Bachelors^Masters^Doctorate"
    or
    "QuestionText" = "What is your gender?"
    "QuestionType" = "Radio"
    "QuestionOpts" = "Male^Female"
    or
    "QuestionText" = "What is your age range?"
    "QuestionType" = "Selects"
    "QuestionOpts" = "under 21^21-29^30-39^40-49^50-59^60-69^70-79^80+"

    b) The number of bytes of "size=" and "maxlength=" for "Text"
    "QuestionText" = "What is your favorite color?"
    "QuestionType" = "Text"
    "QuestionOpts" = "20^20"

    c) The number of "cols=" and "rowss" for "Textarea"
    "QuestionText" = "What are your goals?"
    "QuestionType" = "Textarea"
    "QuestionOpts" = "30^4"

    I use the caret ("^") to seperate "Opts".

    "ResponseText" contains all of the "joined" Responses for one Survey.
    Their relative position in the array corresponds to a QuestionID.

    Thus, if the above were five Survey Questions then a "ResponseText"
    might be: "Bachelors^Male^21-29^Red^Live and let live."


    Does this help you at all? I'll be curious what others offer.


    McKirahan Guest

  4. #3

    Default Re: Looking for sample code and database schema

    And you might want to look here:

    HotScripts.com
    [url]http://www.hotscripts.com[/url]

    Planet Source Code
    [url]http://www.planet-source-code.com[/url]

    Best regards,
    J. Paul Schmidt, Freelance ASP Web Developer
    [url]http://www.Bullschmidt.com[/url]
    ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Bullschmidt Guest

  5. #4

    Default Re: Looking for sample code and database schema

    On Mon, 23 Feb 2004 01:08:35 -0800, Bullschmidt
    <paul@bullschmidt.com-nospam> wrote:
    >And you might want to look here:
    >
    >HotScripts.com
    >[url]http://www.hotscripts.com[/url]
    >
    >Planet Source Code
    >[url]http://www.planet-source-code.com[/url]
    I've pulled those, as well as the .NET sample survey, but the database
    schema is pretty simple for these. Usually just a question/response,
    with no regard for question type. That means a question looking for a
    yes/no response ends up as a text field, as does one with multiple
    answers as checkboxes, and a free-form comment question. I thought
    that was pretty lame for when analysis time rolls around.

    Fortunately, this project snowballed (how many times do you hear
    someone happy the project expands greatly...?). That means someone
    somewhere will be cutting loose a couple hundred clams for a canned
    product and I'm off the hook on the programming end.

    Thanks for the suggestions to everyone.

    Jeff
    Jeff Cochran Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139