Switch to: V10V9V8V7V6V5

Binary Links with Order

Let we have Object A which have collection of objects B and this collection have order.

This means that each object A[i] is linked with list of objects {B1 B2 … Bn }. It is possible to have ordered collections of 2 kinds:

  • Collection with order which do not allow indexed access to elements (analog of linked list). Such collection has the following operators on elements: first/last, next/prev, before/after.
  • Collection with order which also allow indexed access to elements (array). Such collection also adds operator Nth element.

Valentina extends SQL standard to support these operators as for Modification SQL Commands so for Select commands.

INSERT commands

INSERT INTO LINK link_name(TA,TB) VALUES (recidA) TO (recidB) <FIRST|LAST>
INSERT INTO LINK link_name(TA,TB) VALUES (recidA) TO (recidB) <BEFORE|AFTRER> (recidB_2)