wiki:RelationalDesign

Version 1 (modified by 233144, 12 days ago) ( diff )

--

Relational Design

Notation

  • Primary keys are bolded and underlined.
  • Foreign keys are marked with * at the end of their name and the referenced entity is written in parentheses.
  • Required (not optional) attributes are bolded.

Tables

  1. Users (id, username, password, email)
  1. Admins (user_id* (Users))
  1. Components (id, name, brand, price, img_url)
  1. CPU (component_id* (Components), socket, cores, threads, base_clock, boost_clock, tdp)
  1. GPU (component_id* (Components), vram, tdp, base_clock, boost_clock, chipset, length)
  1. Memory (component_id* (Components), type, speed, capacity, modules)
  1. Storage (component_id* (Components), type, capacity, form_factor)
  1. Power_Supply (component_id* (Components), type, wattage, form_factor)
  1. Motherboard (component_id* (Components), socket, chipset, form_factor, ram_type, num_ram_slots, max_ram_capacity)
  1. PC_Case (component_id* (Components), cooler_max_height, gpu_max_length)
  1. Case_Storage_Form_Factors (case_id, form_factor)
  1. Case_PS_Form_Factors (case_id, form_factor)
  1. Case_Mobo_Form_Factors (case_id, form_factor)
  1. Cooler (component_id* (Components), type, height, max_tdp_supported)
  1. Cooler_CPU_Sockets (cooler_id, socket)
  1. Memory_Card (component_id* (Components), num_slots, interface)
  1. Optical_Drive (component_id* (Components), form_factor, type, interface, write_speed, read_speed)
  1. Sound_Card (component_id* (Components), sample_rate, bit_depth, chipset, interface)
  1. Sound_Card_Channels (sound_card_id, channel)
  1. Cables (component_id* (Components), length_cm, type)
  1. Network_Adapter (component_id* (Components), wifi_version, interface, num_antennas)
  1. Network_Card (component_id* (Components), num_ports, speed, interface)
  1. Build (id, user_id* (Users), name, created_at, description, total_price, is_approved)
  1. Build_Component (build_id, component_id)
  1. Favorite_Build (build_id, user_id)
  1. Rating_Build (build_id, user_id, value)
  1. Review (id, build_id* (Build), user_id* (Users), content, created_at)
  1. Suggestions (id, user_id* (Users), admin_id* (Admins), link, admin_comment, description, status, component_type)

DDL script for creating the database schema

https://develop.finki.ukim.mk/projects/pc-forge/attachment/wiki/WikiStart/schema_creation.sql

DML script for filling tables with data

https://develop.finki.ukim.mk/projects/pc-forge/attachment/wiki/WikiStart/data_load.sql

Relational diagram

No image "relational-diagram.png" attached to RelationalDesign

Attachments (3)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.