Using object-relational mappers
An object-relational mapper (ORM) is a piece of software that tries to handle the ‘impedance mismatch’ between the relational database model and the object-oriented paradigm (https://martinfowler.com/bliki/OrmHate.html). In the Python world the use of ORMs is common; Figure 8.3 summarizes their capabilities:

Figure 8.3: ORM general model
We are not going to argue the pros and cons of ORMs in depth, but notice that there are, as with many other projects in the ecosystem, several implementations that provide differing levels of asynchronous support. The main advantages provided by ORMs include:
- Reduction of SQL code, allowing development with unified Python code ...