IP Library Granted Patent US 10,521,406
Granted Patent B2
US 10,521,406 · App. 15/282,486 · Granted Dec 31, 2019

Merging along object hierarchies

Inventors: Parth Vaishnav (Cupertino, CA); Chenghung Ker (Burlingame, CA); Daniel McGarry (San Francisco, CA); Danil Dvinov (Oakland, CA)
Assignee: salesforce.com, inc.
G06F16/215G06F16/217G06F16/24565G06F16/282G06F16/289
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,521,406
App. No.
15/282,486
Granted
Dec 31, 2019
Kind
B2
Abstract

Some embodiments of the present invention include a method for merging nodes in hierarchies and include receiving, by a database system, a request to merge a first node in a first hierarchy of a plurality of nodes into a second node, the first node in the first hierarchy having child nodes; determining, by the database system, whether the merge request violates each of a plurality of constraints, the plurality of constraints comprising circular dependency of nodes, deleted node and ordering of nodes; and re-parenting, by the database system, in response to a determination that the merge request does not violate each of the plurality of constraints, the child nodes of the first node in the first hierarchy of nodes to the second node in response to the merging of the first node into the second node.

Claims (36)

1. A computer-implemented method to merge nodes in hierarchies, the method comprising:

receiving, by a database system, a request to merge a first node in a first hierarchy of a plurality of nodes into a second node, the first node in the first hierarchy having child nodes;

determining, by the database system, whether the merge request violates each of a plurality of constraints, the plurality of constraints comprising circular dependency of nodes, deleted node and ordering of nodes;

merging, by the database system, the first node into the second node in response to a determination that the merge request does not violate each of the plurality of constraints; and

re-parenting, by the database system, the child nodes of the first node in the first hierarchy of nodes to the second node in response to the merging of the first node into the second node, the child nodes of the first node becoming the children of the second node.

2. The method of claim 1 , wherein the merge request violates the ordering of nodes constraint when the second node is a descendant of the first node.

3. The method of claim 2 , wherein the merge request violates the deleted node constraint when the first node or the second node is a deleted node.

4. The method of claim 3 , wherein, based on the merge request including a new parent identification (ID) for the second node, the merge request violates the ordering of nodes constraint when a node associated with the new parent ID is a descendant of the second node.

5. The method of claim 4 , wherein the merge request violates the deleted node constraint when the node associated with the new parent ID is a deleted node.

6. The method of claim 5 , wherein the merge request violates the circular dependency constraint when the first node or the second node is associated with a hierarchy having circular dependency or when said merging the first node to the second node generates a hierarchy having circular dependency.

7. The method of claim 6 , wherein said re-parenting the child nodes of the first node to the second node includes re-parenting a soft delete child node of the first node to the second node.

8. The method of claim 7 , further comprising deleting, by the database system, the first node based on the merge request being allowed to proceed.

9. An apparatus comprising:

one or more processors; and

a non-transitory computer readable medium storing a plurality of instructions, which when executed, cause the one or more processors to:

receive a request to merge a first node in a first hierarchy of a plurality of nodes into a second node, the first node in the first hierarchy having child nodes;

determine whether the merge request violates each of a plurality of constraints, the plurality of constraints comprising circular dependency of nodes, deleted node and ordering of nodes; and

re-parent, in response to a determination that the merge request does not violate each of the plurality of constraints, the child nodes of the first node in the first hierarchy of nodes to the second node in response to the merging of the first node into the second node.

10. The apparatus of claim 9 , wherein the merge request violates the ordering of nodes constraint when the second node is a descendant of the first node.

11. The apparatus of claim 10 , wherein the merge request violates the deleted node constraint when the first node or the second node is a deleted node.

12. The apparatus of claim 11 , wherein the merge request violates the ordering of nodes constraint when the merge request includes a new parent identification (ID) for the second node, and wherein a node associated with the new parent ID is a descendant of the second node.

13. The apparatus of claim 12 , wherein the merge request violates the deleted node constraint when the node associated with the new parent ID is a deleted node.

14. The apparatus of claim 13 , wherein the merge request violates the circular dependency constraint when the first node or the second node is associated with a hierarchy having circular dependency or when said merging the first node to the second node generates a hierarchy having circular dependency.

15. The apparatus of claim 14 , wherein said instructions to re-parent the child nodes of the first node to the second node include instructions to re-parent a soft delete child node of the first node to the second node.

16. The apparatus of claim 15 , further comprising instructions, which when executed, cause the one or more processors to delete the first node based on the merge request being allowed to proceed.

17. A computer program product comprising computer-readable program code to be executed by one or more processors when retrieved from a non-transitory computer-readable medium, the program code including instructions to:

receive a request to merge a first node in a first hierarchy of a plurality of nodes into a second node, the first node in the first hierarchy having child nodes;

determine whether the merge request violates each of a plurality of constraints, the plurality of constraints comprising circular dependency of nodes, deleted node and ordering of nodes; and

re-parent, in response to a determination that the merge request does not violate each of the plurality of constraints, the child nodes of the first node in the first hierarchy of nodes to the second node in response to the merging of the first node into the second node.

18. The computer program product of claim 17 , wherein the merge request violates the ordering of nodes constraint when the second node is a descendant of the first node.

19. The computer program product of claim 18 , wherein the merge request violates the deleted node constraint when the first node or the second node is a deleted node.

20. The computer program product of claim 19 , wherein the merge request violates the circular dependency constraint when the merge request includes a new parent identification (ID) for the second node, and wherein a node associated with the new parent ID is a descendant of the second node.

21. The computer program product of claim 20 , wherein the merge request violates the deleted node constraint when the node associated with the new parent ID is a deleted node.

22. The computer program product of claim 21 , wherein the merge request violates the circular dependency constraint when the first node or the second node is associated with a hierarchy having circular dependency or when said merging the first node to the second node generates a hierarchy having circular dependency.

23. The computer program product of claim 22 , wherein the program code to re-parent the child nodes of the first node to the second node includes program code to re-parent a soft delete child node of the first node to the second node.

24. The computer program product of claim 23 , the program code including further instructions to delete the first node based on the merge request being allowed to proceed.

Assignments (2)
CHANGE OF NAME Recorded Oct 3, 2023
From: SALESFORCE.COM, INC.
To: SALESFORCE, INC.
Reel/Frame 065114/0983 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 30, 2016
From: VAISHNAV, PARTH; KER, CHENGHUNG; MCGARRY, DANIEL; DVINOV, DANIL
To: SALESFORCE.COM, INC.
Reel/Frame 039913/0244 →
Continuity (1)
Related Publication 20180096003A1 · Apr 5, 2018