Menu

📰
0

Reddit - Please wait for verification

News and Notes on the Structured Query Language·/u/profichef·2 days ago
#ZLRLbdvC
#sql#reddit#photo#article#video#discussion
Reading 0:00
15s threshold

Hi everyone, I'm working on a small online store that sells gadgets - about 5-7 types of devices (smartphones, smartwatches, tablets, etc.). Nothing crazy big, but users need to filter by stuff like: battery life / capacity screen size (inches) display type (OLED, IPS, etc.) processor Now I'm stuck on how to structure the DB. Here's what I'm considering: One flat table per device type - like phones, watches, tablets 130-150 col - each with its own columns for specs. One big products table with a JSON column for all the technical details. Split into component tables - displays, battery, memory, network - and link them to products. I'm leaning toward keeping it simple, but I also want filtering to work well without shooting myself in the foot later. What would you recommend for a real project? Is JSON fine for filtering by range (e.g., battery > 4000), or does it get messy? Thanks a ton. Stack: MySQL 8+ submitted by /u/profichef [link] [comments]

Read More