stream output to the database