CREATE TABLE `DISTRICT_SUBDIVISION` (
  `ID_INTERNAL` int(11) NOT NULL AUTO_INCREMENT,
  `CODE` varchar(2) NOT NULL,
  `KEY_DISTRICT` int(11) NOT NULL,
  `KEY_ROOT_DOMAIN_OBJECT` int(11) NOT NULL,
  `NAME` varchar(255) NOT NULL,
  `OID` bigint(20) unsigned DEFAULT NULL,
  `OID_DISTRICT` bigint(20) unsigned DEFAULT NULL,
  `OID_ROOT_DOMAIN_OBJECT` bigint(20) unsigned DEFAULT NULL,
  PRIMARY KEY (`ID_INTERNAL`),
  UNIQUE KEY `KEY_DISTRICT_2` (`KEY_DISTRICT`,`CODE`),
  UNIQUE KEY `KEY_DISTRICT_3` (`KEY_DISTRICT`,`NAME`),
  KEY `KEY_DISTRICT` (`KEY_DISTRICT`),
  KEY `KEY_ROOT_DOMAIN_OBJECT` (`KEY_ROOT_DOMAIN_OBJECT`),
  KEY `OID` (`OID`),
  KEY `OID_DISTRICT` (`OID_DISTRICT`),
  KEY `OID_ROOT_DOMAIN_OBJECT` (`OID_ROOT_DOMAIN_OBJECT`)
) ENGINE=InnoDB AUTO_INCREMENT=543 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `DISTRICT_SUBDIVISION`
--

