Re: Recursive Queries?



And your solution to this? <<

One of the hierarchical designs given in TREES & HIERARCHIES IN SQL
(ISBN: 978-1-55860-920-4). I happen to like the nested sets model
because it ports and gives very easy hierarchical aggregations (BOM,
accounting reports, etc as opposed to path searches).

You might also want to look at http://www.dbazine.com/ofinterest/oi-articles/celko35/view?searchterm=Celko

The article gives a declarative way to enforce Transition Constraints,
which might help if your process steps have to come in some order
("bake the beard before you slice it", etc.)

.



Relevant Pages

  • Re: Recursive Queries?
    ... One of the hierarchical designs given in TREES & HIERARCHIES IN SQL ... because it ports and gives very easy hierarchical aggregations (BOM, ... accounting reports, etc as opposed to path searches). ... A sales line item is comparable with a production stock requirement ...
    (comp.databases.ms-sqlserver)
  • Re: Parts made up of parts made up of parts
    ... a BOM or hierarchy on their hands would namecheck it. ... Asking how to model hierarchies in a SQL product is a bit beyond the ... Joe Celko's Trees and Hierarchies in SQL for Smarties ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Hierarchical Top Level BOM Query
    ... Get a copy of TREES & HIERARCHIES IN SQL. ... I worked out a BOM using the ... nested sets model. ...
    (microsoft.public.sqlserver.programming)