Package: DBI 1.3.0.9010

Kirill Müller

DBI: R Database Interface

A database interface definition for communication between R and relational database management systems. All classes in this package are virtual and need to be extended by the various R/DBMS implementations.

Authors:R Special Interest Group on Databases [aut], Hadley Wickham [aut], Kirill Müller [aut, cre], R Consortium [fnd]

DBI_1.3.0.9010.tar.gz
DBI_1.3.0.9010.zip(r-4.7)DBI_1.3.0.9010.zip(r-4.6)DBI_1.3.0.9010.zip(r-4.5)
DBI_1.3.0.9010.tgz(r-4.6-any)DBI_1.3.0.9010.tgz(r-4.5-any)
DBI_1.3.0.9010.tar.gz(r-4.7-any)DBI_1.3.0.9010.tar.gz(r-4.6-any)
DBI_1.3.0.9010.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
DBI/json (API)

# Install 'DBI' in R:
install.packages('DBI', repos = c('https://cynkra.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/r-dbi/dbi/issues

Pkgdown/docs site:https://dbi.r-dbi.org

On CRAN:

Conda:

databaseinterface

20.96 score 320 stars 3.2k packages 26k scripts 649k downloads 12 mentions 77 exports 0 dependencies

Last updated from:52fab4d8a4. Checks:9 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK136
source / vignettesOK242
linux-release-x86_64OK654
macos-release-arm64OK78
macos-oldrel-arm64OK94
windows-develOK120
windows-releaseOK144
windows-oldrelOK109
wasm-releaseOK119

Exports:.SQL92KeywordsANSIdbAppendTabledbAppendTableArrowdbBegindbBinddbBindArrowdbBreakdbCallProcdbCanConnectdbClearResultdbColumnInfodbCommitdbConnectdbCreateTabledbCreateTableArrowdbDataTypedbDisconnectdbDriverdbExecutedbExistsTabledbFetchdbFetchArrowdbFetchArrowChunkdbGetConnectArgsdbGetDBIVersiondbGetExceptiondbGetInfodbGetQuerydbGetQueryArrowdbGetRowCountdbGetRowsAffecteddbGetStatementdbHasCompleteddbIsReadOnlydbIsValiddbListConnectionsdbListFieldsdbListObjectsdbListResultsdbListTablesdbQuoteIdentifierdbQuoteLiteraldbQuoteStringdbReadTabledbReadTableArrowdbRemoveTabledbRollbackdbSendQuerydbSendQueryArrowdbSendStatementdbSetDataMappingsdbUnloadDriverdbUnquoteIdentifierdbWithTransactiondbWriteTabledbWriteTableArrowfetchIdisSQLKeywordisSQLKeyword.defaultmake.db.namesmake.db.names.defaultshowSQLsqlAppendTablesqlAppendTableTemplatesqlColumnToRownamessqlCommentSpecsqlCreateTablesqlDatasqlInterpolateSQLKeywordssqlParseVariablessqlParseVariablesImplsqlQuoteSpecsqlRownamesToColumn

Dependencies:

A Common Database Interface (DBI)
Version | Introduction | DBI Classes and Methods | Class DBIObject | Class DBIDriver | Class DBIConnection | Class DBIResult | Data Type Mappings | Utilities | Open Issues and Limitations | Resources

Last update: 2026-02-25
Started: 2015-02-25

A Common Interface to Relational Databases from R and S -- A Proposal
Computing with Distributed Data | A Common Interface | Interface Classes | Class dbManager | Class dbConnection | Class dbResult | Class dbResultSet | Data Type Mappings | Open Issues | Limitations | Other Approaches | Open Database Connectivity (ODBC) | Java Database Connectivity (JDBC) | CORBA and a 3-tier Architecture | Resources | Acknowledgements | The S Version 4 Definitions

Last update: 2026-02-25
Started: 2015-02-25

Advanced DBI Usage
Who this tutorial is for | How to run more complex queries using DBI | How to read part of a table from a database | How to use parameters (safely) in SQL queries | Quoting | Parameterized queries | SQL data manipulation - UPDATE, DELETE and friends | SQL transactions with DBI | Conclusion

Last update: 2026-02-25
Started: 2021-01-02

Introduction to DBI
Who this tutorial is for | How to connect to a database using DBI | Secure password storage | How to retrieve column names for a table | Read a table into a data frame | Read only selected rows and columns into a data frame | How to end a DBMS session | Conclusion | Further Reading

Last update: 2025-05-03
Started: 2019-11-22

Implementing a new backend
Getting started | Testing | Driver | Connection | Results | SQL methods | Metadata methods | Full DBI compliance

Last update: 2024-12-06
Started: 2015-01-27

DBI specification

Last update: 2024-02-09
Started: 2017-02-28

Using DBI with Arrow
Who this tutorial is for | Rationale | New classes and generics | Prepare | Read all rows from a table | Run queries | Prepared queries | Manual flow | Writing data | Appending data | Conclusion

Last update: 2023-12-27
Started: 2022-09-29

History of DBI

Last update: 2023-11-08
Started: 2019-11-22

Readme and manuals

Help Manual

Help pageTopics
DBI: R Database InterfaceDBI-package DBI
Keywords according to the SQL-92 standard.SQL92Keywords
Insert rows into a tabledbAppendTable
Insert rows into a table from an Arrow streamdbAppendTableArrow
Begin/commit/rollback SQL transactionsdbBegin dbCommit dbRollback transactions
Bind values to a parameterized/prepared statementdbBind dbBindArrow
Check if a connection to a DBMS can be establisheddbCanConnect
Clear a result setdbClearResult
Information about result typesdbColumnInfo
Create a connection to a DBMSdbConnect
Create a table in the databasedbCreateTable
Create a table in the database based on an Arrow objectdbCreateTableArrow
Determine the SQL data type of an objectdbDataType
Disconnect (close) a connectiondbDisconnect
Change database statedbExecute
Does a table exist?dbExistsTable
Fetch records from a previously executed querydbFetch fetch
Fetch records from a previously executed query as an Arrow objectdbFetchArrow
Fetch the next batch of records from a previously executed query as an Arrow objectdbFetchArrowChunk
Get connection argumentsdbGetConnectArgs
Get DBMS metadatadbGetInfo
Retrieve results from a querydbGetQuery
Retrieve results from a query as an Arrow objectdbGetQueryArrow
The number of rows fetched so fardbGetRowCount
The number of rows affecteddbGetRowsAffected
Get the statement associated with a result setdbGetStatement
Completion statusdbHasCompleted
DBIConnection classDBIConnection-class
DBIConnector classDBIConnector-class
DBIDriver classDBIDriver-class
DBIObject classDBIObject-class
DBIResult classDBIResult-class
DBIResultArrow classDBIResultArrow-class DBIResultArrowDefault-class
Is this DBMS object read only?dbIsReadOnly
Is this DBMS object still valid?dbIsValid
List field names of a remote tabledbListFields
List remote objectsdbListObjects
List remote tablesdbListTables
Quote identifiersdbQuoteIdentifier
Quote literal valuesdbQuoteLiteral
Quote literal stringsdbQuoteString
Read database tables as data framesdbReadTable
Read database tables as Arrow objectsdbReadTableArrow
Remove a table from the databasedbRemoveTable
Execute a query on a given database connectiondbSendQuery
Execute a query on a given database connection for retrieval via ArrowdbSendQueryArrow
Execute a data manipulation statement on a given database connectiondbSendStatement
Unquote identifiersdbUnquoteIdentifier
Self-contained SQL transactionsdbBreak dbWithTransaction
Copy data frames to database tablesdbWriteTable
Copy Arrow objects to database tablesdbWriteTableArrow
Refer to a table nested in a hierarchy (e.g. within a schema)Id Id-class
Convert row names back and forth between columnsrownames sqlColumnToRownames sqlRownamesToColumn
SQL quotingSQL SQL-class
Compose query to insert rows into a tablesqlAppendTable sqlAppendTableTemplate
Compose query to create a simple tablesqlCreateTable
Convert a data frame into form suitable for upload to an SQL databasesqlData
Safely interpolate values into an SQL stringsqlInterpolate