What would be the best way to accomplish the following: I have access to some player info via an API. I'd now like to persist, in a sql database, the way to calculate scores using the player info. How would one accomplish that?

For example: 

I want to compute scores based on RushingYards: Int, Touchdowns: Int and Interceptions: Int. Pretty much, I want to create a scoring system with the following specs:

```
1 point for every 25 RushingYards,
3 points for every Touchdown
2 points for every Interception

```

Writing this in pure code is simple, but how can I put this in the SQL DB, as I need multiple, dynamically created "scoring systems"? Lastly, I would like to retrive the persisted data and use it to compute scores in Scala.

Thanks.