System, method and computer program product for defining custom junction objects in an on-demand database service
Assigneesalesforce.com, inc.
InventorsSimon Wong, Ryan Choi, Craig Weissman, Michael P. Polcari, David M. Brady
Life of this patent
Estimating the term…
Abstract
In accordance with embodiments, there are provided mechanisms and methods for defining custom junction objects in an on-demand database service. These mechanisms and methods for defining custom junction objects in an on-demand database service can enable embodiments to provide for enhanced security and more efficient querying, etc. The ability of embodiments to provide such features may lead to these and other benefits in an on-line environment.
Claims20
A method of implementing a many-to-many relationship among objects defined for business entities or business activities using database tables in a database service, the method comprising:
- defining a custom junction object comprising a many-to-many relationship of any tuple, wherein the custom junction object includes at least (i) a first direct parent-child relationship implementing the many-to-many relationship that includes a first parent object and a plurality of child objects, and (ii) a second parent-child relationship that includes a second parent object and the plurality of child objects;
- storing in the database service, custom junction objects including information about related tuples using the defined custom junction object;
- obtaining, by running a query for a first account, a first plurality of temporally ordered entities associated with the first account of the database service, wherein the first plurality of temporally ordered entities comprises a final entity associated with a final entity date;
- inserting the first plurality of temporally ordered entities into a sorted list;
- obtaining, by running the query for a second account, a second plurality of temporally ordered entities associated with the second account, wherein the second plurality of temporally ordered entities comprises a first entity associated with a first entity date and a second entity associated with a second entity date;
- inserting the first entity into the sorted list in response to the first entity date not being beyond the final entity date;
- excluding the second entity from the sorted list in response to the second entity date being beyond the final entity date;
- and
- using the defined custom junction object to provide a result to at least one query based on the sorted list, wherein visibility of child objects in the result is determined by visibility to a source of the first parent object and visibility to a source of the second parent object.
A non-transitory machine-readable medium impressed with computer program instructions to implement a many-to-many relationship among objects defined for business entities or business activities using database tables in a database service, which instructions, when executed, cause one or more processors to carry out:
- defining a custom junction object comprising a many-to-many relationship of any tuple, wherein the custom junction object includes at least (i) a first direct parent-child relationship implementing the many-to-many relationship that includes a first parent object and a plurality of child objects, and (ii) a second parent-child relationship that includes a second parent object and the plurality of child objects;
- storing in the database service, custom junction objects including information about related tuples using the defined custom junction object;
- obtaining, by running a query for a first account, a first plurality of temporally ordered entities associated with the first account of the database service, wherein the first plurality of temporally ordered entities comprises a final entity associated with a final entity date;
- inserting the first plurality of temporally ordered entities into a sorted list obtaining, by running the query for a second account, a second plurality of temporally ordered entities associated with the second account, wherein the second plurality of temporally ordered entities comprises a first entity associated with a first entity date and a second entity associated with a second entity date;
- inserting the first entity into the sorted list in response to the first entity date not being beyond the final entity date;
- excluding the second entity from the sorted list in response to the second entity date being beyond the final entity date;
- and
- using the defined custom junction object to provide a result based on the sorted list, wherein visibility of child objects in the result is determined by visibility to a source of the first parent object and visibility to a source of the second parent object.
An apparatus, comprising:
- a processor;
- and
- a non-transitory computer readable memory with one or more stored sequences of computer program instructions to implement a many-to-many relationship among objects defined for business entities or business activities using database tables in a database service, which instructions, when executed by the processor, cause the processor to carry out:
- defining a custom junction object comprising a many-to-many relationship of any tuple, wherein the custom junction object includes at least (i) a first direct parent-child relationship implementing the many-to-many relationship that includes a first parent object and a plurality of child objects, and (ii) a second parent-child relationship that includes a second parent object and the plurality of child objects;
- storing in the database service, custom junction objects including information about related tuples using the defined custom junction object;
- obtaining, by running a query for a first account, a first plurality of temporally ordered entities associated with the first account of the database service, wherein the first plurality of temporally ordered entities comprises a final entity associated with a final entity date;
- inserting the first plurality of temporally ordered entities into a sorted list
- obtaining, by running the query for a second account, a second plurality of temporally ordered entities associated with the second account, wherein the second plurality of temporally ordered entities comprises a first entity associated with a first entity date and a second entity associated with a second entity date;
- inserting the first entity into the sorted list in response to the first entity date not being beyond the final entity date;
- excluding the second entity from the sorted list in response to the second entity date being beyond the final entity date;
- and
- using the defined custom junction object to provide a result based on the sorted list, wherein visibility of child objects in the result is determined by visibility to a source of the first parent object and visibility to a source of the second parent object.
A method for transmitting code for implementing a many-to-many relationship among objects defined for business entities or business activities using database tables in a multi-tenant database system on a transmission medium, the method comprising:
- transmitting code for defining a custom junction object comprising a many-to-many relationship of any tuple, wherein the custom junction object includes at least (i) a first direct parent-child relationship implementing the many-to-many relationship that includes a first parent object and a plurality of child objects, and (ii) a second parent-child relationship that includes a second parent object and the plurality of child objects;
- transmitting code for storing in the multi-tenant database system, custom junction objects including information about related tuples using the defined custom junction object;
- transmitting code for obtaining, by running a query for a first account, a first plurality of temporally ordered entities associated with the first account of the multi-tenant database system, wherein the first plurality of temporally ordered entities comprises a final entity associated with a final entity date;
- transmitting code for inserting the first plurality of ordered entities into a sorted list
- transmitting code for obtaining, by running the query for a second account, a second plurality of temporally ordered entities associated with the second account, wherein the second plurality of temporally ordered entities comprises a first entity associated with a first entity date and a second entity associated with a second entity date;
- transmitting code for inserting the first entity into the sorted list in response to the first entity date not being beyond the final entity date;
- transmitting code for excluding the second entity from the sorted list in response to the second entity date being beyond the final entity date;
- and
- transmitting code for providing a result based on the sorted list and using the defined custom junction object, wherein visibility of child objects in the result is determined by visibility to a source of the first parent object and visibility to a source of the second parent object.
Dependencies are inferred from the claim text.