Posted by --CELKO-- on 05/02/07 02:24
>> Lists the contents of a table designed to represent a multi-branch tree. The result set takes the form: ItemID TreeLevel Label Tree traversal is done non-recursively (to avoid SQL Server's limit of 32 nested procedure calls) <<
Have you gotten a copy of TREES & HIERARCHIES IN SQL? There are
several ways to model trees without *any* procedural traversal code at
all.
You also have more NULL-able columns int his one table than the entire
payroll data base of a major automobile.
You used an IDENTITY as a key; is the real key (lot_nbr,
process_step) ?
Many of your data element names are just plain wrong. Think how silly
"category_id" is for an attribute; it is either "<some kind
of>_category" or "<some kind of>_id", but not both an identifier
(unique to one and only one instance of an entity) and a category
(value appears in many entities). Ditto monsters like
"current_process_step_id" as opposed to a mere "process_step" or
"process_id" instead. Get a copy of ISO-11179 rules for data element
names.
Learn what data and meta data are so you will not mix them in the
table.
[Back to original message]
|