== Релациско мапирање === Ознаки * Примарните клучеви се означени со __**задебелени и подвлечени букви**__ * Задолжителните атрибути се означени со **задебелени букви** * Надворешните клучеви се означени со # проследено од името на референцираната табела, обвиени со (). - ''attb#(tabela)'' * Наследување се означува со наследениот примарен клуч обвиен со "*" **''само при првото појавување на табелата, потоа во следни појавувања се референцира примарниот клуч од основната класа.''** === Табели 1. **users** (__**id**__, **username**, **email**, **name**, **is_activate**, **password**, description, **registered_at**, **sex**) 2. **moderator** (__**id#(users)**__) 3. **developer** (__**id#(users)**__) 4. **project_manager** (__**id#(users)**__) 5. **thread** (__**id**__, content, **created_at**, **user_id#(users)**) 6. **project_thread** (__**id#(thread)**, **title**, repo_url) 7. **embeddable_thread** (__**id#(thread)**) 8. **topic_thread** (__**id#(embeddable_thread)**, **title**, parent_id#(project_thread)) 9. **topic_guidelines** (__**id**__, __**topic_id#(topic_thread)**__, description) 10. **discussion_thread** (__**id#(embeddable_thread)**, **parent_id#(embeddable_thread)**__) 11. **likes** (__**user_id#(users)**__, __**thread_id#(thread)**__) 12. **topic_threads_moderators** (__**thread_id#(topic_thread)**__, __**user_id#(moderator)**__, **started_at**) 13. **tag** (__**name**__, **creator_id#(moderator)**__) 14. **tag_threads** (__**thread_id#(thread)**__, __**tag_name#(tag)**__) 15. **blacklisted_user** (__**user_id#(users)**__, __**moderator_id#(moderator)**__, __**topic_id#(topic_thread)**__, __**start_date**__, end_date, reason) 16. **developer_associated_with_project** (__**project_id#(project_thread)**__, __**developer_id#(developer)**__, __**started_at**__, ended_at) 17. **permissions** (__**name**__) 18. **project_resource** (__**id**__) 19. **project_role** (__**id**__, **name**, **project_id#(project_thread)**, **override_type**) 20. **role_permissions** (__**permission_name#(permissions)**__, __**role_id#(project_role)**__) 21. **role_permissions_overrides** (__**role_id#(project_role)**__, __**permission_name#(permissions)**__, __**project_resource_id#(project_resource)**__) 22. **users_project_roles** (__**user_id#(developer)**__, __**role_id#(project_role)**__) 23. **submission** (__**id**__, **created_at**, **description**, **status**, **created_by#(users)**) 24. **project_request** (__**id#(submission)**, **project_id#(thread)**__) 25. **feedback** (__**submission_id#(submission)**, description, **submission_type**, **created_at**, **created_by#(users)**) 26. **report** (__**id#(submission)**, **thread_id#(topic_thread)**__, **for_user_id#(users)**__) 27. **channel** (__**name**, __**project_id#(project_thread)**__, description, **project_resource_id#(project_resource)**, **developer_id#(developer)**) 28. **messages** (__**channel_name#(channel)**__, __**project_id#(project_thread)**__, __**sent_at**__, __**sent_by#(developer)**__, **content**) == DDL скрипта за бришење и креирање на табелите [attachment:V1__init_ddl.4.sql] == DML скрипта за полнење на табелите за податоци [attachment:V5__add_test_data.sql] == Релационен дијаграм [[Image(ddl-diagram-v3.png)]]