db implementation question

Hi
    This is a database implementation question..I am currently using
mydbname_development
mydbname_test
mydbname_production in database.yml file..So now my requirement is
suppose two (for example) companies use my application..And my purpose
is to dynamically select separate databases for these two companies..For
example company 1 uses say
company1_develeopment
company1_test
company1_production and company 2 uses
company2_develeopment
company2_test
company2_production and so on ..So can I change db settings at
database.yml dynamically( Am I right?)..Or is there any other
method?Please help

Thanks in advance
Sijo