# The data model canvas (/docs/contacts/data-model-canvas)

The data model canvas draws your whole data model at once: each object is a card listing its fields, and each relation is a line between the fields it adds. It's the quickest way to see how contacts, orders, products and your synced tables fit together, and owners and admins can relate objects by drawing a line from one card to another.

- **Who can use it:** Everyone can open the canvas, zoom and click a card to see its fields. Owners and admins can also move cards, tidy the layout, draw relations and edit or delete objects from it. For everyone else **Tidy layout** and **New object** are greyed out with the reason, and cards don't move. See [Roles and permissions](/docs/settings/roles).
- **Before you start:** Nothing. Everything on the canvas can also be done from the objects list and the object sheet, without dragging.

## Open the canvas [#open-the-canvas]

<Steps>
<Step>

### Switch to Data model [#switch-to-data-model]

Go to **Setup → Objects** and click **Data model** beside the search. Its count is the number of relations in the workspace.

</Step>
<Step>

### Read the cards and lines [#read-the-cards-and-lines]

Each card has the object's icon, name and record count in its header (Contacts carries a lock, as it's built in), then one row per field with its type icon. The primary field is marked **Primary**. A relation field has a blue icon and names the object it links to.

Lines join the relation fields of two cards. The label on each line says how they link: **1 — 1** (one to one), **1 — N** (one to many) or **N — N** (many to many). See [Relate objects](/docs/contacts/relations).

![The data model canvas with Contacts, Orders and Products cards, a 1 — N line from Contacts to Orders and an N — N line from Orders to Products](/screenshots/data-model-canvas/01-canvas.webp)

</Step>
</Steps>

## Move around [#move-around]

The controls at the top left of the canvas:

| Control | What it does |
| --- | --- |
| **Zoom in** / **Zoom out** | Zoom one step. |
| **Fit to screen** | Zoom so every card fits. |
| **Tidy layout** | Lays the cards out in a grid, the most related objects first, and keeps that layout. Owners and admins only. |
| **New object** | Opens the [New object](/docs/contacts/create-object) sheet. Owners and admins only. |

![The canvas controls with the Tidy layout tooltip showing](/screenshots/data-model-canvas/02-controls.webp)

You can also zoom with a pinch on a trackpad, or hold <kbd>⌘</kbd> (<kbd>Ctrl</kbd> on Windows and Linux) and scroll. Scrolling on its own scrolls the page. Drag the dotted background to move the whole diagram.

## Arrange the cards [#arrange-the-cards]

Owners and admins can drag a card by its header to move it. The new position is saved, so everyone in the workspace sees the same layout. **Tidy layout** puts every card back on a grid.

From the keyboard, press <kbd>Tab</kbd> to reach a card, <kbd>Space</kbd> to select it, then the arrow keys to move it.

## Draw a relation [#draw-a-relation]

<Steps>
<Step>

### Drag from one card to another [#drag-from-one-card-to-another]

Each card's header has a small square handle on its left and right edges. Press on a handle and drag to another card, then let go over it.

![A line being drawn from the Contacts card's header to the Orders card](/screenshots/data-model-canvas/03-drawing.webp)

</Step>
<Step>

### Finish it in the sheet [#finish-it-in-the-sheet]

The sheet of the card you started from opens with a new relation to the other object, open and ready: by default **Many to one**, with each side's field named after the other object. Choose **How they link**, adjust the names and click **Save changes**. If you change your mind, click **Cancel**: nothing is saved.

![The Contacts sheet with a new relation to Orders set to Many to one, with Order as the field on Contacts and Contacts as the field on Orders](/screenshots/data-model-canvas/04-drawn-relation.webp)

</Step>
</Steps>

## Edit from the canvas [#edit-from-the-canvas]

- **Click a card** (or press <kbd>Enter</kbd> on a selected card) to open its object sheet. Owners and admins can edit it there; everyone else sees its fields with a **Close** button.
- **Click a line's label**, such as **N — N**, to open that relation in its object's sheet, ready to change. Owners and admins only.
- **Delete an object** by selecting its card and pressing <kbd>Delete</kbd> or <kbd>Backspace</kbd>. The same confirmation as in the list counts the records and relations that go with it. Contacts can't be deleted.

![The Delete Products? confirmation: 5 products and 1 relation go with it, and Orders lose their link to it](/screenshots/data-model-canvas/05-delete-object.webp)

To delete a relation, click its label and use **Remove relation** in the sheet (see [Relate objects](/docs/contacts/relations#change-or-remove-a-relation)).

## Troubleshooting [#troubleshooting]

<Accordions type="single">
<Accordion title="The cards won't move">
Only owners and admins can move cards. For everyone else the canvas is view only: click a card to see its fields. See [Roles and permissions](/docs/settings/roles).
</Accordion>
<Accordion title="Dragging from a card doesn't start a relation">
Press on the small square handle on the left or right edge of the card's header, not on the card itself. Dragging the card moves it instead.
</Accordion>
</Accordions>

## Next steps [#next-steps]

<Cards>
<Card title="Relate objects" href="/docs/contacts/relations" description="The four kinds of relation and how to link records." />
<Card title="Objects and the data model" href="/docs/contacts/objects" description="The list view of the same objects." />
<Card title="Connect a database" href="/docs/contacts/connect-database" description="Bring tables from your database onto the canvas." />
</Cards>
