In Node(NodeNo, ParentNo, Name)? I am assuming that you recognize the
root of the hierarchy as a tuple of the type (n,n,''), for some integer
n. Please clarify if that is not the case.
No. As a rule, I have no fudges. Ever.
There is just one root for the entire Node tree. The RM does not
permit, and we do not have circular references and therefore we do not
need "deferred constraint checking". (Note that the TTM Gulag teaches
you to place a sabotaging circular reference practically everywhere.
To justify their "need" for "deferred constraint checking".)
During the database build, which is a rather large script that is
sequenced, right after the
CREATE TABLE Node
command, before any of the
ALTER TABLE Node ADD CONSTRAINT ...
do:
INSERT Node VALUES ( 0, 0, CHAR(0) )
now proceed with the
ALTER TABLE Node ADD CONSTRAINT ...
one of which is:
ALTER TABLE Node
ADD CONSTRAINT Node_NE_Parent_ck CHECK (
NodeNo <> ParentNodeNo
)
On Friday, 10 January 2020 01:57:46 UTC+11, Derek Ignatius Asirvadem wrote:Actually, the problem, the difficulty you guys have in accepting the logical and painless way to perform ordinary database maintenance, is menatl. You are so addicted to tearing your hair out, to having a problem that cannot be solved, etc, all due to the "deferred constraint checking" mindset.
now proceed with the
ALTER TABLE Node ADD CONSTRAINT ...
one of which is:
ALTER TABLE Node
ADD CONSTRAINT Node_NE_Parent_ck CHECK (
NodeNo <> ParentNodeNo
)
Now, wait. Does Sybase really accept that? Regardless of the answer,
that *is* anti-logical:
- Declared constraint in table definition: NodeNo <> ParentNodeNo
- Current instance of the table:
Nodeno ParentNodeNo ...
0 0 ...
[...]
The system must reject the addition of a constraint that the current
instance violates, period.
Instead of telling me what the genuine SQL platforms SHOULD do, from
your perspective, based on experience with an anti-SQL piece of dog's
meat, why don't you find out (a) what SQL requires, and (b) why we
might want the operation that the SQL platforms do.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 65 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 00:52:33 |
| Calls: | 862 |
| Files: | 1,311 |
| D/L today: |
10 files (20,373K bytes) |
| Messages: | 264,186 |