SImple DB Design Question

I have a simple Application In which i have users and these users are associated with some Villages mean that while creating their account they have been assigned some villages the rule is simple (one user can have one or many villages )

in my Application I have a questionnaire and there are many many question Each question Has a target value as well as achieved value (the target value is set by the supervisor of the person) and the achieved value is what the user achieved

The DB I have created is like that

Users(userID(P),UserNAme,Email,)

Villages(villageID(P),VillageName)

District(DistrictID(P),DistrictNAme)

Questions(questionID(P),Question_Text)

QuestionTarget(REcordID(P),QuestionID(F),TargetValue ,DistrictID(F))

Answers(AnswerID(P),Question_ID(F),Achieved,VillageID(F)) 

Check the Attached image and tell this db is correct the details is in image availble 

August 29th, 2015 1:15pm

check the above tables my Question is very simple now i am defining it again basically I have users in my application and these users have assigned villages and District is the main entity which contains villages 

Like as Country have City then city have villages like that I have district and my district have many Villages the Rule is simple one user can have many Villages and many district and for district the rule is that a district can have one or many Villages Now I have assigned each users some question and These Quarter have targeted value for example let say 

Question#01: To establish new schools is District TTT (TT IS The Name of District )

Target value  20

Now I am saving the target for District Now for Villages I am saving the target for District TTT and This district have 3 Villages in it like A,B,C

When the user login and he fill the answers of that district he will submit Three rows becasue of three villages which  has been assigned to him 

so My Target is one row in table and my achieved value which the user input is having 3 rows so when i am using crystal report the report wizard makes a join Inner join so when he join the answer table where three rows and the target table where one rows the join automatically concatinates the one value (from Target ) table to all three Rows in Answer table .

suggest the DB in that case where you have one master record saved and against this master record you can have 1TON rows as answers

Free Windows Admin Tool Kit Click here and download it now
September 7th, 2015 1:32am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics