Hi at all,
wanted to ask if any of you have a best practice regarding value lists in a multiuser, multilingual SAAS environment.
I see the following approaches:
- A table for every list consisting of the value and a user field for security purposes. On the one hand this approach makes it very clear, for which purpose a list/table is used and it can be space optimized. On the other hand you get so many tables in large solutions, that your organizational diagram gets very large and slow. Same for the user rights table entries.
- You define one central table with a field for "list type", value and user and in lookups you always have a where-clause on list-type, to get the wanted values. This might not be as space optimized as the first approach, but you only have one table in your diagram.
Both approaches can be made multilingual and I see again two ways to do this:
- Add a field "language" to your value lists and then duplicate the entries for every language with the value localized in the respective language. The big pro of this approach is, that you can have as many languages as you like without changing the db structure. But it might get cluttered and difficult to find, for which language a value might be missing.
- Duplicate the value field for every language you might want to support. This is rather inflexible regarding the number of languages, but how often do you change that? Maintaining the translations is rather easy and straightforward.
With the where-clause in lookups you can get the language values you need. But be careful. You need to save an ID field and not the language value to stay multilingual. This makes it more complicated for import and export as well as queries.
Biggest problem in my eyes for a SAAS solution is the case, where you want to have some standard values for all AND the ability for every user to add custom values. With the standard dynamic security options you can't really have that. "User can see all and edit only their own data" shows them values they don´t want to have. So you would have to add to your where clause something like "where user=admin or user=customer" to achieve this.
So what are you doing? Any other, better approach? What´s best practice?