hadley/scdb — explained in plain English
Analysis updated 2026-08-07 · repo last pushed 2026-05-14
Maintain a patient health database where you can look up someone's medical status at any past date.
Build a customer database that keeps a full history of address and contact changes over time.
Track product price updates in a database while preserving every previous price with validity windows.
Create a research dataset that records how population attributes shift across time periods.
| hadley/scdb | 0-bingwu-0/live-interpreter | 010zx00x1/faresnipe | |
|---|---|---|---|
| Stars | 2 | 2 | 2 |
| Language | — | Python | Python |
| Last pushed | 2026-05-14 | — | — |
| Maintenance | Maintained | — | — |
| Setup difficulty | moderate | moderate | easy |
| Complexity | 3/5 | 2/5 | 2/5 |
| Audience | data | general | general |
Figures from each repo's GitHub metadata at analysis time.
Requires an existing SQL database connection and familiarity with R database workflows plus slowly changing dimension concepts.
SCDB is an R package that helps you maintain databases where the underlying data changes over time. The core benefit is tracking "slowly changing dimensions", a concept from data warehousing that means when a record changes (like a customer moving to a new address or a product getting a price update), you keep the old version and the new one, each with a time range showing when it was valid. Instead of overwriting the old data and losing history, you end up with a full record of how things looked at any point in the past. The package implements what's called "type-2 history," a standard approach where each row gets a validity window, a start date and end date indicating when that version of the data was current. When new data arrives, expired rows get closed off and new rows are inserted. SCDB also bundles some quality-of-life helpers for working with SQL databases from within R, reducing the boilerplate you'd normally write. This would be useful for analysts, data engineers, or researchers working in R who need to maintain a database that preserves change history. A concrete example: if you work at a health organization tracking patient or population records where attributes shift over time, you'd want to know what someone's status was last year versus today, not just the current state. The package is published on CRAN (the main R package repository) and comes from Statens Serum Institut, Denmark's public health institute. The README is fairly sparse and points to vignettes for actual usage examples and deeper explanation of the slowly changing dimension concept. If you're comfortable in R and need historical tracking in your database workflows, that's where you'd start.
SCDB is an R package for tracking how data changes over time in databases. It keeps old and new versions of records with date ranges, so you can see what your data looked like at any point in the past.
Maintained — commit in last 6 months (last push 2026-05-14).
No license information is provided in the README, so usage terms are unknown.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly data.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.