We first connect (and automatically create) an in-memory database. The new database is empty. We populate a table in the empty database, using the iris dataset. There are some clear differences in operating with a database versus an R DataFrame:
- The iris_db display includes what the database program is running, and the column types are not as expected in R.
- We see that the iris_db does not reside in the R program at all—it is completely in the database. We can see that with the NA result from our nrow(iris_db) call.
- We can run a head(iris_db) call, and it will give results. But if you look closely, there are many database settings displayed, compared to the standard R settings.
- When we use show_query against an iris_db