# SOCI/soci

Official repository of the SOCI - The C++ Database Access Library

Repository: https://github.com/SOCI/soci
Canonical: https://ross.abutalabs.com/products/soci
Homepage: http://soci.sourceforge.net/
Language: C++
License: BSL-1.0
License Family: other
Topics: cplusplus, database-library, postgresql, mysql, odbc, db2, firebird, sqlite3, boost, oracle
Last push: 2026-08-21T17:57:49+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 35, longevity 100
- inputs: {"age_days": 5412, "days_push": 12, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1619, forks 515 (observed 2026-08-28T04:05:12.117489+00:00)

## What it is
SOCI is a C++ database access library that lets developers embed SQL queries naturally in standard C++ code, with object-relational mapping and STL/Boost datatype integration. It uses a plug-in backend architecture supporting DB2, Firebird, MySQL, ODBC, Oracle, PostgreSQL, and SQLite3.

## Use cases
- query SQL databases from C++
- map database rows to C++ objects
- access Oracle from C++
- use SQLite in a C++ application
- write database-agnostic C++ code with pluggable backends
- bind Boost and user-defined types to SQL queries

## When to choose
- you want a lightweight, natural SQL interface in standard C++
- you need to support multiple database backends with one API
- you want ORM-like row mapping without a heavy framework

## When to avoid
- you need a full-featured ORM with migrations and schema management
- your project is not C++ or uses a database without a SOCI backend
- you prefer header-only or async-first database libraries

## Facets
- artifact type: library
- maturity: stable
- function: database, database-driver, orm
- domain: databases, developer-tools, backend
- platform: cpp, cross-platform, windows
- tags: sql, database-access, oracle, postgresql, mysql, sqlite3, odbc, firebird, db2, boost, linux, macos

## Member repositories
- SOCI/soci (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:12.117489+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:49:24.983513+00:00, confidence not recorded.
  - readme: https://github.com/SOCI/soci (fetched 2026-08-28T04:05:12.117489+00:00, sha 77727026c5e2)
  - homepage: http://soci.sourceforge.net/ (fetched 2026-08-29T11:21:59.292762+00:00, sha 6f9096ce9d49)
  - site_page: https://soci.sourceforge.net/doc/index.html (fetched 2026-08-29T11:21:59.301751+00:00, sha 4ad6b1efa02a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
