Question : Nested Set, Databases, and Moving Nodes

Here is the table structure I'm working with:

mysql> explain nested_record;
+--------------------+-----------------------+------+-----+---------+-------+
| Field              | Type                  | Null | Key | Default | Extra |
+--------------------+-----------------------+------+-----+---------+-------+
| commission_period  | date                  | NO   | PRI | NULL    |       |
| customer_id        | int(10) unsigned      | NO   | PRI | NULL    |       |
| parent_customer_id | int(10) unsigned      | NO   | MUL | NULL    |       |
| left_id            | int(11)               | NO   |     | NULL    |       |
| right_id           | int(10) unsigned      | NO   |     | NULL    |       |
| depth              | mediumint(8) unsigned | NO   |     | NULL    |       |
| rank_id            | tinyint(3) unsigned   | YES  |     | NULL    |       |
| highest_rank_id    | tinyint(3) unsigned   | YES  |     | NULL    |       |
+--------------------+-----------------------+------+-----+---------+-------+

Currently I've got queries developed to insert new nodes and move a sub group to a new parent. Those work beautifully.

What I'm looking to do now is change it so that I can move a single node to a new parent, which would then assign any sub elements to the original parent of the node being moved. For some reason, this one is escaping me. The solution seems like it would be rather simple but perhaps the more complex things are where I have fun.

Queries would be great, specifically in Oracle or MySQL.

As of now my thought process is:

Step 1. Assign all elements under the moving node to the parent_customer_id of the moving node. (Maintaining adjacency list compatibility).
Step 2. Update moving node's parent_customer_id and depth to reflect its new destination position (parent depth + 1).
Step 3. Create space for the node at the destination position.
Step 4. Close gap for moving node's previous position.

So then the question: How do I move a single node (node A) to belonging to another node (node B) but have the original sub items within node A move up to node A's parent before the move?

Additionally, I'm quite familiar with Celko's posts, etc. And quite a bit of research has been performed before posting; I'm not looking for references to sites as I have likely already read them. What gets me is I've already put processes in place which are far more complex but this one just escapes me.

Answer : Nested Set, Databases, and Moving Nodes

hi!
dell's port g1 should be configured as following:

Port : g1
Port Mode: General
Gvrp Status: disabled
Ingress Filtering: true
Acceptable Frame Type: admitAll
Ingress UnTagged VLAN ( NATIVE ): 1

Port is member in:

Vlan               Name               Egress rule Port Membership Type
---- -------------------------------- ----------- --------------------
 1                  1                  Untagged          System
 20               VMWARE               Tagged           Static
 40            buffalo only             Tagged           Static


then you should have router which will route traffic between vlans.
what i want to know is what kind of IP addresses you have for each of vlans and which device is doing routing between them?
Random Solutions  
 
programming4us programming4us