  The evolution of the utilization of technologies in nearly all aspects of
life has produced an enormous amount of data essential in a smart city.
Therefore, maximizing the benefits of technologies such as cloud computing, fog
computing, and the Internet of things is important to manage and manipulate
data in smart cities. However, certain types of data are sensitive and risky
and may be infiltrated by malicious attacks. As a result, such data may be
corrupted, thereby causing concern. The damage inflicted by an attacker on a
set of data can spread through an entire database. Valid transactions that have
read corrupted data can update other data items based on the values read. In
this study, we introduce a unique model that uses fog computing in smart cities
to manage utility service companies and consumer data. We also propose a novel
technique to assess damage to data caused by an attack. Thus, original data can
be recovered, and a database can be returned to its consistent state as no
attacking has occurred.
