Hi Guys,
I have a query regarding best practice for performance on a web application I'm developing.
I am retrieving data via an API that I then need to display on a website.
The data retrieved all relates to a product ID. The issue I am having is that each product has a UniqueID, but also a GroupID. The GroupID is used to display the same products but of different colour/size combinations.
ie.
UniqueID
GroupID
Size
Colour
1
1
n/a
n/a
2
2
Small
Red
3
2
Medium
Blue
4
2
Large
Green
I need to display the products in a list, but where there are multiple products in a group, I need to provide a dropdown selector for size and a dropdown selector for colour.
I'm struggling a bit with how to structure it with just the array spat out by the API, so I was considering saving the data to a MySQL database and then querying that to get what I need.
Is this a good way to go or is the double query hit going to be horribly inefficient?
Cheers!