comparison demo/tree.ur @ 715:1db127b245ed

Use FOREIGN KEY in Tree demo
author Adam Chlipala <adamc@hcoop.net>
date Thu, 09 Apr 2009 15:51:50 -0400
parents 1a317a707d71
children 5819fb63c93a
comparison
equal deleted inserted replaced
714:0f42461273cf 715:1db127b245ed
1 sequence s 1 sequence s
2 table t : { Id : int, Parent : option int, Nam : string } 2 table t : { Id : int, Parent : option int, Nam : string }
3 PRIMARY KEY Id 3 PRIMARY KEY Id,
4 CONSTRAINT F FOREIGN KEY Parent REFERENCES t (Id) ON DELETE CASCADE
4 5
5 open TreeFun.Make(struct 6 open TreeFun.Make(struct
6 val tab = t 7 val tab = t
7 end) 8 end)
8 9