Task3: result output can be written in database now.