Documentation
5. RelPyDB vs Alternatives
When to use RelPyDB and when to use dict/list, pandas, SQLite, DuckDB or SQLAlchemy.
Where RelPyDB fits
RelPyDB is not trying to replace every data tool. It is useful when you want relational structure inside Python without setting up a database server or writing SQL.
| Tool | Use it when | RelPyDB difference |
|---|---|---|
| dict/list | You need simple ad-hoc Python data. | RelPyDB adds schema, keys, constraints, joins and exports. |
| pandas | You need dataframe analysis and statistics. | RelPyDB is more relational and schema-oriented. |
| SQLite | You need a real embedded SQL database. | RelPyDB stays inside Python objects and avoids SQL setup. |
| DuckDB | You need fast analytical SQL. | RelPyDB focuses on Python-native modeling and developer ergonomics. |
| SQLAlchemy | You need ORM/database integration. | RelPyDB is lighter and in-memory. |
Good use cases
- Teaching relational concepts in Python.
- Prototyping schema and relations.
- Normalizing JSON or API responses.
- Small local tools.
- Tests and demos that need constraints and joins.
- Exporting structured data to JSON, pandas, NumPy or SQL.
Bad use cases
- Production multi-user storage.
- Large analytical workloads.
- Concurrent writes from multiple processes.
- Full SQL compatibility.
- Replacing PostgreSQL, SQLite or DuckDB.