Translate application using DbMessageSource and RBAC using DB

I really need an example of using DBMEssagesource for i18n(internalization) and of Role Based Access control (RBAC); the explainations in guide are good but examples concern php file I would like to use database for storing data; I don’t how to process.

Except from change of "class" from Php* to Db* everything applies as is.