I am trying to implement a tree-like structure using the materialized path model described here: http://www.dbazine.com/oracle/or-articles/tropashko4 .
Is it possible to force referential integrity in the [path] field? I don’t see how SQL can do this, do I need to do it manually in DAL?
Yes, you need to ensure data integrity in the DAL when you use Materialized Path or Nested Sets for hierarchical data.
Adjacency List , , " "( " ").
" ", , ( " - ".).
" " - , " " , , , " ", , - .
SQL , . (: , SQL , .) , RM , SQL , , SQL , .
(@Bill Karwin: +1 . , "" . , SQL .)
, RM =
(, unicode, 256 ) "x.y.z". - . (, PostgreSQL)
check(parent_id = substring(id from 1 for char_length(id)-1)),
create table. "x.y.z", , , .
, " []". , :