I'm also a cruisecontrol novice, but this is how I solve the problem.
I don't check the config/database.yml file into source control. I create a .gitignore or .svnignore so that it doesn't accidentally end up in the repository.
After I create the project on the build machine, I go to the .cruise/projects/NAME/work directory and create my own config/database.yml file
This works provided that no one checks in a config/database.yml file
I'm hoping one of the advance users will tell of a better way =)
Thanks,
Todd