sql - Access Query - Compare Multiple User Selections Against Each Other -
i'm running conceptual problem cannot seem conquer in mind.
let's want user enter they're wearing database via form. throwing 't-shirt' , 'blue' in new row incredibly easy. however, let's want compare 1 users against others, , rank in order similar least.
this becomes huge nightmare when consider amount of options available.
- undershirt
- overshirt
- jacket
- scarf/necklaces
- headwear
- pants
- underwear
- leggings
- socks
- footwear
- accessories
as see it, hard-code in 11 categories above , let user make selections drop-drop boxes tailored each category. now, let's use example of 'undershirt' , 'overshirt'. depending on person, long-sleeved shirt used either; they're still wearing one. if make users put values in categories, user might put in 1 , user b might in category. , wouldn't compared because of that, separate categories.
now, instead of hard-coding in categories (and making limit of how user can enter), put each item own row , search user id. let's person enters in shorts 1 day, , next throws in jeans , shirt. how can make sure they're compared separately (e.g., dress compared shorts, dress compared jeans+shirt) , not (dress compared shorts+jeans+shirt).
as comparing, each item vs. each other performed via 2d lookup table. (row dress vs. column jeans net zero, row dress vs. column dress net one)
the appropriate design depend on acceptable margin of error. if there 0 acceptable error, must present users categories , specify true/false yes/no each 1 or select limited set of possible answers.
hands: gloves mittens brass knuckles [caveat: user wearing brass knuckles inside mittens. have take account whether values mutually exclusive or not. barefoot <> no socks. barefoot not wearing socks not wearings socks may wearing docksiders] feet1: anklet socks sheer stockings fishnet stockings ragg wool hiking socks kneesocks gym socks no socks feet2: mocassins running shoes sandals wing-tips uggs spike heels ... head: sombrero beret baseball hat pirate's hat beanie knitted cap neck: scarf mock turtleneck aka dickie
et cetera et cetera ad nauseam.
or if margin of error generous, allow simple freeform text-entry , match/partial-match on words. less error : set synonyms table , match on synonyms of supplied words.
Comments
Post a Comment