| [ Web Proxy ] |
| Viewing: https://raw.githubusercontent.com/bryanchance/python-sqlmodel/main/docs/db-to-code.md | [Back] [Original] |
| id | name | secret_name | age | team_id |
|---|---|---|---|---|
| 1 | Deadpond | Dive Wilson | null | 2 |
| 2 | Spider-Boy | Pedro Parqueador | null | 1 |
| 3 | Rusty-Man | Tommy Sharp | 48 | 1 |
| id | name | secret_name | age | team_id |
|---|---|---|---|---|
| 2 | Spider-Boy | Pedro Parqueador | null | 1 |
| id | name | secret_name | age | team_id |
|---|---|---|---|---|
| 2 | Spider-Boy | Pedro Parqueador | null | 1 |
[autocompletion01.png]
## ORMs and SQL
These types of libraries like **SQLModel** (and of course, SQLAlchemy) that translate between SQL and code with classes and objects are called **ORMs**.
**ORM** means **Object-Relational Mapper**.
This is a very common term, but it also comes from quite technical and **academical** concepts :
* **Object**: refers to code with classes and instances, normally called "Object Oriented Programming", that's why the "**Object**" part.
For example this class is part of that **Object** Oriented Programming:
```Python
class Hero(SQLModel):
id: Optional[int] = Field(default=None, primary_key=True)
name: str
secret_name: str
age: Optional[int] = None
```
* **Relational**: refers to the **SQL Databases**. Remember that they are also called **Relational Databases**, because each of those tables is also called a "**relation**"? That's where the "**Relational**" comes from.
For example this **Relation** or table:
| id | name | secret_name | age | team_id |
|---|---|---|---|---|
| 1 | Deadpond | Dive Wilson | null | 2 |
| 2 | Spider-Boy | Pedro Parqueador | null | 1 |
| 3 | Rusty-Man | Tommy Sharp | 48 | 1 |
| Web Proxy Viewer | New URL | Original Page |