= Логички и физички дизајн === Релациска шема (со мапирачка трансформација) • ''Primary key: __Underline__'' • ''Foreign key: *'' • ''not null: **Bold**'' ---- • User(__**userID**__, fullName, **username**, **password**) • Administrator(__**userID__***(user)) • Moderator(__**userID__***(user)) • Quiz Taker(__**userID__***(user)) • Tournament Organizer(__**tournamentOrganizerID__**, __**userID__***(moderator)) • Tournament(__**tournamentID**__, **tournamentName**) • Tournament Phase(__**tournamentPhaseID**__, **tournamentID***(tournament), **tournamentPhaseName**) • Subject(__**subjectID**__, **name**) • Category(__**categoryID**__, **name**, **subjectID***(subject)) • Quiz(__**quizID**__, **categoryID***(category), **quizName**, tournamentPhaseID*(tournament Phase)) • Medal(__**medalID**__, **tournamentID***(tournament), **medalName**, **description**) • Question(__**questionID**__, **questionText**) • Hint(__**hintID**__, **hintText**, **questionID***(question)) • Text Question(__**questionID**__*(question)) • Selection Question(__**questionID**__*(question)) • Choice(__**choiceID**__, **questionID***(selectionQuestion), **isCorrect**, **choiceText**) • Selected Choice(__**selectedChoiceID**__, __**choiceID**__*(choice), **attemptID***(attempt)) • Attempt(__**attemptID**__, **userID***(quizTaker), **attemptDate**, **quizID***(quiz)) • Result(__**resultID**__, **attemptID***(attempt), **points**) • Badge(__**badgeID**__, **badgeName**, **description**, **resultID***(result)) • quiz_is_part_of_tournament(__**quizID**__*(quiz), __**tournamentID**__*(tournament)) • tournamentOrganizer_hosts _tournament(__**userID**__*(tournamentOrganizer), __**tournamentID**__*(tournament)) • question_is_part_of_quiz(__**questionID**__*(question), __**quizID**__*(quiz)) • quizTaker_participates_in_tournament(__**userID**__*(quizTaker), __**tournamentID**__*(tournament)) • quizTaker_participates_in_tournamentPhase(__**userID**__*(quizTaker), __**tournamentPhaseID**__*(tournament Phase)) • medal_is_awarded_to_quizTaker(__**medalID**__*(medal), __**userID**__*(quizTaker)) • badge_is_awarded_to_quizTaker(__**badgeID**__*(medal), __**userID**__*(quizTaker)) === DDL скрипта за бришење на табелите и креирање на табелите [attachment:KreiranjeTabeli.sql KreiranjeTabeli.sql] === DML скрипта за полнење на табелите со податоци [attachment:PolnenjeTabeli.sql PolnenjeTabeli.sql] === Релациски дијаграм изваден од DBeaver [[Image(DBeaver_Dijagram.png)]]