✅ Logic to choose different context from database in code
In my opinion, it's better to keep them organized, there should be separate services for both of them because they might have same properties for now but what if later on they grow and have different props and functions
on the first line you shouldn't split the input based on the whitespace but based on the commas because what if a name contains the whitespace in itself? won't that create problem so instead do this: