wiki:RelationalDesign

Version 19 (modified by 225144, 10 days ago) ( diff )

--

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

Ознаки

  • Примарните клучеви се означени со задебелени и подвлечени букви
  • Задолжителните атрибути се означени со задебелени букви
  • Надворешните клучеви се означени со # проследено од името на референцираната табела, обвиени со (). - 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, user_id#(users), created_at)
  2. embeddable_thread (id#(thread))
  1. topic_thread (title, parent_id#(project_thread), id#(embeddable_thread))
  1. topic_guidelines (id, topic_id#(topic_thread), description)
  1. discussion_thread (parent_id#(embeddable_thread), id#(embeddable_thread))
  1. project_thread (title, repo_url, id#(thread))
  1. likes (user_id#(users), thread_id#(thread))
  1. topic_threads_moderators (thread_id#(thread), user_id#(users),started_at)
  1. tag (name,creator_id#(moderator))
  1. tag_threads (thread_id#(thread), tag_name#(tag))
  1. topic_belongs_to_project (topic_id#(thread), project_id#(thread))
  1. blacklisted_user (topic_id#(thread), user_id#(users), moderator_id#(users), start_date, end_date, reason)
  1. developer_associated_with_project (project_id#(thread), developer_id#(users), started_at, ended_at)
  1. permissions (name)
  1. project_roles (name, project_id#(thread), description)
  1. users_project_roles (user_id#(users), project_id#(project_roles), role_name#(project_roles))
  1. project_roles_permissions (permission_name#(permissions), role_name#(project_roles), project_id#(project_roles))
  1. submission (id,created_at,description,status,created_by#(users))
  1. project_request (id#(submission), project_id#(thread)))
  1. feedback (description, submission_type, created_by#(users), created_at, submission_id#(submission))
  1. report (id#(submission), thread_id#(thread), for_user_id#(users))
  1. channel (name, description, project_id#(thread), developer_id#(users))
  1. messages (sent_at, content, sent_by#(users), project_id#(channel), channel_name#(channel))

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

V1__init_ddl.3.sql

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

V2__add_test_data.sql

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

Attachments (11)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.