prefSQL

Preference-driven querying of relational databases

Posted by migaman on July 19, 2015
Photo by Cole Keister

prefSQL is a framework for preference-driven querying of relational databases. It was an output of my of my master thesis and allows to query for preferences (soft criteria) instead of knockout criteria (filters).

Human’s have preferences. Unfortunately relational databases and SQL are not really built for that. Instead they work with filters (WHERE-Clause). This resulted in platforms which ask the user for hard constraints like how many stars, which price range, ….
However, usually you know exactly what you want but you are not able to search for it. Imagine a hotel booking platform where you can search for your three preferences (cheap as possible, closest to the sea, highest ratings). You would find your hotel in seconds instead of hours.

You can find some demo applications here.
prefSQL is OpenSource you can find the code here.