Answer the question
In order to leave comments, you need to log in
What is the best way to organize the work of the database to select the optimal PC assembly according to the tables of components?
Hello! They gave the task at the university to design and implement such a database:
I implemented the following structure:
There are the following components - mat. board, CPU, RAM, video card, power supply, case,
cooler etc.).
In turn, for each component table there is a table - a price list with fields (component id, store id, price).
The only way I could come up with to solve the task for selecting a PC assembly that I could think of was to create a VIEW of all possible PC assemblies, simultaneously from three stores, i.e. all possible combinations of matching components. It turns out a table of the following type: (id of the motherboard, Id of the motherboard store, Price of the motherboard in this store; Id of the processor, Id of the processor store, etc....). Those. combinatorial solution.
The problem is that there are a lot of such assembly options (at least several million).
So, the question is: HOW CAN THIS BE DONE MORE CORRECTLY? Or is my solution acceptable?
I would be very grateful for your help! Thank you!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question