Deserialization work
Write results to database