It was analyzed the information of databases, encryption algorithms, and information security that are the main components of a Smart City. The problem is the lack of security of public or secret data that is stored in a repository, where there is access to the citizen, local government, and central government. The objective is to define a security prototype and adopt a cryptographic algorithm to mitigate the risks of the database in the management of a Smart City. It was used the deductive method and exploratory research to analyze the information of the reference articles. It turned out a general prototype of security; an algorithm to implement a database for Smart City; an algorithm of data protection expressed in flowcharts. It was concluded that information protected with an encryption algorithm, is a support to be more efficient, reduce costs, reduce the environmental footprint and improve the management of a Smart City.