Also I am not sure if this shouldn't go into the model as the controller doesn't know about the DB.