java – Alternative to using enum

The project I’m working on has a code dependency on a TeamNames enum. The clear issue with this is that the project needs to be recompiled and redeployed on any addition/deletion in TeamNames. How can I go about removing this dependency?

I have come up with 2 solutions:

  1. Accepting each and every TeamName as a String field. The issue with this is possible garbage values being entered by the user.
  2. Storing TeamNames in a DB and validating when the user enters the name. Creating a single-column table in a DB just for team names would be overkill IMO.

What alternatives could I look into, to find a better approach to solving this?