Files
directus/docs/concepts/collections.md
Rijk van Zanten 817ccf3620 Overhaul docs (#3951)
* Add Quickstart Guide

* Update installation

* Remove unused files

* Update support/backing

* Tweaks in concepts

* Setup file structure for API reference 2.0

* Setup page layout for reference

* Add clean-urls plugin

* getting started updates

* Finish authentication rest

* getting started updates

* Render stylus in 2 spaces

* Various

* Various

* Finish activity docs

* Add collections reference

* Add extension reference

* concepts updates

* Fields/tweaks

* Add files doc

* Add revisions

* concepts docs

* More api reference

* Finish rest api reference (finally)

* initial concepts

* More things

* Add assets api ref

* Move sections from file to assets

* Add environment variables

* contributing docs

* Add field transforms page

* Left align table headers

* concept links

* Add API config

* Fix mobile nav

* Add migrating a project

* doc link fixes

Co-authored-by: Ben Haynes <ben@rngr.org>
2021-02-05 18:51:54 -05:00

40 lines
2.3 KiB
Markdown

# Collections
> Each Collection contains some number of fields, and is a container for a specific grouping of Items. Each collection represents a **table** in your database.
Directus automatically uses a built-in title formatter to display your database table names prettified, however you can use [schema translations](/concepts/translations/#schema-translations) to completely rename them if needed.
Collections can be organized in any way that is appropriate for your project. You can architect them platform-specific
(eg: _pages_ of a website), or in a more platform-agnostic way (eg: raw _customers_ of your business). While there's no
right or wrong way to structure your data-model, we recommend keeping your data as agnostic as possible so it is easier
to repurpose in the future. **In short, learn to see your data as its own asset — not only through the lens of your
immediate project needs**.
The only requirement of a collection is that it must contain a **Primary Key** field. This field stores a unique value that is used to reference the Collection's items throughout the database/platform.
#### Relevant Guides
- [Creating a Collection](/guides/collections/#creating-a-collection)
- [Configuring a Collection](/guides/collections/#configuring-a-collection)
- [Deleting a Collection](/guides/collections/#deleting-a-collection)
- [Adjusting a Collection Layout](/guides/collections/#adjusting-a-collection-layout)
## Collection Presets & Bookmarks
Presets store the exact state of a [collection detail](/concepts/application/#collection-detail) page. They are used to set layout defaults for a user, or to define bookmarks that can be used to quickly recall specific datasets. Each preset stores the following information:
- **Collection** — The collection of the preset
- **Layout** — The Layout the preset applies to
- **Layout Query** — Order direction, order field, pagination, etc
- **Layout Options** — The configuration of all layout options
- **Search** — Any fulltext search query applied
- **Filters** — Any advanced fitlers applied
- **User** — Optional; scopes to a specific user
- **Role** — Optional; scopes to a specific role
- **Bookmark Name** — Optional; determines if the preset is a bookmark
#### Relevant Guides
- [Creating a Preset](/guides/presets/#creating-a-preset)
- [Deleting a Preset](/guides/presets/#deleting-a-preset)