Describe foreign keys referring to the same space #3043
Labels
2.11
2.11 release and the associated technical debt
add details
[nature] More details needed, some info missing. Documentation is incomplete.
reference
[location] Tarantool manual, Reference part
server
[area] Task relates to Tarantool's server (core) functionality
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 theforeign_key
parameter, or set it tothe id or to the name of the current space.
Requested by @Gumix in tarantool/tarantool@f21f8e9.
The text was updated successfully, but these errors were encountered: