library(rmarkdown)
library(RMySQL)
## Loading required package: DBI
library(RNeo4j)
drv <- dbDriver("MySQL")
con <- dbConnect(drv, user = “root”, password = “xxxx”, dbname = “TB”, host = “localhost”)
dbListFields(con, "tb")
## [1] "country" "year" "sex" "child" "adult" "elderly"
#Adjust for candidate type and location
query <- "SELECT * FROM tb;"
tb <- dbGetQuery(con, query)
graph <- startGraph(“http://localhost:7474/db/data/”, username=“neo4j”, password=“xxxx”)
clear(graph, input = FALSE)
Pros of storing in NoSQL 1. Easier to save data across databases 2. Easier to update records 3. More agile 4. Not in tabular format 5.Elastic scalability
Pros of Relational Databases 1.More mature 2. More advanced expertise - been around longer 3. Tabular structure 4. Ease of data retrieval 5. Use generical language (SQL)