wiki:RelationalDesign

Релациско мапирање

Ознаки

  • Примарните клучеви се означени со задебелени и подвлечени букви
  • Задолжителните атрибути се означени со задебелени букви
  • Надворешните клучеви се означени со # проследено од името на референцираната табела, обвиени со (). - attb#(tabela)
  • Наследување се означува со наследениот примарен клуч обвиен со "*" само при првото појавување на табелата, потоа во следни појавувања се референцира примарниот клуч од основната класа.

Табели

  1. users (id, username, email, name, is_activate, password, description, registered_at, sex)
  1. moderator (id#(users))
  1. developer (id#(users))
  1. project_manager (id#(users))
  1. thread (id, content, created_at, is_created_by#(users))
  1. project_thread (id#(thread), title, repo_url)
  1. embeddable_thread (id#(thread))
  1. topic_thread (id#(embeddable_thread), title, referenced_by#(project_thread))
  1. topic_guidelines (id, topic_id#(topic_thread), description)
  1. discussion_thread (id#(embeddable_thread), contained_in#(embeddable_thread))
  1. likes (user_id#(users), thread_id#(thread))
  1. topic_thread_is_moderated_by_moderator (thread_id#(topic_thread), user_id#(moderator), started_at)
  1. tag (name, creator_id#(users))
  1. tag_assigned_to_thread (thread_id#(thread), tag_name#(tag))
  1. blacklisted_user (id, refers_to#(users), blacklisted_by#(moderator), blacklisted_from#(topic_thread), start_date, end_date, reason)
  1. developer_associated_with_project (in_project#(project_thread), about_dev#(developer), started_at, ended_at)
  1. permissions (name)
  1. project_role (id, name, valid_in#(project_thread), override_type)
  1. role_permissions (for_permission#(permissions), for_role#(project_role))
  1. role_permissions_overrides (for_role_permission_role_id#(project_role), for_role_permission_permission_name#(permissions), for_resource#(channel))
  1. project_role_is_assigned_to_developer (user_id#(developer), role_id#(project_role))
  1. submission (id, created_at, description, status, submitted_by#(users))
  1. project_request (id#(submission), project_receives#(project_thread))
  1. feedback (submitted_for#(submission), description, submission_type, created_at, written_by#(users))
  1. report (id#(submission), for_misconduct_in#(topic_thread), about#(users))
  1. channel (id, name, project_has#(project_thread), description, constructed_by#(developer))
  1. messages (sent_in(channel), sent_at , sent_by#(developer) , content)

DDL скрипта за бришење и креирање на табелите

V1__init_ddl.6.sql

DML скрипта за полнење на табелите за податоци

V6__add_test_data.sql

Релационен дијаграм

Last modified 3 weeks ago Last modified on 09/26/25 14:43:47

Attachments (24)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.