Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to setup the tables
Message
From
29/08/2002 11:46:10
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
29/08/2002 11:10:39
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00694820
Message ID:
00694982
Views:
12
>I read the article. My question still is what type of table structure would you use? How would you setup the supporting table of rules for each new node of the tree as to allow access to any node in the tree. Maybe as I talk this out I'll discover more.
>TIA
>John

The way I work, an article "A" can contain an article "B", "B" can contain "C", etc. (several levels deep).

Table "Article" contains all articles, starting with materials bought from outside, passing through several levels of intermediate articles, up to the finished product (which is the one we sell).
* Table Article
ArticleId   Description
1           Nail
2           Cardboard
3           Sticker
4           Box
5           Sole
6           Shoe
Table "ArticleComposition" indicates what article contains what other article.
* Table ArticleComposition
Parent  Child
4       1
4       2
4       3
6       4
6       5
"Parent" contains "Child", IOW, to produce a box, you need nails, cardboard and stickers. To produce the shoe, you need the box and a sole.

Is this the sort of structure you need?

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform