# Fog Computing for Smart Cities' Big Data Management and Analytics: A Review
## 5 Toward Fog-Based Smart City Data Management and Analytics
### Fog-Based Data Management and Analytics  
As smart cities embark on new IoT initiatives and strive to extract more information from continuously generated data in large quantities to improve or deliver new smart services and respond to emergencies, new approaches and data management techniques are needed. Traditional databases and business intelligence architectures will always be crucial for smart cities, but IoT solutions require specific capabilities to manage various data continuously from various sources in different formats. Data management in the IoT era is becoming a broad discipline, which entails techniques, tools and platforms for storage, preprocessing, batch and stream processing. It encompasses other data-related disciplines, including data integration (propagation, consolidation, and federation), data quality management, data provisioning, and data governance. Therefore, managing IoT data in organizations, such as smart cities, is a complex process, especially when business intelligence and decision making must use large amounts of data from multiple heterogeneous sources. These organizations deploy algorithms to filter data from multiple sources, providing different data quality levels before they reach a centralized data store. Additionally, they use automated data aggregation and classification tools at the edge and in the fog to accelerate the generation of insights from data streams and protect data stores against massive data volumes and high data velocity. Figure 3 depicts the aforementioned data management functions in the continuum from IoT devices to the fog/cloud. These data management operations are detailed in Section 7, which describes a conceptual framework and the necessary tools for building a fog-based data pipeline. Figure 3: Data management operations at the edge–cloud continuum. Several recent research efforts studied the issue of big data management and analytics in smart cities [1; 29; 30; 31]. Our focus in this work is on the efforts that use fog-based solutions in the continuum from edge to cloud. Here, we review some of these works and the next section describes some works in three application domains: transportation, healthcare, and smart grids. [PERSON] et al. [32] proposed a hierarchical fog-based architecture for data management in smart cities. They described the data management tasks performed by edge devices (edge gateways) and fog nodes. Each edge device must identify potential threat patterns from sensor data streams and send control signals to sensors when a threat is detected. The authors state that various supervised machine learning algorithms could be used to identify threat patterns and that unsupervised machine learning algorithms could be used to detect data anomalies. Additionally, edge devices could perform feature extraction and report the results to fog nodes for further analysis. Fog nodes typically receive data from multiple edge devices and combine their features into a single vector. In their pipeline monitoring use case, they apply the Hidden Markov Model (HMM) to model each event's spatiotemporal association in a probabilistic manner. For smart homes management, [PERSON] et al. [33] proposed a fog/cloud-based platform to implement IoT big data analytics. One of the main components of their platform is an \"IoT Management Broker\" which is in charge of handling various requests from multiple smart homes. Data management operations in fog nodes include: data preprocessing, pattern mining, classification, prediction, and visualization. The authors in [34] discussed how some data management issues in the medical field are addressed using fog computing. Data fusion from large heterogeneous datasets includes data combination, data integration, and data aggregation. They also discussed the issue of data migration from legacy systems into new databases. Car parking occupancy in cities is one the concerns that all cities strive to solve.