many user can create many Events. And users can send request to owner to participate in that event(as candidate, voter or both). When it’s a candidate request then additional details are stored in candidate details table.
User(u_id pk, username, password)
Event(e_id pk,u_id,e_name,e_date)
UserRequestPool(urp_id pk,u_id,e_id,request_type)#adding 2 entries if request type is both
CandidateDetails(id pk,u_id,e_id,candidate_image,candidate_promises)
Ballot(u_id,e_id,flag) #to ensure duplicate voting
You should store the user request pool id in the candidate details instead of the event id and user id:
Same for the ballot table:
You might want to store the request types in a table: