wiki:ERModel

Version 7 (modified by 233144, 4 days ago) ( diff )

--

ERModel

Diagram

Data requirements

Entities

Users – Entity that defines the users of the platform.

  • id – numeric type (primary key)
  • username – text type (required, unique)
  • password – text type (required)
  • email – text type (required, unique)

Admins – Administrator profile. Inherits from Users.

  • user_id – numeric type (primary key, foreign key to Users)

Suggestion – Lets users to suggest components that they want to be added.

  • id – numeric type (primary key)
  • user_id – numeric type (foreign key to Users)
  • admin_id – numeric type (foreign key to Admins)
  • link – text type (required)
  • admin_comment – text type (optional)
  • description – text type (optional)
  • status – text type (required)
  • component type – text type (required)

Component – Entity representing all hardware components.

  • id – numeric type (primary key)
  • name – text type (required)
  • brand – text type (required)
  • price – numeric type (required)
  • type – text type (required)
  • img_url – text type (optional)

CPU – Entity detailing CPU components. Inherits from Component.

  • component_id – numeric type (primary & foreign key to Component)
  • socket – text type (required)
  • cores – numeric type (required)
  • threads – numeric type (required)
  • base_clock – numeric type (required)
  • boost_clock – numeric type (optional)
  • tdp – numeric type (required)

GPU – Entity for graphics cards. Inherits from Component.

  • component_id – numeric type (primary & foreign key to Component)
  • vram – numeric type (required)
  • tdp – numeric type (required)
  • base_clock – numeric type (optional)
  • boost_clock – numeric type (optional)
  • chipset – text type (required)
  • length – numeric type (required)

Memory – RAM modules. Inherits from Component.

  • component_id – numeric type (primary & foreign key to Component)
  • type – text type (required)
  • speed – numeric type (required)
  • capacity – numeric type (required)
  • modules – numeric type (required)

Power_Supply – Power supply units. Inherits from Component.

  • component_id – numeric type (primary & foreign key to Component)
  • type – text type (required)
  • wattage – numeric type (required)
  • form_factor – text type (required)

Case – Computer cases. Inherits from Component.

  • component_id – numeric type (primary & foreign key to Component)
  • cooler_max_height – numeric type (required)
  • gpu_max_length – numeric type (required)

Case_Storage_Form_Factors – Supported storage form factors for a case.

  • case_id – numeric type (primary key & foreign key to Case)
  • form_factor – text type (primary key)
  • num_slots – numeric type (required)

Case_PS_Form_Factors – Supported Power Supply form factors for a case.

  • case_id – numeric type (primary key & foreign key to Case)
  • form_factor – text type (primary key)

Case_Mobo_Form_Factors – Supported motherboard form factors for a case.

  • case_id – numeric type (primary key & foreign key to Case)
  • form_factor – text type (primary key)

Cooler – CPU coolers. Inherits from Component.

  • component_id – numeric type (primary & foreign key to Component)
  • type – text type (required)
  • height – numeric type (required)
  • max_tdp_supported – numeric type (required)

Cooler_CPU_Sockets – Supported CPU sockets for a cooler.

  • cooler_id – numeric type (primary key & foreign key to Cooler)
  • socket – text type (primary key)

Motherboard – Motherboards. Inherits from Component.

  • component_id – numeric type (primary & foreign key to Component)
  • socket – text type (required)
  • chipset – text type (required)
  • form_factor – text type (required)
  • ram_type – text type (required)
  • num_ram_slots – numeric type (required)
  • max_ram_capacity – numeric type (required)
  • pci_express_slots – numeric type (required)

Storage – Storage devices. Inherits from Component.

  • component_id – numeric type (primary & foreign key to Component)
  • type – text type (required)
  • capacity – numeric type (required)
  • form_factor – text type (required)

Memory_Card – Memory card readers. Inherits from Component.

  • component_id – numeric type (primary & foreign key to Component)
  • num_slots – numeric type (required)
  • interface – text type (required)

Optical_Drive – CD/DVD/Blu-Ray drives. Inherits from Component.

  • component_id – numeric type (primary & foreign key to Component)
  • form_factor – text type (required)
  • type – text type (required)
  • interface – text type (required)
  • write_speed – numeric type (required)
  • read_speed – numeric type (required)

Sound_Card – Dedicated sound cards. Inherits from Component.

  • component_id – numeric type (primary & foreign key to Component)
  • sample_rate – numeric type (required)
  • bit_depth – numeric type (required)
  • chipset – text type (required)
  • interface – text type (required)
  • channel – text type (required)

Cables – Computer cables. Inherits from Component.

  • component_id – numeric type (primary & foreign key to Component)
  • length_cm – numeric type (required)
  • type – text type (required)

Network_Adapter – Wireless network adapters. Inherits from Component.

  • component_id – numeric type (primary & foreign key to Component)
  • wifi_version – text type (required)
  • interface – text type (required)
  • num_antennas – numeric type (required)

Network_Card – Wired network cards. Inherits from Component.

  • component_id – numeric type (primary & foreign key to Component)
  • num_ports – numeric type (required)
  • speed – numeric type (required)
  • interface – text type (required)

Build – Entity for user PC configurations.

  • id – numeric type (primary key)
  • user_id – numeric type (foreign key to Users)
  • name – text type (required)
  • created_at – date type (required)
  • description – text type (optional)
  • total_price – numeric type (required)
  • is_approved – boolean type (required)

Build_Component – Components belonging to a configuration.

  • build_id – numeric type (primary key, foreign key to Build)
  • component_id – numeric type (primary key, foreign key to Component)

Favorite_Build – User’s favorited configurations.

  • build_id – numeric type (primary key, foreign key to Build)
  • user_id – numeric type (primary key, foreign key to Users)

Rating_Build – Ratings for PC builds.

  • build_id – numeric type (primary key, foreign key to Build)
  • user_id – numeric type (primary key, foreign key to Users)
  • value – numeric type (required)

Review – User comments on a build.

  • id – numeric type (primary key)
  • build_id – numeric type (foreign key to Build)
  • user_id – numeric type (foreign key to Users)
  • content – text type (required)
  • created_at – date type (required)

Relations

  • owns_build – 1:N relationship between Users and Build, linking a user to their PC configurations.
  • has_component – N:M relationship between Build and Component, representing components included in a build.
  • favorites – N:M relationship between Users and Build, allowing users to favorite builds.
  • rates – N:M relationship between Users and Build, allowing users to give ratings (1–5).
  • written_by – 1:N relationship between Users and Review, linking users to their written reviews.
  • reviews – 1:N relationship between Build and Review, linking reviews to a specific build.
  • submit – 1:N relationship between Users and Suggestion, allowing users to suggest components.
  • moderate – 1:N relationship between Admins and Suggestion, allowing admins to approve or reject user suggestions.

Attachments (3)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.