I have a question about a database schema for a certain website where people can sell and buy stuff.
When someone adds an ad to the database, he will choose the category and fills out the filters that belong to the selected category, so anyone can easily find his ad by browsing to a category and choosing filters like:
[bluetooth] yes
[camera] 3 - 5 megapixels.
Et cetera
What is the best way to store these filters in the database? This is what I have so far:
This is just an idea, but it will never send the ads back with value for filter "megapixels" between 3 and 5, since filter_value
is of type VARCHAR
.