Well, that looks like a potential large project, and if you are lost already, then that's not a good sign. You don't seem to have any Perl question, but I'd like to make some comments on your table layout. It doesn't look good to me.

First of all, your questions have a certain type. MC, T/F, matching, short answer. That cannot be found back in the table structure - the table seems to be for 4 answer MC only. Don't limit yourself to just 4 answers - one day you will have questions with 3 or 5 answers. Or 20. A three column table with fields question_id, answer_number and answer will do. Perhaps an answer_id if you don't like multi-field primary keys. You shouldn't indicate the correct answer by putting some magic token in the answer. A table relating question_id and answer_number (or answer_id if you decide to use them) will do. For T/F questions, you need a table relating question_id with a boolean value.

You also write there are 8 departments, with 5 test/department. That leads to 40 tests. However, all I can see from the tables is up to 100 questions per department. That doesn't make sense. You need a departments table (key department_id), a tests table (key test_id), a table relating departments to tests (just two columns, department_id and test_id), a table with questions (key question_id) and a table relating tests with questions.

I don't understand much of your user table. Each user can take just one test? Why is there a test type in both the user table and the test record table? How do you intent to store the list of missed questions? Wouldn't you need a separate table for that?

I think you really need to brush up your database design skills.

-- Abigail


In reply to Re: Online Testing Center Project by Abigail
in thread Online Testing Center Project by Prince99

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.