I am wanting to do something similar to this:
My question involves the concept rather than any specific code on how to execute this.
For example, we are selling violins and we want the user to input info about their playing style, and give them the three best violins based on their entry.m This is the data I've been given:
Level: Beginner Intermediate Advanced Soil, Kreisler, Gibson Soil, Kreisler, Ysaye, Cremonese, Gibson Cannon, Soil, Ysaye, K.Joseph, Keifetz Bowing Style: Soft Medium Hard Soil, Medici, Kreisler Soil, Medici, K.Joseph, Ysaye Cannon, Kreisler, Soil, Heifetz Musical Style: Classical Fiddle Rock Ysaye, Soil, Provigny Medici, Ysaye, K.Joseph Kreisler, Diable, Vieuxtemps Desired Tone: Bright Balanced Dark Soil, Medici, Provigny Kreisler, Soil, Ysaye Cannon, Diable, Plowden
So if the user inputs Expert, Hard, Rock, and Dark I will data sets of violins consisting of: Cannon, Soil, Ysaye, K.Joseph, Heifetz // Cannon, Kreisler, Soil, Heifetz // Kreisler, Diable, Vieuxtemps // Cannon, Diable, Plowden
Out of those I need to output the user the three best choices for them. Cannon is listed in 3 out of the 4, so that has to be #1. Now there are three more violins that match two of the criteria. The Soil, Kriesler and Diable. In order to drill that down to two choices, I would think the questions would have to be ranked according to importance. For instance Tone is most important, followed by bowing style, musical genre, and skill level. Based on that ranking, the program should choose the Diable and Kreisler.
I am not entirely sure how to approach this. Since this data will not change frequently, should this even get the database involved? Should the info just be stored in a multi-dimensional array? Once the data is in an array, whether from the DB or not, how should I go about programming the logic to examine the arrays in order of importance and grab the violins that are most relevant?
Any help is much appreciated! I figured this was going to be easy, until I actually started thinking about it!