Suppose I have n types of users in my application.
I am using an UserType enumeration to distinguish them.
Do I need to keep a table in
Often in practice you have a table in the database and the corresponding enumeration in the source code.
Enumeration makes it easy for you to work with values that otherwise would not have sense to you.
Having a table in the database lets you perform queries and see in results values that make sense + enforce data integrity (foreign keys).
The challenge here is to keep the table values synchronized with those of the enumeration. But it works well in practice.