Rewrite inside a database backend ?