CRAN 任务视图:R 中的数据库
本 CRAN 任务视图包含一个与不同数据库可访问性相关的包列表。这并不包括数据导入/导出或数据管理。此外,关于 高性能计算 和 机器学习 的任务视图可能提供有用的信息。
随着数据集越来越大,人们不可能将它们保存在传统的电子表格、原始文本文件等文件格式中,这些格式可能无法容纳在存储空间有限的设备上,也无法轻松地在协作者之间共享。相反,如今人们倾向于将数据存储在数据库中,以实现更可扩展和可靠的数据管理。
数据库系统通常根据它们支持的 数据库模型 进行分类。关系型数据库 在 1980 年代成为主流。关系型数据库中的数据被建模为一系列表中的行和列,使用 SQL 来表达编写和查询数据的逻辑。这些表是相关的,例如,您有一个使用您软件的用户,这些软件有创建者和贡献者。近年来,由于对使用 NoSQL 作为查询语言存储非结构化数据的巨大需求,非关系型数据库变得流行起来。用户通常不需要预先定义数据模式。如果应用程序中有不断变化的需求,非关系型数据库可能更容易使用和管理。
本任务视图中介绍的内容正在行业和学术界发生着快速变化。请通过电子邮件将任何建议发送给维护者,或在上面链接的 GitHub 存储库中提交问题或拉取请求。感谢所有其他人的建议和更正。
关系型数据库
本节包含提供 R 中关系型数据库访问的软件包。
- The DBI 软件包为 R 与关系型数据库管理系统之间的通信提供数据库接口定义。值得注意的是,一些软件包试图遵循此接口定义(DBI 兼容),但许多现有软件包并不遵循。
- The RODBC 软件包通过 ODBC 接口提供对数据库的访问。此软件包由 R 核心团队维护,仅依赖于基本 R。请参见下面的替代 odbc 软件包。
- The odbc 软件包为 ODBC 驱动程序提供 DBI 兼容接口。此软件包由 RStudio 维护,并且具有许多软件包依赖项。请参见上面的替代 RODBC 软件包。
- The RMariaDB 软件包为 MariaDB 和 MySQL 提供 DBI 兼容接口。
- The RMySQL 软件包提供与 MySQL 的接口。请注意,这是基于从 S-PLUS 移植的旧代码的 MySQL 和 MariaDB 的传统 DBI 接口。基于 Rcpp 的现代 MySQL 客户端可从上面列出的 RMariaDB 软件包获得。
- 用于 PostgreSQL 的软件包,这是一个开源关系型数据库
- The ROracle 软件包是基于 OCI 的 DBI 兼容 Oracle 数据库 驱动程序。The ora (archived) 软件包提供便利函数,通过 ROracle 连接查询和浏览数据库。
- 用于 SQLite 的软件包,SQLite 是一个独立的、高可靠性的、嵌入式的、功能齐全的、公共领域的 SQL 数据库引擎
- The RSQLite package embeds the SQLite database engine in R and provides an interface compliant with the DBI package.
- The filehashSQLite package is a simple key-value database using SQLite as the backend.
- The liteq package provides temporary and permanent message queues for R, built on top of SQLite.
- The duckdb package provides a DBI interface to DuckDb, an in-process SQL OLAP database management system.
- The bigrquery package provides the interface to Google BigQuery, Google’s fully managed, petabyte scale, low cost analytics data warehouse.
- The RDruid package on GitHub provides the interface to Apache Druid, a high performance analytics data store for event-driven data.
- The RH2 package provides the interface to H2 Database Engine, the Java SQL database.
- The influxdbr package provides the interface to InfluxDB, a time series database designed to handle high write and query loads.
- The RPresto package implements a DBI-compliant interface to Presto, an open source distributed SQL query engine for running interactive analytic queries against data sources of all sizes ranging from gigabytes to petabytes.
- The RJDBC package is an implementation of R’s DBI interface using JDBC as a back-end. This allows R to connect to any DBMS that has a JDBC driver.
- The implyr package provides the back-end for Apache Impala, which enables low-latency SQL queries on data stored in the Hadoop Distributed File System (HDFS), Apache HBase, Apache Kudu, Amazon Simple Storage Service (S3), Microsoft Azure Data Lake Store (ADLS), and Dell EMC Isilon.
- The dbx package provides intuitive functions for high performance batch operations and safe inserts/updates/deletes without writing SQL on top of DBI. It is designed for both research and production environments and supports multiple database backends such as Postgres, MySQL, MariaDB, and SQLite.
- The sparklyr package provides provides a dplyr interface to Apache Spark DataFrames as well as an R interface to Spark’s distributed machine learning pipelines.
- The Hmisc provides a wrapper function
Hmisc::mdb.get()
that uses the mdbtools utility to read from Microsoft Access database on Unix-alike systems. - The DatabaseConnector provides a DBI compatible interface to various database platforms using either JDBC or DBI drivers.
非关系型数据库
本节包含提供对 R 中非关系型数据库访问的软件包。
- 用于 Redis 的软件包,Redis 是一种开源的内存数据结构存储,可用作数据库、缓存和消息代理
- The RcppRedis package provides an interface to Redis using hiredis.
- The redux package provides a low-level interface to Redis, allowing the execution of arbitrary Redis commands with almost no interface, and a high-level generated interface to more than 200 redis commands.
- Packages for Elasticsearch, an open-source, RESTful, distributed search and analytics engine
- The elastic package provides a general purpose interface to Elasticsearch.
- The uptasticsearch package is an Elasticsearch client tailored to data science workflows.
- The mongolite package provides a high-level, high-performance MongoDB client based on mongo-c-driver, including support for aggregation, indexing, map-reduce, streaming, SSL encryption and SASL authentication.
- The R4CouchDB package provides a collection of functions for basic database and document management operations in CouchDB.
- Packages for Amazon DynamoDB, a fast, flexible NoSQL database
- The aws.dynamodb package on GitHub provides access to inside from the
cloudyr
development team. - The paws.database package provides an interface using the paws suite of tools.
- The rrocksdb package on GitHub provides access to RocksDB.
本节包含提供用于处理和测试数据库、数据库表操作等的工具的包。
- The MSSQL package extends the functionality of the RODBC package to work with Microsoft SQL Server databases. Makes it easier to browse the database and examine individual tables and views.
- The pool package enables the creation of object pools, which make it less computationally expensive to fetch a new object.
- The DBItest package is a helper that tests DBI back ends for conformity to the interface.
- The dbplyr package is a dplyr back-end for databases that allows you to work with remote database tables as if they are in-memory data frames. Basic features works with any database that has a DBI back-end; more advanced features require SQL translation to be provided by the package author.
- The sqldf package provides functionalities to manipulate R Data Frames Using SQL.
- The pointblank package provides tools to validate data tables in databases such as PostgreSQL and MySQL.
- The dittodb 包提供功能,用于测试与任何符合 DBI 标准的数据库后端进行的数据库交互。它包括在测试期间使用夹具而不是直接数据库调用,以及在与真实数据库交互时记录这些夹具以供以后在测试中使用。
- The tfio 包提供了使用 Apache Ignite 的能力,Apache Ignite 处理分布式数据库管理,以实现具有内存速度的高性能计算。
- The dbr 包在 GitHub 上提供使用 YAML 配置文件和模板从 R 进行便捷的数据库连接和查询。
- The rocker 包提供了一个 R6 类接口,用于使用 DBI 作为后端处理关系数据库连接。目的是提供一个直观的对象,允许直接处理 SQL 数据库。
- The SQRL 包简化了对 ODBC 数据库的探索性和交互式会话,并允许在 SQL 脚本中使用 R 代码。
- The octopus 包提供了一个交互式 shiny 应用程序,用于数据库管理,以查看表和模式,上传文件,发送查询等等。
CRAN 包
相关链接
其他资源