I would like to know if this is a good practice to store variables and classes names in database to use let users accessing them.
For instance users may create entries in database's table in which they can insert a program's function name that would executed when the program will read it.
I find it is a dangerous practice since users may execute or access any data of the program, but I've been told it's a quite common practice in languages with introspection like Python.
Moreover, i was also suggested to have field in a table that would store another table field's name, to create somehow a dynamic foreign key.
I personally find both practices very bad since in first case there is no more separation between user data and program data, and for the second case there is no separation between structure and data in the database.
Can you please confirm me these practices are discouraged or tell me I'm wrong and suggest me a way to approach them in a safer way.