INSERT INTO `DISTRICT_SUBDIVISION` VALUES (32,'07',6,1,'Mora',NULL,NULL,NULL),(33,'08',6,1,'Mourão',NULL,NULL,NULL),(34,'09',6,1,'Portel',NULL,NULL,NULL),(35,'10',6,1,'Redondo',NULL,NULL,NULL),(36,'11',6,1,'Reguengos de Monsaraz',NULL,NULL,NULL),(37,'12',6,1,'Vendas Novas',NULL,NULL,NULL),(38,'13',6,1,'Viana do Alentejo',NULL,NULL,NULL),(39,'14',6,1,'Vila Viçosa',NULL,NULL,NULL),(40,'01',7,1,'Albufeira',NULL,NULL,NULL),(41,'02',7,1,'Alcoutim',NULL,NULL,NULL),(42,'03',7,1,'Aljezur',NULL,NULL,NULL),(43,'04',7,1,'Castro Marim',NULL,NULL,NULL),(44,'05',7,1,'Faro',NULL,NULL,NULL),(45,'06',7,1,'Lagoa (Algarve)',NULL,NULL,NULL),(46,'07',7,1,'Lagos',NULL,NULL,NULL),(47,'08',7,1,'Loulé',NULL,NULL,NULL),(48,'09',7,1,'Monchique',NULL,NULL,NULL),(49,'10',7,1,'Olhão',NULL,NULL,NULL),(50,'11',7,1,'Portimão',NULL,NULL,NULL),(51,'12',7,1,'São Brás de Alportel',NULL,NULL,NULL),(52,'13',7,1,'Silves',NULL,NULL,NULL),(53,'14',7,1,'Tavira',NULL,NULL,NULL),(54,'15',7,1,'Vila do Bispo',NULL,NULL,NULL),(55,'16',7,1,'Vila Real de Santo António',NULL,NULL,NULL),(56,'01',8,1,'Aguiar da Beira',NULL,NULL,NULL),(57,'02',8,1,'Almeida',NULL,NULL,NULL),(58,'03',8,1,'Celorico da Beira',NULL,NULL,NULL),(59,'04',8,1,'Figueira de Castelo Rodrigo',NULL,NULL,NULL),(60,'05',8,1,'Fornos de Algodres',NULL,NULL,NULL),(61,'06',8,1,'Gouveia',NULL,NULL,NULL),(62,'07',8,1,'Guarda',NULL,NULL,NULL),(63,'08',8,1,'Manteigas',NULL,NULL,NULL),(64,'09',8,1,'Meda',NULL,NULL,NULL),(65,'10',8,1,'Pinhel',NULL,NULL,NULL),(66,'11',8,1,'Sabugal',NULL,NULL,NULL),(67,'12',8,1,'Seia',NULL,NULL,NULL),(68,'13',8,1,'Trancoso',NULL,NULL,NULL),(69,'14',8,1,'Vila Nova de Foz Côa',NULL,NULL,NULL),(70,'01',9,1,'Alcobaça',NULL,NULL,NULL),(71,'02',9,1,'Alvaiázere',NULL,NULL,NULL),(72,'03',9,1,'Ansião',NULL,NULL,NULL),(73,'04',9,1,'Batalha',NULL,NULL,NULL),(74,'05',9,1,'Bombarral',NULL,NULL,NULL),(75,'06',9,1,'Caldas da Rainha',NULL,NULL,NULL),(76,'07',9,1,'Castanheira de Pêra',NULL,NULL,NULL),(77,'08',9,1,'Figueiró dos Vinhos',NULL,NULL,NULL),(78,'09',9,1,'Leiria',NULL,NULL,NULL),(79,'10',9,1,'Marinha Grande',NULL,NULL,NULL),(80,'01',29,1,'Águeda',NULL,NULL,NULL),(81,'02',29,1,'Albergaria-a-Velha',NULL,NULL,NULL),(82,'11',9,1,'Nazaré',NULL,NULL,NULL),(83,'12',9,1,'Óbidos',NULL,NULL,NULL),(84,'13',9,1,'Pedrógão Grande',NULL,NULL,NULL),(85,'14',9,1,'Peniche',NULL,NULL,NULL),(86,'15',9,1,'Pombal',NULL,NULL,NULL),(87,'16',9,1,'Porto de Mós',NULL,NULL,NULL),(88,'01',10,1,'Alenquer',NULL,NULL,NULL),(89,'02',10,1,'Arruda dos Vinhos',NULL,NULL,NULL),(90,'03',10,1,'Azambuja',NULL,NULL,NULL),(91,'04',10,1,'Cadaval',NULL,NULL,NULL),(92,'05',10,1,'Cascais',NULL,NULL,NULL),(93,'06',10,1,'Lisboa',NULL,NULL,NULL),(94,'07',10,1,'Loures',NULL,NULL,NULL),(95,'08',10,1,'Lourinhã',NULL,NULL,NULL),(96,'09',10,1,'Mafra',NULL,NULL,NULL),(97,'10',10,1,'Oeiras',NULL,NULL,NULL),(98,'11',10,1,'Sintra',NULL,NULL,NULL),(99,'12',10,1,'Sobral de Monte Agraço',NULL,NULL,NULL),(100,'13',10,1,'Torres Vedras',NULL,NULL,NULL),(101,'14',10,1,'Vila Franca de Xira',NULL,NULL,NULL),(102,'15',10,1,'Amadora',NULL,NULL,NULL),(103,'16',10,1,'Odivelas',NULL,NULL,NULL),(104,'01',11,1,'Alter do Chão',NULL,NULL,NULL),(105,'02',11,1,'Arronches',NULL,NULL,NULL),(106,'03',11,1,'Avis',NULL,NULL,NULL),(107,'04',11,1,'Campo Maior',NULL,NULL,NULL),(108,'05',11,1,'Castelo de Vide',NULL,NULL,NULL),(109,'06',11,1,'Crato',NULL,NULL,NULL),(110,'07',11,1,'Elvas',NULL,NULL,NULL),(111,'08',11,1,'Fronteira',NULL,NULL,NULL),(112,'09',11,1,'Gavião',NULL,NULL,NULL),(113,'10',11,1,'Marvão',NULL,NULL,NULL),(114,'11',11,1,'Monforte',NULL,NULL,NULL),(115,'12',11,1,'Nisa',NULL,NULL,NULL),(116,'13',11,1,'Ponte de Sor',NULL,NULL,NULL),(117,'14',11,1,'Portalegre',NULL,NULL,NULL),(118,'15',11,1,'Sousel',NULL,NULL,NULL),(119,'01',12,1,'Amarante',NULL,NULL,NULL),(120,'02',12,1,'Baião',NULL,NULL,NULL),(121,'03',12,1,'Felgueiras',NULL,NULL,NULL),(122,'04',12,1,'Gondomar',NULL,NULL,NULL),(123,'05',12,1,'Lousada',NULL,NULL,NULL),(124,'06',12,1,'Maia',NULL,NULL,NULL),(125,'07',12,1,'Marco de Canaveses',NULL,NULL,NULL),(126,'08',12,1,'Matosinhos',NULL,NULL,NULL),(127,'09',12,1,'Paços de Ferreira',NULL,NULL,NULL),(128,'10',12,1,'Paredes',NULL,NULL,NULL),(129,'11',12,1,'Penafiel',NULL,NULL,NULL),(130,'12',12,1,'Porto',NULL,NULL,NULL),(131,'13',12,1,'Póvoa de Varzim',NULL,NULL,NULL),(132,'14',12,1,'Santo Tirso',NULL,NULL,NULL),(133,'15',12,1,'Valongo',NULL,NULL,NULL),(134,'16',12,1,'Vila do Conde',NULL,NULL,NULL),(135,'17',12,1,'Vila Nova de Gaia',NULL,NULL,NULL),(136,'18',12,1,'Trofa',NULL,NULL,NULL),(137,'01',13,1,'Abrantes',NULL,NULL,NULL),(138,'02',13,1,'Alcanena',NULL,NULL,NULL),(139,'03',13,1,'Almeirim',NULL,NULL,NULL),(140,'04',13,1,'Alpiarça',NULL,NULL,NULL),(141,'05',13,1,'Benavente',NULL,NULL,NULL),(142,'06',13,1,'Cartaxo',NULL,NULL,NULL),(143,'07',13,1,'Chamusca',NULL,NULL,NULL),(144,'08',13,1,'Constância',NULL,NULL,NULL),(145,'09',13,1,'Coruche',NULL,NULL,NULL),(146,'10',13,1,'Entroncamento',NULL,NULL,NULL),(147,'11',13,1,'Ferreira do Zêzere',NULL,NULL,NULL),(148,'12',13,1,'Golegã',NULL,NULL,NULL),(149,'13',13,1,'Mação',NULL,NULL,NULL),(150,'14',13,1,'Rio Maior',NULL,NULL,NULL),(151,'15',13,1,'Salvaterra de Magos',NULL,NULL,NULL),(152,'16',13,1,'Santarém',NULL,NULL,NULL),(153,'17',13,1,'Sardoal',NULL,NULL,NULL),(154,'18',13,1,'Tomar',NULL,NULL,NULL),(155,'19',13,1,'Torres Novas',NULL,NULL,NULL),(156,'20',13,1,'Vila Nova da Barquinha',NULL,NULL,NULL),(157,'21',13,1,'Ourém',NULL,NULL,NULL),(158,'01',14,1,'Alcácer do Sal',NULL,NULL,NULL),(159,'02',14,1,'Alcochete',NULL,NULL,NULL),(160,'03',14,1,'Almada',NULL,NULL,NULL),(161,'04',14,1,'Barreiro',NULL,NULL,NULL),(162,'05',14,1,'Grândola',NULL,NULL,NULL),(163,'06',14,1,'Moita',NULL,NULL,NULL),(164,'07',14,1,'Montijo',NULL,NULL,NULL),(165,'08',14,1,'Palmela',NULL,NULL,NULL),(166,'09',14,1,'Santiago do Cacém',NULL,NULL,NULL),(167,'10',14,1,'Seixal',NULL,NULL,NULL),(168,'11',14,1,'Sesimbra',NULL,NULL,NULL),(169,'12',14,1,'Setúbal',NULL,NULL,NULL),(170,'13',14,1,'Sines',NULL,NULL,NULL),(171,'01',15,1,'Arcos de Valdevez',NULL,NULL,NULL),(172,'02',15,1,'Caminha',NULL,NULL,NULL),(173,'03',15,1,'Melgaço',NULL,NULL,NULL),(174,'04',15,1,'Monção',NULL,NULL,NULL),(175,'05',15,1,'Paredes de Coura',NULL,NULL,NULL),(176,'06',15,1,'Ponte da Barca',NULL,NULL,NULL),(177,'07',15,1,'Ponte de Lima',NULL,NULL,NULL),(178,'08',15,1,'Valença',NULL,NULL,NULL),(179,'09',15,1,'Viana do Castelo',NULL,NULL,NULL),(180,'10',15,1,'Vila Nova de Cerveira',NULL,NULL,NULL),(181,'01',16,1,'Alijó',NULL,NULL,NULL),(182,'02',16,1,'Boticas',NULL,NULL,NULL),(183,'03',16,1,'Chaves',NULL,NULL,NULL),(184,'04',16,1,'Mesão Frio',NULL,NULL,NULL),(185,'05',16,1,'Mondim de Basto',NULL,NULL,NULL),(186,'06',16,1,'Montalegre',NULL,NULL,NULL),(187,'07',16,1,'Murça',NULL,NULL,NULL),(188,'08',16,1,'Peso da Régua',NULL,NULL,NULL),(189,'09',16,1,'Ribeira de Pena',NULL,NULL,NULL),(190,'10',16,1,'Sabrosa',NULL,NULL,NULL),(191,'11',16,1,'Santa Marta de Penaguião',NULL,NULL,NULL),(192,'12',16,1,'Valpaços',NULL,NULL,NULL),(193,'13',16,1,'Vila Pouca de Aguiar',NULL,NULL,NULL),(194,'14',16,1,'Vila Real',NULL,NULL,NULL),(195,'01',17,1,'Armamar',NULL,NULL,NULL),(196,'02',17,1,'Carregal do Sal',NULL,NULL,NULL),(197,'03',17,1,'Castro Daire',NULL,NULL,NULL),(198,'04',17,1,'Cinfães',NULL,NULL,NULL),(199,'05',17,1,'Lamego',NULL,NULL,NULL),(200,'06',17,1,'Mangualde',NULL,NULL,NULL),(201,'07',17,1,'Moimenta da Beira',NULL,NULL,NULL),(202,'08',17,1,'Mortágua',NULL,NULL,NULL),(203,'09',17,1,'Nelas',NULL,NULL,NULL),(204,'10',17,1,'Oliveira de Frades',NULL,NULL,NULL),(205,'11',17,1,'Penalva do Castelo',NULL,NULL,NULL),(206,'12',17,1,'Penedono',NULL,NULL,NULL),(207,'13',17,1,'Resende',NULL,NULL,NULL),(208,'14',17,1,'Santa Comba Dão',NULL,NULL,NULL),(209,'15',17,1,'São João da Pesqueira',NULL,NULL,NULL),(210,'16',17,1,'São Pedro do Sul',NULL,NULL,NULL),(211,'17',17,1,'Sátão',NULL,NULL,NULL),(212,'18',17,1,'Sernancelhe',NULL,NULL,NULL),(213,'19',17,1,'Tabuaço',NULL,NULL,NULL),(214,'20',17,1,'Tarouca',NULL,NULL,NULL),(215,'21',17,1,'Tondela',NULL,NULL,NULL),(216,'22',17,1,'Vila Nova de Paiva',NULL,NULL,NULL),(217,'23',17,1,'Viseu',NULL,NULL,NULL),(218,'24',17,1,'Vouzela',NULL,NULL,NULL),(219,'01',18,1,'Calheta (Madeira)',NULL,NULL,NULL),(220,'02',18,1,'Câmara de Lobos',NULL,NULL,NULL),(221,'03',18,1,'Funchal',NULL,NULL,NULL),(222,'04',18,1,'Machico',NULL,NULL,NULL),(223,'05',18,1,'Ponta do Sol',NULL,NULL,NULL),(224,'06',18,1,'Porto Moniz',NULL,NULL,NULL),(225,'07',18,1,'Ribeira Brava',NULL,NULL,NULL),(226,'08',18,1,'Santa Cruz',NULL,NULL,NULL),(227,'09',18,1,'Santana',NULL,NULL,NULL),(228,'10',18,1,'São Vicente',NULL,NULL,NULL),(229,'01',19,1,'Porto Santo',NULL,NULL,NULL),(230,'01',20,1,'Vila do Porto',NULL,NULL,NULL),(231,'01',21,1,'Lagoa (São Miguel)',NULL,NULL,NULL),(232,'02',21,1,'Nordeste',NULL,NULL,NULL),(233,'03',21,1,'Ponta Delgada',NULL,NULL,NULL),(234,'04',21,1,'Povoação',NULL,NULL,NULL),(235,'05',21,1,'Ribeira Grande',NULL,NULL,NULL),(236,'06',21,1,'Vila Franca do Campo',NULL,NULL,NULL),(237,'01',22,1,'Angra do Heroísmo',NULL,NULL,NULL),(238,'02',22,1,'Praia da Vitória',NULL,NULL,NULL),(239,'01',23,1,'Santa Cruz da Graciosa',NULL,NULL,NULL),(240,'01',24,1,'Calheta (São Jorge)',NULL,NULL,NULL),(241,'02',24,1,'Velas',NULL,NULL,NULL),(242,'01',25,1,'Lajes do Pico',NULL,NULL,NULL),(243,'02',25,1,'Madalena',NULL,NULL,NULL),(244,'03',25,1,'São Roque do Pico',NULL,NULL,NULL),(245,'01',26,1,'Horta',NULL,NULL,NULL),(246,'01',27,1,'Lajes das Flores',NULL,NULL,NULL),(247,'02',27,1,'Santa Cruz das Flores',NULL,NULL,NULL),(248,'01',28,1,'Corvo',NULL,NULL,NULL),(249,'03',29,1,'Anadia',NULL,NULL,NULL),(250,'04',29,1,'Arouca',NULL,NULL,NULL),(251,'05',29,1,'Aveiro',NULL,NULL,NULL),(252,'06',29,1,'Castelo de Paiva',NULL,NULL,NULL),(253,'07',29,1,'Espinho',NULL,NULL,NULL),(254,'08',29,1,'Estarreja',NULL,NULL,NULL),(255,'09',29,1,'Santa Maria da Feira',NULL,NULL,NULL),(256,'10',29,1,'Ílhavo',NULL,NULL,NULL),(257,'11',29,1,'Mealhada',NULL,NULL,NULL),(258,'12',29,1,'Murtosa',NULL,NULL,NULL),(259,'13',29,1,'Oliveira de Azeméis',NULL,NULL,NULL),(260,'14',29,1,'Oliveira do Bairro',NULL,NULL,NULL),(261,'15',29,1,'Ovar',NULL,NULL,NULL),(262,'16',29,1,'São João da Madeira',NULL,NULL,NULL),(263,'17',29,1,'Sever do Vouga',NULL,NULL,NULL),(264,'18',29,1,'Vagos',NULL,NULL,NULL),(265,'19',29,1,'Vale de Cambra',NULL,NULL,NULL),(266,'01',30,1,'Aljustrel',NULL,NULL,NULL),(267,'02',30,1,'Almodôvar',NULL,NULL,NULL),(268,'03',30,1,'Alvito',NULL,NULL,NULL),(269,'04',30,1,'Barrancos',NULL,NULL,NULL),(270,'05',30,1,'Beja',NULL,NULL,NULL),(271,'06',30,1,'Castro Verde',NULL,NULL,NULL),(272,'07',30,1,'Cuba',NULL,NULL,NULL),(273,'08',30,1,'Ferreira do Alentejo',NULL,NULL,NULL),(274,'09',30,1,'Mértola',NULL,NULL,NULL),(275,'10',30,1,'Moura',NULL,NULL,NULL),(276,'11',30,1,'Odemira',NULL,NULL,NULL),(277,'12',30,1,'Ourique',NULL,NULL,NULL),(278,'13',30,1,'Serpa',NULL,NULL,NULL),(279,'14',30,1,'Vidigueira',NULL,NULL,NULL),(280,'01',2,1,'Amares',NULL,NULL,NULL),(281,'02',2,1,'Barcelos',NULL,NULL,NULL),(282,'03',2,1,'Braga',NULL,NULL,NULL),(283,'04',2,1,'Cabeceiras de Basto',NULL,NULL,NULL),(284,'05',2,1,'Celorico de Basto',NULL,NULL,NULL),(285,'06',2,1,'Esposende',NULL,NULL,NULL),(286,'07',2,1,'Fafe',NULL,NULL,NULL),(287,'08',2,1,'Guimarães',NULL,NULL,NULL),(288,'09',2,1,'Póvoa de Lanhoso',NULL,NULL,NULL),(289,'10',2,1,'Terras de Bouro',NULL,NULL,NULL),(290,'11',2,1,'Vieira do Minho',NULL,NULL,NULL),(291,'12',2,1,'Vila Nova de Famalicão',NULL,NULL,NULL),(292,'13',2,1,'Vila Verde',NULL,NULL,NULL),(293,'14',2,1,'Vizela',NULL,NULL,NULL),(294,'01',3,1,'Alfandega da Fé',NULL,NULL,NULL),(295,'02',3,1,'Bragança',NULL,NULL,NULL),(296,'03',3,1,'Carrazeda de Ansiães',NULL,NULL,NULL),(297,'04',3,1,'Freixo Espada à Cinta',NULL,NULL,NULL),(298,'05',3,1,'Macedo de Cavaleiros',NULL,NULL,NULL),(299,'06',3,1,'Miranda do Douro',NULL,NULL,NULL),(300,'07',3,1,'Mirandela',NULL,NULL,NULL),(301,'08',3,1,'Mogadouro',NULL,NULL,NULL),(302,'09',3,1,'Torre de Moncorvo',NULL,NULL,NULL),(303,'10',3,1,'Vila Flor',NULL,NULL,NULL),(304,'11',3,1,'Vimioso',NULL,NULL,NULL),(305,'12',3,1,'Vinhais',NULL,NULL,NULL),(306,'01',4,1,'Belmonte',NULL,NULL,NULL),(307,'02',4,1,'Castelo Branco',NULL,NULL,NULL),(308,'03',4,1,'Covilhã',NULL,NULL,NULL),(309,'04',4,1,'Fundão',NULL,NULL,NULL),(310,'05',4,1,'Idanha-a-Nova',NULL,NULL,NULL),(311,'06',4,1,'Oleiros',NULL,NULL,NULL),(312,'07',4,1,'Penamacor',NULL,NULL,NULL),(313,'08',4,1,'Proença-a-Nova',NULL,NULL,NULL),(314,'09',4,1,'Sertã',NULL,NULL,NULL),(315,'10',4,1,'Vila de Rei',NULL,NULL,NULL),(316,'11',4,1,'Vila Velha de Rodão',NULL,NULL,NULL),(317,'01',5,1,'Arganil',NULL,NULL,NULL),(318,'02',5,1,'Cantanhede',NULL,NULL,NULL),(319,'03',5,1,'Coimbra',NULL,NULL,NULL),(320,'04',5,1,'Condeixa-a-Nova',NULL,NULL,NULL),(321,'05',5,1,'Figueira da Foz',NULL,NULL,NULL),(322,'06',5,1,'Góis',NULL,NULL,NULL),(323,'07',5,1,'Lousã',NULL,NULL,NULL),(324,'08',5,1,'Mira',NULL,NULL,NULL),(325,'09',5,1,'Miranda do Corvo',NULL,NULL,NULL),(326,'10',5,1,'Montemor-o-Velho',NULL,NULL,NULL),(327,'11',5,1,'Oliveira do Hospital',NULL,NULL,NULL),(328,'12',5,1,'Pampilhosa da Serra',NULL,NULL,NULL),(329,'13',5,1,'Penacova',NULL,NULL,NULL),(330,'14',5,1,'Penela',NULL,NULL,NULL),(331,'15',5,1,'Soure',NULL,NULL,NULL),(332,'16',5,1,'Tábua',NULL,NULL,NULL),(333,'17',5,1,'Vila Nova de Poiares',NULL,NULL,NULL),(334,'01',6,1,'Alandroal',NULL,NULL,NULL),(335,'02',6,1,'Arraiolos',NULL,NULL,NULL),(336,'03',6,1,'Borba',NULL,NULL,NULL),(337,'04',6,1,'Estremoz',NULL,NULL,NULL),(338,'05',6,1,'Évora',NULL,NULL,NULL),(339,'06',6,1,'Montemor-o-Novo',NULL,NULL,NULL);
