> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# atoti.tables.Tables.schema

#### *property* Tables.schema *: [object](https://docs.python.org/3/library/functions.html#object)*

Schema of the tables represented as a [Mermaid](https://mermaid.js.org) entity relationship diagram.

Each table is represented with 3 or 4 columns:

1. whether the column’s [`default_value`](./atoti.Column.default_value#atoti.Column.default_value) is `None` (denoted with nullable) or not
2. the column [`data_type`](./atoti.Column.data_type#atoti.Column.data_type)
3. (optional) whether the column is part of the table [`keys`](./atoti.Table.keys#atoti.Table.keys) (denoted with PK) or not
4. the column [`name`](./atoti.Column.name#atoti.Column.name)

### Example

```pycon theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
>>> table_a = session.create_table(
...     "Table a",
...     data_types={"foo": "String", "bar": "int"},
...     default_values={"bar": None},
... )
>>> table_b = session.create_table(
...     "Table b",
...     data_types={"bar": "int", "baz": "LocalDate"},
...     keys={"bar"},
... )
>>> table_c = session.create_table(
...     "Table c",
...     data_types={"foo": "String", "xyz": "double"},
...     keys={"foo", "xyz"},
... )
>>> table_d = session.create_table(
...     "Table d",
...     data_types={
...         "foo d": "String",
...         "xyz d": "double",
...         "abc d": "float",
...     },
...     default_values={"abc d": None},
...     keys={"foo d", "xyz d"},
... )
>>> table_a.join(table_b, table_a["bar"] == table_b["bar"])
>>> table_a.join(table_c, table_a["foo"] == table_c["foo"])
>>> table_c.join(
...     table_d,
...     (table_c["foo"] == table_d["foo d"])
...     & (table_c["xyz"] == table_d["xyz d"]),
... )
>>> schema = session.tables.schema
```

```mermaid theme={"languages":{"custom":["/engine/python-sdk/0.9/languages/pycon.tmLanguage.json"]}}
erDiagram
  "Table a" {
    non-null String "foo"
    nullable int "bar"
  }
  "Table b" {
    non-null int PK "bar"
    non-null LocalDate "baz"
  }
  "Table c" {
    non-null String PK "foo"
    non-null double PK "xyz"
  }
  "Table d" {
    non-null String PK "foo d"
    non-null double PK "xyz d"
    nullable float "abc d"
  }
  "Table a" }o--o| "Table b" : "bar == bar"
  "Table a" }o..o{ "Table c" : "foo == foo"
  "Table c" }o--o| "Table d" : "(foo == “foo d”) & (xyz == “xyz d”)"
```
