Need some super-noob help with some concepts

You could run a Rake task to update the db. The proper way to do this
would be to write a rake task, but the easiest way to get going would
be to use the provided rake task db:seed. This runs the file
db/seeds.rb in the context of the application, so that all the
ActiveRecord stuff is automatically available. To run the rake task
you just
cd /path/to/rails/application
rake db:seed
or if you want it to run on the production db
RAILS_ENV=production rake db:seed
which could be run from a cron task or whatever is appropriate.

So all you need do is to put your code in db/seeds.rb and you will be
up and running.

Colin