Get All modules Using R with Databases Quiz Answers
This course will introduce you to the benefits of using R with databases. Teach you how to connect to databases from R. Show you how to create database objects, populate the database, and issue SQL queries to retrieve and modify your data from R. The course will also delve into advanced topics of using stored procedures and utilizing in-database analytics with R.
Enroll on Cognitive Class
Module 1 – R and Relational Databases
Question: What is the equivelent RDBMS concept for R dataframes?
- schema
- row (tuple)
- table (relation)
- column (attribute)
- database
Question: Is this statement true or false: Character data in R will be mapped to either a fixed sized CHARACTER column or a variable size VARCHAR column in a database.
Question: Select all the valid reasons for using R with relational databases:
- relational databases can manipulate large datasets
- R can retrieve dataframes that are stored in binary formats
- observations in dataframes can be changed dynamically by R
- relational databases provide concurrent access to data
- access to data can be managed using SQL GRANT and REVOKE statements
Module 2 – Connecting to Databases from R
Question: Which statement best describes the odbcGetInfo() function:
- queries data from a relational database into an R dataframe
- provides similar information to the sqlColumns() function
- returns details about the database server you have established your connection with and ODBC conformance level
- limits the results to only certain types of tables or table object names
- all of the above
Question: True or False: ODBC consists of 2 components: an ODBC Driver Manager and one or more ODBC Drivers.
Question: Which of the following statements about RODBC are true (select all that apply)
- The odbcDataSources() function returns a character vector of DSNs.
- The odbcDriverConnect() function can be used to create a direct connection to a database without a registered Data Source Name or DSN.
- The sqlTables() function will return a dataframe of tables, views, or other table-like objects from the database server.
- A database connection can be established using the odbcConnect() or odbcDriverConnect() functions.
- The odbcConnect() function requires a special connection string that includes the database driver, database name and hostname.
Module 3 – Database Design and Analyzing Data
Question: Which statement best describes the RODBC sqlFetch() function?
- returns all of the columns from a relational table
- returns all of the tables from a relational database
- returns all of the rows from a relational table
- returns all the data from a dataframe
- none of the above
Question: The LOAD command logs each transactions and stores the data very quickly on disk.
Question: Which functions can be used to create dataframes in R (select all that apply)
- sqlQuery()
- sqlClear()
- sqlCreate()
- sqlFetch()
- sqlUpdate()
Module 4 – Modifying Data and Using Stored Procedures
Question: Which of the following statements is false?
- sqlSave() function can be used to append new rows to an existing table.
- SQL UPDATE statements and the sqlQuery() can be used to modify data in database tables.
- sqlUpdate() function can be used to insert new rows in a table.
- sqlSave() function can store the modified dataframe in a new database table.
- sqlUpdate() function can be used to push the updated data to existing rows in existing tables.
Question: True or False: The sqlCreate() function in RODBC can be used to create a table and store the data from the data frame into the newly created table with the same column names as the dataframe.
Question: Select all the statements that are true:
- The sqlQuery() function can be used to modify data in database table.
- The sqlSave() function stores the modified database data in an existing or new R dataframe.
- As an alternative, SQL UPDATE statements can be used to modify data in a dataframe.
- The update in place operation can be performed using the sqlUpdate() function in RODBC.
- The sqlUpdate() function can be used to push the updated data to the table where it originally came from.
Module 5 – In-Application Analytics with R
Question: Which statement best describes in-database analytics?
- in-database analytics moves the data into a database before performing data analysis on it
- in-data base analytics requires ibmdbR and dashDB to perform data analysis
- in-database analytics processes the data and performing analysis within the database where the data is stored
- in-database analytics refers to data analysis on data that must be retrieved from a database
- in-database analytics retrieves data from a database and performs data analysis on private or public clouds
Question: Is this statement true or false: dashdb has built-in support for R execution without the use of built-in analytic functions and tools
Question: Which statements describe ibmdbR? (Select all that apply)
- ibmdbR provides methods to read, write, and sample data from a dashDB database
- ibmdbR provides access methods for in-database analytic functions and functions for storing R objects
- ibmdbR is hybrid data warehouse that can be deployed on public or private clouds for in-database analyltics
- ibmdbR is an R function for processing data and performing analysis
- ibmdbR is an open source library for use in R runtimes such as Jupyter notebooks or R Studio
Final Exam
Question: Which R concept maps to an RDBMS database?
- table
- none
- column (attribute)
- row (tuple)
- schema
Question: R has difficulty with which of the following. Choose all that are applicable.
- manipulating large datasets
- performing data analysis
- performing data visualization
- providing concurrent access to data
- persistence, i.e., updating or changing observations within a data frame without first loading the data into R and then recreating the data file on disk
Question: Which R concept maps to an RDBMS row or tuple?
- table
- none
- observation
- variable
- schema
Question: True or False? RJDBC does not support substitution of arguments in SQL statements
Question: Which function returns platform details about numeric types and limits?
- odbcGetInfo()
- sqlTables()
- R .Machine
- sqlColumns()
- odbcDataSources()
Question: Which of the following statements are true? Choose all that are applicable.
- The saveRDS() and readRDS() functions can be used to store and retrieve a single R object, respectively
- The save.image() function preserves all of the images in your current R workspace.
- The save() function persists single objects in R dataframes.
- Character data in R will be mapped to either a fixed sized CHARACTER column or a variable size VARCHAR column in a database.
- R can retrieve dataframes that are stored in binary format
Question: Which function can be used to call stored procedures from R?
- sqlSelect()
- sqlRQuery()
- sqlQuery()
- sqlStoredProc()
- none of the above
Question: True or False? RJDBC is a package implementing a DBI in R on the basis of JDBC.
Question: To preserve the integrity of the data as it is analyzed using R, as the data is queried from a relational database into an R dataframe it is important to understand the data types used to store the data in the database. Which of the following commands, statements, or functions provides the column names, data types, precision/size, and whether or not null values are allowed? (select all that apply)
- DESCRIBE command
- odbcGetInfo() function
- odbcGetTypeInfo() function
- sqlColumns() function
- SQL SELECT statement
Question: True or False. There are optional parameters available with the sqlTables() function to limit the results to only certain types of tables or table object names can be limited using wildcard characters.
Question: Commonly used visualization for database modelling involves the use of:
- Logical models
- Physical models
- Entity- Relationship or ER diagrams
- Database schemas
- Flowchart diagrams
Question: Which statement is false?
- OUTPUT parameters cannot be returned from a stored procedure using RODBC, however result set can be returned.
- The sqlUpdate() function can be used to push the updated data to the R dataframe where it originally came from.
- Stored procedures are valuable tools for performing analysis on data that is stored in a relational database server and they can be used to dramatically reduce the time required to perform data intensive tasks as they execute on the database server itself.
- The sqlUpdate() function can be used to modify data in a database from R, even if not not recommended.
- It is recommended to set the errors parameter to false and check for a -1 return value to properly handle any errors.
Question: Which statements describe stored procedures? Choose all that are applicable.
- stored procedures are data-centric code modules that are stored and executed on the database server
- stored procedures must be coded only by experienced DBAs
- stored procedures do not allow dynamic parameters
- stored procedures can be created using one of many different stored procedure languages
- stored procedures eliminate network traffic delay because processing is performed on the database server
Question: True or False. A full-table select can be accomplished using the sqlFetch() function. The function will dynamically create a dataframe and populate it with the data from the database server.
Question: Which statements are true about in-database analytics? Choose all that are applicable.
- in-database analytics involves processing of data and performing analysis in the analytic application itself
- IBM dashDB supports in-database analytics with R
- In-database Analytics refers to processing the data and performing of analysis within the database itself, where data is stored
- ibmdbR is an open source R library that facilitates in-database analytics from ibm databases like dashDB
- in-database analytics reduces network traffic and data movement because analytics processing is performed on the database server
Conclusion:
We hope you know the correct answers to Using R with Databases If Queslers helped you to find out the correct answers then make sure to bookmark our site for more Course Quiz Answers.
If the options are not the same then make sure to let us know by leaving it in the comments below.
Course Review:
In our experience, we suggest you enroll in this and gain some new skills from Professionals completely free and we assure you will be worth it.
This course is available on Cognitive Class for free, if you are stuck anywhere between quiz or graded assessment quiz, just visit Queslers to get all Quiz Answers and Coding Solutions.
More Courses Quiz Answers >>
Building Cloud Native and Multicloud Applications Quiz Answers
Accelerating Deep Learning with GPUs Quiz Answers
Blockchain Essentials Cognitive Class Quiz Answers
Deep Learning Fundamentals Cognitive Class Quiz Answers
Hadoop 101 Cognitive Class Answers
Machine Learning With R Cognitive Class Answers
Machine Learning with Python Cognitive Class Answers