== Релациско мапирање === Ознаки * Примарните клучеви се означени со __**задебелени и подвлечени букви**__ * Задолжителните атрибути се означени со **задебелени букви** * Надворешните клучеви се означени со # проследено од името на референцираната табела, обвиени со (). - ''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, **user_id#(users)**, **created_at**) 6. **embeddable_thread** (**__id__**#(thread)) 7. **topic_thread** (**title**, parent_id#(project_thread), __**id#(embeddable_thread)**__) 8. **topic_guidelines** (__**id**__, __**topic_id#(topic_thread)**__, description) 9. **discussion_thread** (**parent_id**#(embeddable_thread), __**id#(embeddable_thread)**__) 10. **project_thread** (**title**, repo_url, __**id#(thread)**__) 11. **likes** (__**user_id#(users)**__, __**thread_id#(thread)**__) 12. **topic_threads_moderators** (__**thread_id#(thread)**__, __**user_id#(users)**__,**started_at**) 13. **tag** (__**name**__,**creator_id**#(moderator)) 14. **tag_threads** (__**thread_id#(thread)**__, __**tag_name#(tag)**__) 15. **topic_belongs_to_project** (__**topic_id#(thread)**__, __**project_id#(thread)**__) 16. **blacklisted_user** (__**topic_id#(thread)**__, __**user_id#(users)**__, __**moderator_id#(users)**__, __**start_date**__, end_date, reason) 17. **developer_associated_with_project** (__**project_id#(thread)**__, __**developer_id#(users)**__, __**started_at**__, ended_at) 18. **permissions** (__**name**__) 19. **project_roles** (__**name**__, __**project_id#**__(thread), description) 20. **users_project_roles** (__**user_id#(users)**__, __**project_id#(project_roles)**__, __**role_name#(project_roles)**__) 21. **project_roles_permissions** (__**permission_name#(permissions)**__, __**role_name#(project_roles)**__, __**project_id#(project_roles)**__) 22. **submission** (__**id**__,**created_at**,description,**status**,**created_by#(users)**) 22. **project_request** (__**id**#(submission)__, **project_id#(thread)**)) 23. **feedback** (description, **submission_type**, created_by#(users), **created_at**, __**submission_id#(submission)**__) 24. **report** (__**id**#(submission)__, __**thread_id**#(thread)__, __**for_user_id**#(users)) 25. **channel** (__**name**__, description, __**project_id#(thread)**__, **developer_id**#(users)) 26. **messages** (__**sent_at__**, **content**, __**sent_by#(users)**__, __**project_id#(channel)**__, __**channel_name#(channel)**__) == DDL скрипта за бришење и креирање на табелите [attachment:V1__init_ddl.3.sql] == DML скрипта за полнење на табелите за податоци [attachment:V2__add_test_data.sql] == Релационен дијаграм [[Image(ddl-diagram-v2.png)]]