Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2004
    Posts
    3

    Question Unanswered: Survey DB schema

    I am trying to modify a survey DB schema created by OOP(Object Oriented Programming) snobs who had their heads so far up their butts(in my opinion).
    This is current schema created by them.

    Diagram 1 (OOP snobs version)
    http://us.f3.yahoofs.com/users/41a4f...sEJvBB3t1v7URD

    Actually there aren't a several foreign keys as they are shown in the picture, but that's what they(OOP snobs) are doing to the table "Response". They are inserting question_collection_id and its name as well as question_id and its name to Response table. However, it was not ill-intended, "We just wanted to load the report quickly"(OOP snobs).
    But I really recommend this schema, Because of its simplicity.

    Diagram 2 (My version)
    http://us.f3.yahoofs.com/users/41a4f...rEJvBBF0.lGY5Y

    Yet I haven't proven that my schema will provide report just as quickly as OOP snobs' version. As mentioned earlier, since they don't have foreign key constraints accordingly, I do find quite number of discrepancy on values of "question" columns between "Question" and "Response" tables and "question_collection" columns between "question_collection" and "Response" table. I can provide schedule task to eliminate those problems. But I really prefer my schema than theirs. So far, I can explain mine is better just because of its simplicity and DBA's gut instinct. I'd like to hear Superior Expert's opinion which schema is better and why one is better than the other.

    Attached is also zip files of schema images if you can't see them by those URL.
    Attached Files Attached Files
    Last edited by DBAStriker; 12-12-04 at 21:54.

  2. #2
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Maybe it's just me, but none of the links work.
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  3. #3
    Join Date
    Dec 2004
    Posts
    3
    My bad. Try the attachment above......

  4. #4
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Their Response-->Question_Collection relationship looks redundant, and there is no reason to have a double-whammy in the form of 2-key relationship. I think you're right, your is cleaner.
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  5. #5
    Join Date
    Apr 2003
    Location
    Phoenix, AZ
    Posts
    177
    I'm having issues with the de-normalized values like question_collection_name and question in the response table. They never heard of Joins in the OOP world?
    Fred Prose

Posting Permissions

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