mirror of
https://github.com/directus/directus.git
synced 2026-02-02 16:14:56 -05:00
* 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>
34 lines
2.1 KiB
Markdown
34 lines
2.1 KiB
Markdown
# Fields
|
|
|
|
> Fields are a specific type of value within a Collection, storing the data of your item's content. Each field represents a **column** in your database.
|
|
|
|
For example, an `articles` collection might have `title`, `body`, `author`, and `date_published` fields. Directus automatically uses a built-in title formatter to display your database column names prettified, and you can use [schema translations](/concepts/translations/#schema-translations) to completely rename them if needed.
|
|
|
|
Fields also mirror other characteristics from their associated column, including its `type`, `default`, `length`, `allow_null`, etc.
|
|
|
|
::: tip Relational Fields
|
|
|
|
Fields that reference other items (in the same collection or different) are called [relational fields](/concepts/relationships/). Linking or
|
|
connecting data relationally is an immensely powerful feature of relational databases and SQL queries.
|
|
|
|
:::
|
|
|
|
::: tip Aliases
|
|
|
|
Not all fields in Directus map directly to an actual database column within their table — these are called "alias" fields. For example, certain relational fields, like [One-to-Many (O2M)](/concepts/relationships/#one-to-many-o2m) and [Many-to-Many (M2M)](/concepts/relationships/#many-to-many-m2m), represent data that is stored in _other_ tables. Then there are [Presentation Fields](/guides/field-types/presentation-field/) that don't save data at all, such as dividers and action buttons.
|
|
|
|
:::
|
|
|
|
#### Relevant Guides
|
|
|
|
- [Creating a Standard Field](/guides/field-types/standard-field)
|
|
- [Creating a Presentation Field](/guides/field-types/presentation-field)
|
|
- [Creating a Many-to-One Field](/guides/field-types/many-to-one-field)
|
|
- [Creating a One-to-Many Field](/guides/field-types/one-to-many-field)
|
|
- [Creating a Many-to-Many Field](/guides/field-types/many-to-many-field)
|
|
- [Creating a Many-to-Any Field](/guides/field-types/many-to-any-field)
|
|
- [Creating Translated Fields](/guides/field-types/translated-fields)
|
|
- [Duplicating Fields](/guides/fields/#duplicating-a-field)
|
|
- [Adjusting Field Layout](/guides/fields/#adjusting-field-layout)
|
|
- [Deleting Fields](/guides/fields/#deleting-a-field)
|