Persisting C++ Classes in Relational Databases with ODB
summary
A working C++ ORM is demonstrated: ODB generates mapping code from C++ class declarations via a GCC plugin, targets SQLite PostgreSQL MySQL MS SQL Server Oracle, and uses prepared statements with cached connections for performance. Examples show transactional persist load update delete, Boost and Qt profiles, smart pointers and containers, and a small bug-tracker built and runnable. Schema evolution uses an XML change log and pre and post migration scripts with embedded data-migration lambdas. A static SQLite hello world with query support is about 500 kilobytes.
AI-written summary · about
chapters (32)
- 0:00Intro
- 0:19ODB, an ORM for C++
- 1:26Object Relational Mapping
- 2:46Manual Schema Evolution
- 9:46Databases
- 10:39Mobile & Embedded
- 12:21Performance
- 12:38License
- 13:54C++ Support
- 15:31Persistent Class
- 18:07Workflow
- 19:21ODB Compiler
- 22:11Custom Schema
- 23:22Transactions
- 26:03Loading Persistent Objects
- 28:27Querying the Database
- 30:06Deleting Persistent Objects
- 31:12Profiles
- 32:21Adding Timestamps
- 32:34Boost Profile
- 33:30Qt Profile
- 34:02Containers
- 35:21Composite Value Types
- 37:06Adding User Object
- 40:29Relationships in Queries
- 42:37Static Multi-Database Support
- 43:39Dynamic Multi-Database Support
- 44:10Dynamic Loading
- 44:39Database Schema Evolution
- 47:41Object Model Version
- 49:53Schema Migration
- 55:45Data Migration
related talks
01h 05m“A modern database interface for C++"
39mLet's Build an ORM
35mPersisting Relations Across Time and Space
46mBeyond Good and ORMs
01h 00mPersistent Object Storage for Qt Quick
59mHow much database abstraction do I need?
36mCompile-time reflection, Serialization and ORM
41mAn Object Oriented Approach to Data Driven Software Development
