<p><strong>Abstract.</strong> Smart city is a connection of physical and social infrastructure together with the information technology to leverage the collective intelligence of the city. Smart cities depend on a great extent on wireless sensor network to manage and maintain their services. Advanced sensor technologies are used to acquire information and help dealing with issues like air pollution, waste management, traffic optimization, and energy efficiency. However, no matter how much smart city may focus on sensor technology, data that are produced from sensors do not organize themselves in a database. Such tasks require a sophisticated database structure to produce informative data output. Besides that, wireless sensor network requires a proper design to improve the energy efficiency. The design will aid to prolong the lifespan of wireless network efficiently. In this study, we proposed a new technique that will be used to organize the information of wireless sensor network in the spatial database. Specific algorithm which is 3D geo-clustering algorithm is used to tackle several issues of location of the sensor in three-dimensional urban area in smart city. The algorithm is designed to minimizing the overlap among group clusters. Overlap plays an important role for energy efficiency. Thus, detection of sensors in two or more group clusters will avoid it from transmitting the same signal to cluster head node. It is prove that this algorithm would only create 5% to 10% overlap among group clusters. Several experiments are performed in this study to evaluate the algorithm. Based on the simulation results indicate that this algorithm can balance nodes energy consumption and prolong the network’s life span. It also has good stability and extensibility. Several tests are performed to validate the efficiency of the technique to measure the database performance.</p>