Comparison website (table design)

  • Hi,
    I'm designing a plugin for wordpress that will hold product details for comparison.. the results will look similar to this - https://www.forexdominance.com/test2/

    What I'm asking is what's the best way to hold this data in a table.. should I just create a field for each comparable field and value.. although there could be 85 unique data fields?  or should I use a single json field to hold all the data?

    thanks
    Craig.

  • What do you want to do with it?
    There are many solutions that are all equally valid, but may depend on how you expect to use the data. Modifying or comparing parts of a JSON column is slightly more awkward than straight columns, but if you're never really modifying or querying the data directly and want the flexibility to store different structures then JSON can be more appropriate. Equally if you're only occasionally querying parts of the JSON, you might want to store the data in JSON but use calculated columns to extract key values (using strict$.path to guarantee certain bits of the JSON can't be null is also useful here).

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply