Skip to content

Describe foreign keys referring to the same space #3043

Closed
@TarantoolBot

Description

@TarantoolBot

Since: 2.11.0-rc1
Root documents:
https://www.tarantool.io/en/doc/latest/book/box/data_model/#constraints
https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_schema/func_create/ (?)
https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_space/

Details

The Constraints and Foreign keys parts in the Data model section combine a high-level explanation and a how-to guide. However, the specific parameters are not mentioned there. It's also not the best place to describe individual parameters and how to use them.
So we need to update the reference, which has no mention of constraint parameters yet:

Mention in the Data model > Constraints/Foreign keys sections that referring to self is also possible.

See also this detailed internal plan for restructuring Tarantool docs.


It is possible to create a foreign key that refers to the same space (a
child space equals to the parent space).
To do that, omit space in the foreign_key parameter, or set it to
the id or to the name of the current space.
Requested by @Gumix in tarantool/tarantool@f21f8e9.

Metadata

Metadata

Assignees

Labels

2.112.11 release and the associated technical debtadd details[nature] More details needed, some info missing. Documentation is incomplete.reference[location] Tarantool manual, Reference partserver[area] Task relates to Tarantool's server (core) functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions