Complete the code to load the DBI package.
library([1])The library() function loads the DBI package, which is needed to work with databases in R.
Complete the code to connect to an in-memory SQLite database.
con <- DBI::dbConnect([1], ":memory:")
The dbConnect() function needs the driver object from RSQLite, which is RSQLite::SQLite() for an SQLite database.
Fix the error in the code to disconnect from the database.
DBI::dbDisconnect([1])The connection object was stored in the variable con. You must pass it to dbDisconnect() to close the connection.
Fill both blanks to create a table named 'people' with columns 'name' and 'age'.
DBI::dbExecute(con, "CREATE TABLE [1] ([2] TEXT, age INTEGER)")
The table name is 'people' and the first column is 'name' of type TEXT.
Fill all three blanks to insert a person named 'Alice' aged 30 into the 'people' table.
DBI::dbExecute(con, "INSERT INTO people ([1], age) VALUES ('[2]', [3])")
The column to insert is 'name', the value is 'Alice', and the age is 30.