Hierarchical Data - Nested Dial Model: MySql

I am just learning how to implement a nested set model, but still confuse it with a certain aspect related to elements that can be part of several categories. Given the example below, which was ripped out HERE and reflects many other examples that I came across ...

Hierarchical Data: Numbered Tree

Table

How to avoid duplication in the database when adding apples, since they are colorful (i.e. red, yellow, green)?

+5
source share
4 answers

, ( ) , , . , ... Swing JTree HTML;).

- . . MySQL, MySQL (, , Oracle).

!

+5

- 1: N ( ), M: N ( ) ( , ).

.

Wikipedia

, M: N !

+3

, , , (, , ) "" "" . . , .

, . - . , , , , , , ? , . , .

. , "" "". , , , , "" . , "" , . () , " " , .

, , .., , , , , .

+3

, .

, - , . .

, Mysql, Open Query Graph (http://openquery.com/graph/doc), mysql, , , parentId childId. , , , OQGRAPH, . . .

0

All Articles