You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is replacing #6766 after further discussion and refinement.
We, and our users, often face the issue of having to manually clean up attributes if no entity or relation owns them anymore. Currently, this is a manual operation and causes difficulty and headaches (and is easy to get wrong given concurrent transactions). We would rather take this operation into TypeDB itself.
By default, we expect most attributes to be dependent (only should exist if owned by an owner).
Proposed Solution
We will make the default behaviour of attributes to still be global, but also dependent (this will not require a keyword).
The default behaviour will be that any attribute that is not owned will be cleaned up by the system. TypeDB will handle the automatic cleanup, even given concurrent operations on the same attribute.
However, some use cases want to be able to load attributes without owners (such as a list of valid names of countries, etc.). To facilitate this, we will introduce an @independent annotation on attribute definitions:
define
country-name sub attribute @independent,
value string;
Alternatives considered
We also considered the annotation @retain, partially because it is shorter, but it only gives the intuition of its behaviour when owners are deleted, but implies nothing about what happens when it is inserted. independent is the opposite of dependent, which is the proper term for what we want the default behaviour to be.
The text was updated successfully, but these errors were encountered:
Problem to Solve
This issue is replacing #6766 after further discussion and refinement.
We, and our users, often face the issue of having to manually clean up attributes if no entity or relation owns them anymore. Currently, this is a manual operation and causes difficulty and headaches (and is easy to get wrong given concurrent transactions). We would rather take this operation into TypeDB itself.
By default, we expect most attributes to be dependent (only should exist if owned by an owner).
Proposed Solution
We will make the default behaviour of attributes to still be global, but also
dependent
(this will not require a keyword).The default behaviour will be that any attribute that is not owned will be cleaned up by the system. TypeDB will handle the automatic cleanup, even given concurrent operations on the same attribute.
However, some use cases want to be able to load attributes without owners (such as a list of valid names of countries, etc.). To facilitate this, we will introduce an
@independent
annotation on attribute definitions:Alternatives considered
We also considered the annotation
@retain
, partially because it is shorter, but it only gives the intuition of its behaviour when owners are deleted, but implies nothing about what happens when it is inserted.independent
is the opposite ofdependent
, which is the proper term for what we want the default behaviour to be.The text was updated successfully, but these errors were encountered: