Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of LTjake (4001)

Wednesday April 02, 2003
08:32 AM

Survey in RDF...?

[ #11402 ]

I was tasked last week to whip up a multi-page web survey. I really didn't have much (or any) time to think about my approach, so I just created a simple "dispatch" script that gathers all of the answers from the previous page, and does survey logic (i.e. jump to section X if they answered Y to question Z, go to the next page, etc.) Each of the survey pages was pretty static in nature.

I decided to store the data in an RDF-like format. Subject, Predicate, and Object where the subject is the survey id, the predicate is the question (the input name="..." tag), and the object is a literal - the answer.

It really saved me from many a headache. If i were to do a DB design where all of the predicates (questions) where table columns, and then they decided to change a bunch of questions, I'd have to go back and fix up my table design. With the RDF storage, the question names are not pre-determined, so any changes to the survey are easily incorporated in to the stored data.

Anywho, this is really nothing new per se, but it was nice to see some benefits from using this method. Perhaps it could be extended to store the questions and survey logic in order to make it a more generic application...?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Curious: was it actual RDF or something that exposed triples?


    -- Robin Berjon []

    • When I think about it, it's really just triples.

      But, is there any reason why it couldn't be molded into an RDF statement?

      • No, but the same triple can be expressed in multiple ways in RDF so processing becomes more complex (ie you need an RDF processor). Imho you did well to go with an ad hoc format.

        If you do anything generic out of that, please post about it here, at least one person is interested ;)


        -- Robin Berjon []