* 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>
2.1 KiB
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 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. 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) and Many-to-Many (M2M), represent data that is stored in other tables. Then there are Presentation Fields that don't save data at all, such as dividers and action buttons.
:::