I want to develop a site which can compare two products based on their features.

I want to store features as attributes in database. For example, Cellphone is a product so 'Screen Type' and 'Screen Resolution' are attributes and their values could be LED/AMOLED and 800x400/340x230.

Database could be of Cellphone/Laptop/TV but database will be for one product type only.

I want to know if there are **any algorithms to find out best of two depending on their attributes?**

Any suggestion/pointers will be more appreciated.