Well of course you should define the methods in DB entry, that way they can be changed as needed as business needs change. Seeing as nobody is going to be touching the absolutely sacrosanct source code, putting functions in the DB and reading them into the code base during compile and/or hot-reload is really the only reasonable way.