I am trying to make a programme that receives multiple data from many different shopping APIs around the web regarding some product prices in different supermarkets.
I want to store these data to my programme and then access them and manipulate them by finding each products lowest price in the different supermarkets. The data are constantly changing so storing, getting and manipulating them should happen as fast as possible.
Until now i am storing them in a dictionary but i was wondering if an SQL database (or another database) could make the programme run faster.
For example i have received and stored the following data in a dictionary(but the number of supermarkets are over 100 and the products are also over 1000 in each one).Would storing and getting them for manipulation from a database would be faster than a dictionary?
pricesDict = { "supermarket_1": {"apples": 1, "bananas": 2, "melons": 3},
"supermarket_2": {"apples": 1.5, "bananas": 2, "melons": 3},
"supermarket_3": {"apples": 1, "bananas": 2, "melons": 3},
"supermarket_4": {"apples": 1, "bananas": 2.7, "melons": 3}}
Thanks!