Search code examples
computer-sciencecode-analysissystem-analysis

How to analyze please Student voting system?


enter image description here

I'm having a difficulty in terms on analyzing ... I have a table which is the student. It has a status of voted and 0. 0 means not yet voted and voted means already voted. I have syearid which is school year. My primary no is the IDNO which is the student number.

Here is my problem. When the studet already vote in that school year, student can't vote again and appear the message that he/she already voted. Now the status will be update into voted, When the student vote again in another year, it will said that duplicate idno which is correct. Now that my problem. I want that the student can vote only once a year but because of my primary it will not allow to registered again in another year. Please help me should I have another table to handle something. Please I reall need help


Solution

  • I think you can just have an id that automatically increments and make it your primary id. Then, your checking should be to check the student number and syearid and status before allowing the student to vote. with that you can just have 1 table for the vote records.