For this assignment, take information from a relational database and migrate it to a NoSQL database.
For the relational database, use the flights database, the tb database, the “data skills” database for Project 3, or any another database.
For the NoSQL database, use MongoDB (which we introduced in week 7), Neo4j, or another NoSQL database.
Migration process needs to be reproducible. R code is encouraged, but not required. Also briefly describe the advantages and disadvantages of storing the data in a relational database vs. your NoSQL database.

## Data - the tb database
# Loading required libraries
library(DBI)
library(mongolite)
library(jsonlite)

# Importing data from MySQL database
con <- dbConnect(RMySQL::MySQL(),
                 user = "root",
                 password = "password",
                 dbname = "tb",
                 host = "127.0.0.1")

tb_MySQL <- dbReadTable(con, "tb")

tb_MongoDB <- mongo(collection = "tb", db = "db")

tb_MongoDB$insert(tb_MySQL)
## List of 5
##  $ nInserted  : num 3800
##  $ nMatched   : num 0
##  $ nRemoved   : num 0
##  $ nUpserted  : num 0
##  $ writeErrors: list()
head(tb_MySQL)
##       country year    sex child adult elderly
## 1 Afghanistan 1995 female    NA    NA      NA
## 2 Afghanistan 1995   male    NA    NA      NA
## 3 Afghanistan 1996 female    NA    NA      NA
## 4 Afghanistan 1996   male    NA    NA      NA
## 5 Afghanistan 1997 female     5    96       1
## 6 Afghanistan 1997   male     0    26       0