Skip to content

SQL statements for creating tables for Tanzania's Regions and the Districts within them (Based on Wikipedia)

License

Notifications You must be signed in to change notification settings

kidando/tanzania_regions_districts_sql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Tanzania Regions and Districts

SQL for creating regions and districts tables for Tanzania in your database system.

The information was taken from wikipedia

Below is the sql contained in the file. Region IDs have already been populated in the Districts table.

/* REGIONS */
CREATE TABLE IF NOT EXISTS `regions` (
    `id` int(2) unsigned NOT NULL AUTO_INCREMENT,
    `name` varchar(64) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE = InnoDB AUTO_INCREMENT = 32 DEFAULT CHARSET = utf8mb4;
  /*!40000 ALTER TABLE `regions` DISABLE KEYS */;
INSERT INTO
  `regions` (`id`, `name`)
VALUES
  (1, 'Arusha'),
  (2, 'Dar es Salaam'),
  (3, 'Dodoma'),
  (4, 'Geita'),
  (5, 'Iringa'),
  (6, 'Kagera'),
  (7, 'Katavi'),
  (8, 'Kigoma'),
  (9, 'Kilimanjaro'),
  (10, 'Lindi'),
  (11, 'Manyara'),
  (12, 'Mara'),
  (13, 'Mbeya'),
  (14, 'Mjini Magharibi'),
  (15, 'Morogoro'),
  (16, 'Mtwara'),
  (17, 'Mwanza'),
  (18, 'Njombe'),
  (19, 'Pemba North'),
  (20, 'Pemba South'),
  (21, 'Pwani'),
  (22, 'Rukwa'),
  (23, 'Ruvuma'),
  (24, 'Shinyanga'),
  (25, 'Simiyu'),
  (26, 'Singida'),
  (27, 'Songwe'),
  (28, 'Tabora'),
  (29, 'Tanga'),
  (30, 'Unguja North'),
  (31, 'Unguja South');



/* DISTRICTS */
 CREATE TABLE IF NOT EXISTS `districts` (
  `id` int(3) unsigned NOT NULL AUTO_INCREMENT,
  `region_id` int(2) unsigned DEFAULT NULL,
  `name` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE = InnoDB AUTO_INCREMENT = 176 DEFAULT CHARSET = utf8mb4;
/*!40000 ALTER TABLE `districts` DISABLE KEYS */;
INSERT INTO
  `districts` (`id`, `region_id`, `name`)
VALUES
  (1, 1, 'Arusha City'),
  (2, 1, 'Arusha Rural'),
  (3, 1, 'Karatu'),
  (4, 1, 'Longido'),
  (5, 1, 'Meru'),
  (6, 1, 'Monduli'),
  (7, 1, 'Ngorongoro'),
  (8, 2, 'Ilala'),
  (9, 2, 'Kinondoni'),
  (10, 2, 'Temeke'),
  (11, 2, 'Kigamboni'),
  (12, 2, 'Ubungo'),
  (13, 3, 'Bahi'),
  (14, 3, 'Chamwino'),
  (15, 3, 'Chemba'),
  (16, 3, 'Dodoma Municipal'),
  (17, 3, 'Kondoa'),
  (18, 3, 'Kongwa'),
  (19, 3, 'Mpwapwa'),
  (20, 4, 'Bukombe'),
  (21, 4, 'Chato'),
  (22, 4, 'Geita District'),
  (23, 4, 'Geita Town'),
  (24, 4, 'Mbogwe'),
  (25, 4, 'Nyang\'hwale'),
  (26, 5, 'Iringa District'),
  (27, 5, 'Kilolo'),
  (28, 5, 'Mufindi'),
  (29, 5, 'Iringa Municipal'),
  (30, 5, 'Mafinga'),
  (31, 6, '	Biharamulo'),
  (32, 6, 'Bukoba Rural'),
  (33, 6, 'Bukoba Urban'),
  (34, 6, 'Karagwe'),
  (35, 6, 'Kyerwa'),
  (36, 6, 'Missenyi '),
  (37, 6, 'Muleba'),
  (38, 6, 'Ngara'),
  (39, 7, 'Nsimbo'),
  (40, 7, 'Mpanda'),
  (41, 7, 'Mlele'),
  (42, 8, 'Buhigwe'),
  (43, 8, 'Kakonko'),
  (44, 8, 'Kasulu Rural'),
  (45, 8, 'Kasulu Urban'),
  (46, 8, 'Kibondo'),
  (47, 8, 'Kigoma Rural'),
  (48, 8, 'Kigoma Urban'),
  (49, 8, 'Uvinza'),
  (50, 9, 'Moshi District'),
  (51, 9, 'Moshi Municipal'),
  (52, 9, 'Hai'),
  (53, 9, 'Siha'),
  (54, 9, 'Rombo'),
  (55, 9, 'Mwanga'),
  (56, 9, 'Same'),
  (57, 10, 'Kilwa'),
  (58, 10, 'Lindi'),
  (59, 10, 'Liwale'),
  (60, 10, 'Nachingwea'),
  (61, 10, 'Ruangwa'),
  (62, 11, 'Babati District'),
  (63, 11, 'Babati Town'),
  (64, 11, 'Hanang'),
  (65, 11, 'Kiteto'),
  (66, 11, 'Mbulu'),
  (67, 11, 'Simanjiro'),
  (68, 12, 'Bunda'),
  (69, 12, 'Butiama'),
  (70, 12, 'Musoma District'),
  (71, 12, 'Musoma Municipal'),
  (72, 12, 'Rorya'),
  (73, 12, 'Serengeti'),
  (74, 12, 'Tarime'),
  (75, 13, 'Busokelo'),
  (76, 13, 'Chunya'),
  (77, 13, 'Kyela'),
  (78, 13, 'Mbarali'),
  (79, 13, 'Mbeya District'),
  (80, 13, 'Mbeya City'),
  (81, 13, 'Rungwe'),
  (82, 14, 'Magharibi'),
  (83, 14, 'Mjini'),
  (84, 15, 'Gairo'),
  (85, 15, 'Ifakara'),
  (86, 15, 'Kilombero'),
  (87, 15, 'Kilosa'),
  (88, 15, 'Malinyi'),
  (89, 15, 'Morogoro District'),
  (90, 15, 'Morogoro Municipal'),
  (91, 15, 'Mvomero'),
  (92, 15, 'Ulanga'),
  (93, 16, 'Masasi District'),
  (94, 16, 'Masasi Town'),
  (95, 16, 'Mtwara District'),
  (96, 16, 'Mtwara Municipal'),
  (97, 16, 'Nanyumbu'),
  (98, 16, 'Newala'),
  (99, 16, 'Tandahimba'),
  (100, 17, 'Ilemela'),
  (101, 17, 'Kwimba'),
  (102, 17, 'Magu'),
  (103, 17, 'Misungwi'),
  (104, 17, 'Nyamagana'),
  (105, 17, 'Sengerema'),
  (106, 17, 'Ukerewe'),
  (107, 18, 'Ludewa'),
  (108, 18, 'Makambako'),
  (109, 18, 'Makete'),
  (110, 18, 'Njombe District'),
  (111, 18, 'Njombe Town'),
  (112, 18, 'Wanging\'ombe'),
  (113, 19, 'Micheweni'),
  (114, 19, 'Wete'),
  (115, 20, 'Chake Chake'),
  (116, 20, 'Mkoani'),
  (117, 21, 'Bagamoyo'),
  (118, 21, 'Kibaha District'),
  (119, 21, 'Kibaha Town'),
  (120, 21, 'Kisarawe'),
  (121, 21, 'Mafia'),
  (122, 21, 'Mkuranga'),
  (123, 21, 'Rufiji'),
  (124, 22, 'Kalambo'),
  (125, 22, 'Lyamba lya Mfipa'),
  (126, 22, 'Nkasi'),
  (127, 22, 'Sumbawanga'),
  (128, 23, 'Mbinga'),
  (129, 23, 'Namtumbo'),
  (130, 23, 'Nyasa'),
  (131, 23, 'Songea District'),
  (132, 23, 'Songea Municipal'),
  (133, 23, 'Tunduru'),
  (134, 24, 'Kahama'),
  (135, 24, 'Kishapu'),
  (136, 24, 'Msalala'),
  (137, 24, 'Shinyanga District'),
  (138, 24, 'Shinyanga Municipal'),
  (139, 24, 'Ushetu'),
  (140, 25, '	Bariadi'),
  (141, 25, 'Busega'),
  (142, 25, 'Itilima'),
  (143, 25, 'Maswa'),
  (144, 25, 'Meatu'),
  (145, 26, 'Iramba'),
  (146, 26, 'Ikungi'),
  (147, 26, 'Manyoni'),
  (148, 26, 'Mkalama'),
  (149, 26, 'Singida District'),
  (150, 26, 'Singida Municipality'),
  (151, 27, '	Ileje'),
  (152, 27, 'Mbozi'),
  (153, 27, 'Momba'),
  (154, 27, 'Songwe'),
  (155, 28, 'Igunga'),
  (156, 28, 'Kaliua'),
  (157, 28, 'Nzega'),
  (158, 28, 'Sikonge'),
  (159, 28, 'Tabora Municipal'),
  (160, 28, 'Urambo'),
  (161, 28, 'Uyui'),
  (162, 29, 'Handeni District'),
  (163, 29, 'Handeni Town'),
  (164, 29, 'Kilindi'),
  (165, 29, 'Korogwe District'),
  (166, 29, 'Korogwe Town'),
  (167, 29, 'Lushoto'),
  (168, 29, 'Muheza'),
  (169, 29, 'Mkinga'),
  (170, 29, 'Pangani'),
  (171, 29, 'Tanga City'),
  (172, 30, 'Kaskazini A'),
  (173, 30, 'Kaskazini B'),
  (174, 31, 'Kati'),
  (175, 31, 'Kusini');

About

SQL statements for creating tables for Tanzania's Regions and the Districts within them (Based on Wikipedia)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published