I'm building an Android app for a college project. It searches an SQLite database for recipes according to ingredients that the user specifies. I'm still at the beginning, and I've run into this problem. I'm storing ingredients as singular in the database. Each ingredient appears only once and I'm using a junction table to connect between recipes and ingredients (many-to-many), and this table also specifies the quantity and unit of measurement.
The problem is with the search itself. What if the user types the ingredients in plural form (which is the most likely case)? For example, if I have "tomato" as an ingredient and the user types "tomatoes", how can I make this work? Another thing, how can I list ingredients in singular or plural forms as needed when displaying recipes ("1 egg", "2 potatoes"... etc)? I'm starting to think that if I store separate ingredients for each recipe it might be easier, like "2 cups of milk" for one recipe and then once again "1 cup of milk" for another instead of simply "milk" and then specifying the quantity and UOM in separate columns, though it'd be less efficient, though in this case I won't be needing the junction table.
Sorry if this question is stupid. I haven't been able to find a solution for this, and thus I'm stuck at the beginning of my project and unable to progress further.