Static Knotted Ties and the Absence of NULL

classic Classic list List threaded Threaded
2 messages Options
db
Reply | Threaded
Open this post in threaded view
|

Static Knotted Ties and the Absence of NULL

db
In Tutorial 16: The Absence of NULL, the example you use is an knotted attribute. Does it work the same for a static knotted tie? In my case the knot is part of the pk for the tie in question.
Reply | Threaded
Open this post in threaded view
|

Re: Static Knotted Ties and the Absence of NULL

roenbaeck
Administrator
For a tie, since the reference goes the other way (the primary key of the knot is a foreign key in the tie), it cannot be null. Or in other words, you cannot have some rows in the tie that reference the knot and some that do not. However, the simple solution is to introduce a value representing the "Unknown" in the knot instead. Then the rows for which you do not currently know the value can reference that explicitly in the knot.

Of course, making the tie historized will allow you to change this fact over time, should the value become known.