# What is an ORM

* A layer of abstraction that sits between the database and us
* We can perform all database operations though traditional Python code
* No longer requires SQL

![](/files/2gAEfmEgwjIoUjBRo1qe)

### What do ORMs do?

* Instead of manually defining tables in Postgres, we can define our table as python models

![](/files/bE938b0nOuzRpobjTmZH)

* Queries can be made exclusively through python code
* No SQL is necessary

![](/files/LSV36hWUvP4we0qmbcSp)

### SQLAlchemy

[Official Documentation](https://www.sqlalchemy.org/)

[FastAPI ORM Setup Documentation](https://fastapi.tiangolo.com/tutorial/sql-databases/?h=)

* Is one of the most popular python ORMs
* Is a standalone library and has no association with FastAPI
* It can be used with any other python web framework or any python based application


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.arkannis.net/programming/python/frameworks/sqlalchemy/what-is-an-orm.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
