What is the best way to do number translation in Asterisk?

Hi All,

I have a customer has around 50k called nummber translation rules. Would you please tell me what is the best way to configure Asterisk to do the translations? Should I use a database?

Thanks.