4
Hello, I am creating a database, and in it I will have information of Brazilian municipalities, I imagine that I am certainly not the first to need this information, however I do not know if there is any way to do it automatically, somewhere I can download this database, or some SQL script that enters the information in the database, because doing it manually is not the most advisable.
I’m using postgresql 9.3, I haven’t created the tables for cities yet.
The IBGE website provides all cities through some file types. Take a look at this link, which already has the sqls for postgre http://www.ferreiramauricio.com/sql-das-5565-citysbrasiles-seconds-data
– Krumb
I have an sql that I use, however is for the
MySql
, but I believe that with few changes you can achieve your goal. The file is available in: https://github.com/RichardSDias/SQL– Richard Dias
All States and Municipalities (or almost all...) of Brazil, with the possibility of inserting new countries, districts/states and municipalities. (Columns with prefix to facilitate Joins and maintain organization...). If you have a problem with accented characters, open the file in any text editor and save it with UTF-8 encoding, which resolves, or copy and paste the code directly into Mysql (without using import...) I’ll leave the project link Github: https://github.com/chinnonsantos/sql-paises-estados-cidades
– Chinnon Santos
You can use the open source project I created, it searches directly in the ibge API and assembles the most updated list possible according to this data, follows the link http://ibge-sql.herokuapp.com
– Breno Prata