Requiring currency rate to be not null
Changed UPDATE/INSERT to REPLACE (more concise and efficient)