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
- users (id, username, password, email)
- admins (user_id* (Users))
- components (id, name, brand, price, type, img_url)
- cpu (component_id* (Components), socket, cores, threads, base_clock, boost_clock, tdp)
- gpu (component_id* (Components), vram, tdp, base_clock, boost_clock, chipset, length)
- memory (component_id* (Components), type, speed, capacity, modules)
- storage (component_id* (Components), type, capacity, form_factor)
- power_supply (component_id* (Components), type, wattage, form_factor)
- motherboard (component_id* (Components), socket, chipset, form_factor, ram_type, num_ram_slots, max_ram_capacity, pci_express_slots)
- pc_case (component_id* (Components), cooler_max_height, gpu_max_length)
- case_storage_form_factors (case_id*(PC_Case), form_factor, num_slots)
- case_ps_form_factors (case_id*(PC_Case), form_factor)
- case_mobo_form_factors (case_id*(PC_Case), form_factor)
- cooler (component_id* (Components), type, height, max_tdp_supported)
- cooler_cpu_sockets (cooler_id*(Cooler), socket)
- memory_card (component_id* (Components), num_slots, interface)
- optical_drive (component_id* (Components), form_factor, type, interface, write_speed, read_speed)
- sound_card (component_id* (Components), sample_rate, bit_depth, chipset, interface, channel)
- cables (component_id* (Components), length_cm, type)
- network_adapter (component_id* (Components), wifi_version, interface, num_antennas)
- network_card (component_id* (Components), num_ports, speed, interface)
- build (id, user_id* (Users), name, created_at, description, total_price, is_approved)
- build_component (build_id*(Build), component_id*(Component), num_components)
- favorite_build (build_id*(Build), user_id*(Users))
- rating_build (build_id*(Build), user_id*(Users), value)
- review (id, build_id* (Build), user_id* (Users), content, created_at)
- suggestions (id, user_id* (Users), admin_id* (Admins), link, admin_comment, description, status, component_type)
DDL script for creating the database schema
DML script for filling tables with data
Relational diagram
Last modified
11 days ago
Last modified on 01/29/26 00:35:36
Attachments (4)
- relational-design.png (240.6 KB ) - added by 7 weeks ago.
- data_load.sql (28.4 KB ) - added by 2 weeks ago.
- schema_creation.sql (8.4 KB ) - added by 11 days ago.
- image.png (247.0 KB ) - added by 11 days ago.
Download all attachments as: .zip
Note:
See TracWiki
for help on using the wiki.

