> For the complete documentation index, see [llms.txt](https://openai.gitbook.io/code-cheatsheets/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://openai.gitbook.io/code-cheatsheets/all/databases/libs.md).

# Code Abstractions

## Database Driver

* raw SQL strings delievered to database with async? Rest
* connection pooling

## Query Builder

* programmatically generate dynamic queries in a much more convenient way
* generate queries for a few different SQL dialects
* **sweetspot of SQL** because clear connection to general SQL, yet dealing with fts instead of strings

## ORM

* map a record in a relational database to an object&#x20;
* Do object validation on NoSQL and create generated properties and class fields
* Learn a ORM specific interface rather than SQL
* Must update code when you update database slowing down iterations early
* Cant do everything in an ORM meaning you dip into SQL or do some inefficient code
* **sweetspot of NoSQL**, adds needed things like object validation
