Package: csdb 2026.12.4

Richard Aubrey White

csdb: An Abstracted System for Easily Working with Databases with Large Datasets

Provides object-oriented database management tools for working with large datasets across multiple database systems. Features include robust connection management for 'PostgreSQL' databases, advanced table operations with bulk data loading and upsert functionality, comprehensive data validation through customizable field type and content validators, efficient index management, and cross-database compatibility. Designed for high-performance data operations in surveillance systems and large-scale data processing workflows.

Authors:Richard Aubrey White [aut, cre], August Sørli Mathisen [aut], Folkehelseinstituttet [cph]

csdb_2026.12.4.tar.gz
csdb_2026.12.4.zip(r-4.7-any)csdb_2026.12.4.zip(r-4.6-any)csdb_2026.12.4.zip(r-4.5-any)
csdb_2026.12.4.tgz(r-4.6-any)csdb_2026.12.4.tgz(r-4.5-any)
csdb_2026.12.4.tar.gz(r-4.7-any)csdb_2026.12.4.tar.gz(r-4.6-any)
csdb_2026.12.4.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
csdb/json (API)

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

Bug tracker:https://github.com/niphr/csdb/issues

Pkgdown/docs site:https://niphr.github.io

Datasets:

On CRAN:

Conda:

csverse

6.21 score 1 stars 2 packages 2 scripts 558 downloads 30 exports 47 dependencies

Last updated from:7c478a8719. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK209
source / vignettesOK213
linux-releaseOK192
macos-releaseOK166
macos-oldrelOK146
windows-develOK160
windows-releaseOK168
windows-oldrelOK165
wasm-releaseOK107

Exports:collect_and_sort_by_pkcsdb_connection_is_alivecsdb_get_auth_hookcsdb_get_contextcsdb_get_password_hookcsdb_set_auth_hookcsdb_set_contextcsdb_set_password_hookDBConnection_v9DBTable_v9get_table_names_and_infoinsert_data_manyprofile_compareprofile_dataprofile_queryprofile_schemaprofile_tableread_profileset_pksetorder_by_pksimulate_from_profilesynthetic_table_from_dirSyntheticTablevalidator_field_contents_blankvalidator_field_contents_csfmt_rts_data_v1validator_field_contents_csfmt_rts_data_v2validator_field_types_blankvalidator_field_types_csfmt_rts_data_v1validator_field_types_csfmt_rts_data_v2write_profile

Dependencies:bitbit64blobcachemclicpp11csutildata.tableDBIdbplyrdplyrfarverfastmapfsgenericsggplot2gluegtablehmsisobandlabelinglifecyclemagrittrmemoiseodbcpillarpkgconfigpurrrR6RColorBrewerRcpprlangRSQLiteS7scalesstringistringrtibbletidyrtidyselectutf8uuidvctrsviridisLitewithryamlyyjsonr

Synthetic data from a profile
A table to profile | Sensitivity levels | Suppression by merge | The profile refuses a torn read | Write and read the profile | What a profile may contain | Simulate and compare | A SyntheticTable | Named datasets | The hash check after a generator change

Last update: 2026-11-07
Started: 2026-11-07

PostgreSQL and SQLite side by side
Two configurations | The same table against each | What differs | Why the field types are closed | Why the primary key cannot be added later | Which one to choose

Last update: 2026-10-16
Started: 2026-08-05

Introduction to csdb
What csdb is for | What this vignette does and does not prove | Two classes, and the split between them | The validators, and one gap | The three backends | Where csdb sits | A worked example | Who owns the connection | A connection does not survive a fork | Two tables that declare one index name | Emptying a table before you write to it | The upsert method answers the same four cases

Last update: 2026-08-15
Started: 2023-03-03

Readme and manuals

Help Manual

Help pageTopics
Collect a query and order it by the primary key of its tablecollect_and_sort_by_pk
Does a database connection still reach its server?csdb_connection_is_alive
Get the current authentication hookcsdb_get_auth_hook
Get the caller contextcsdb_get_context
Get the current password hookcsdb_get_password_hook
Set authentication hook for database connectionscsdb_set_auth_hook
Set the caller contextcsdb_set_context
Set the password hook for PostgreSQL connectionscsdb_set_password_hook
R6 Class representing a database connectionDBConnection_v9
R6 Class representing a database tableDBTable_v9
Get table names, number of rows, and size informationget_table_names_and_info
Insert data into several tables in one transactioninsert_data_many
Covid-19 data for PCR-confirmed cases in Norway (nation and county)nor_covid19_cases_by_time_location
Compare two profilesprofile_compare
Profile a data frameprofile_data
Profile the result of a SQL queryprofile_query
A profile that holds only a schemaprofile_schema
Profile a DBTable_v9profile_table
Read a profile from a YAML fileread_profile
Attach a primary key to a lazy tableset_pk
Order a data.table by the primary key of a tablesetorder_by_pk
Simulate a table from a profilesimulate_from_profile
Build a SyntheticTable from a directorysynthetic_table_from_dir
The synthetic data contract of one tableSyntheticTable
Blank data contents validatorvalidator_field_contents_blank
Field contents validator for csfmt_rts_data_v1 schemavalidator_field_contents_csfmt_rts_data_v1
Field contents validator for csfmt_rts_data_v2 schemavalidator_field_contents_csfmt_rts_data_v2
Blank field types validatorvalidator_field_types_blank
Field types validator for csfmt_rts_data_v1 schemavalidator_field_types_csfmt_rts_data_v1
Field types validator for csfmt_rts_data_v2 schemavalidator_field_types_csfmt_rts_data_v2
Write a profile to a YAML filewrite_profile