android - SQLite singular/plural search -


i'm building android app college project. searches sqlite database recipes according ingredients user specifies. i'm still @ beginning, , i've run problem. i'm storing ingredients singular in database. each ingredient appears once , i'm using junction table connect between recipes , ingredients (many-to-many), , table specifies quantity , unit of measurement.

the problem search itself. if user types ingredients in plural form (which case)? example, if have "tomato" ingredient , user types "tomatoes", how can make work? thing, how can list ingredients in singular or plural forms needed when displaying recipes ("1 egg", "2 potatoes"... etc)? i'm starting think if store separate ingredients each recipe might easier, "2 cups of milk" 1 recipe , once again "1 cup of milk" instead of "milk" , specifying quantity , uom in separate columns, though it'd less efficient, though in case won't needing junction table.

sorry if question stupid. haven't been able find solution this, , i'm stuck @ beginning of project , unable progress further.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -