Matching between product and customer personal information
-
I writing some application that find ( according to some question ) information about some person ( lets say that the information are weight, hight and age of the person ). In the other hand i have product list ( can be very big one ) and according to the product information i need to find the best matching between the person information and the product ( the product information that i have are water part, nitrogen part and ext. ) I can't use flow chart algorithm or Breadth-first search because the number of the product is dynamically ( read the product list from DB ... )
-
I writing some application that find ( according to some question ) information about some person ( lets say that the information are weight, hight and age of the person ). In the other hand i have product list ( can be very big one ) and according to the product information i need to find the best matching between the person information and the product ( the product information that i have are water part, nitrogen part and ext. ) I can't use flow chart algorithm or Breadth-first search because the number of the product is dynamically ( read the product list from DB ... )
Since much detail has been left out (which is expected, given that it's an architecture forum) I'd make an assumption that finding the "best matching" can be expressed mathematically as finding an extremum of a function of some sort, and that the product list is stored in a SQL database. Suppose that the quality of the match can be evaluated as a function MatchQuality. When you get parameters of a person for whom you're finding a matching product, you can build a SQL query that corresponds to your MatchQuality function and the parameters of the given person. Consider this silly example: suppose your
MatchQuality(age, weight, water, nitro) = age^2/nitro + water/weight
, and the match is best when MatchQuality is highest. A query for the best product comes in: weight=170lb, age=65yr. The query below returns the best match:select top 1
from Products
order by (65*65)/nitro + water/170 desc