update RDB and output