IP Library › Granted Patent US 12,493,708
Granted Patent B2
US 12,493,708 · App. 18/594,828 · Granted Dec 9, 2025

Visibility statistic computation and application in the context of a hybrid sharing model within a database system

Inventors: Arjun Kumar Sirohi (Meerut, IN); Mayank Agarwal (Siliguri, IN)
Assignee: Salesforce, Inc.
G06F21/6218G06F16/24553
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 12,493,708
App. No.
18/594,828
Granted
Dec 9, 2025
Kind
B2
Abstract

An entity-level visibility statistic may be determined for a database entity in a database system based on one or more visibility rules providing access to instances of the database entity to one or more user accounts. A user-level visibility statistic quantifying a set of instances of the database entity accessible to a user account via the one or more visibility rules may be determined based at least in part on the entity-level visibility statistic. A request may be received by the user account to execute an input database query retrieving one or more of the instances of the database entity. A database object retrieval query including two or more data security subqueries evaluating accessibility of the one or more instances of the database entity and positioned based at least in part on the user-level visibility statistic may be determined based on the input database query.

Claims (43)

1 . A method comprising:

determining an entity-level visibility statistic for a database entity in a database system based on one or more visibility rules providing access to instances of the database entity to one or more user accounts;

determining a user-level visibility statistic based at least in part on the entity-level visibility statistic, the user-level visibility statistic quantifying a set of instances of the database entity accessible to a user account via the one or more visibility rules;

receiving a request by the user account to execute an input database query retrieving one or more of the instances of the database entity;

determining a database object retrieval query based on the input database query and at least in part on first and second user-level visibility statistics, the database object retrieval query including two or more data security subqueries evaluating accessibility of the one or more instances of the database entity, the two or more database security subqueries including a first database security subquery associated with the first user-level visibility statistic and a second database security subquery associated with the second user-level visibility statistic, the two or more database security subqueries being located within the database object retrieval query based at least in part on the user-level visibility statistic; and

providing access to the one or more instances of the database entity at least in part by executing the database object retrieval query against the database system.

2 . The method recited in claim 1 , the method further comprising:

determining a plurality of entity-level visibility statistics for the database entity including the entity-level visibility statistic; and

determining a plurality of user-level visibility statistics including the user-level visibility statistic, the plurality of user-level visibility statistics each quantifying a respective set of instances of the database entity accessible to the user account, wherein the database object retrieval query is determined based at least in part on the plurality of user-level visibility statistics.

3 . The method recited in claim 1 , wherein determining the database object retrieval query comprises:

comparing the first user-level visibility statistic and the second user-level database statistic; and

selecting the first database security subquery to precede the second database security subquery in the database object retrieval query upon determining based on the comparison that the first database security subquery is predicted to provide access to a relatively larger number of database records than the second database security subquery.

4 . The method recited in claim 1 , wherein the first database security subquery is associated with a materialized share rule defining one or more share records stored in a record share table in the database system, the one or more share records directly linking the user account with a first set of instances of the database entity accessible to the user account.

5 . The method recited in claim 1 , wherein the second database security subquery is associated with an unmaterialized share rule defining one or more criteria providing access to a second set of instances of the database entity by the user account.

6 . The method recited in claim 5 , wherein the user account includes a user account attribute value for an attribute, and wherein the unmaterialized share rule provides access to the second set of instances of the database entity by the user account when the second set of instances of the database entity each includes a respective database entity attribute value that matches the user account attribute value.

7 . The method recited in claim 1 , wherein the entity-level visibility statistic is predetermined, and wherein retrieving the entity-level visibility statistic comprises retrieving the entity-level visibility statistic from a database table in the database system.

8 . One or more non-transitory computer readable media having instructions stored thereon for performing a method, the method comprising:

determining an entity-level visibility statistic for a database entity in a database system based on one or more visibility rules providing access to instances of the database entity to one or more user accounts;

determining a user-level visibility statistic based at least in part on the entity-level visibility statistic, the user-level visibility statistic quantifying a set of instances of the database entity accessible to a user account via the one or more visibility rules;

receiving a request by the user account to execute an input database query retrieving one or more of the instances of the database entity;

determining a database object retrieval query based on the input database query and at least in part on first and second user-level visibility statistics, the database object retrieval query including two or more data security subqueries evaluating accessibility of the one or more instances of the database entity, the two or more database security subqueries including a first database security subquery associated with the first user-level visibility statistic and a second database security subquery associated with the second user-level visibility statistic, the two or more database security subqueries being located within the database object retrieval query based at least in part on the user-level visibility statistic; and

providing access to the one or more instances of the database entity at least in part by executing the database object retrieval query against the database system.

9 . The one or more non-transitory computer readable media recited in claim 8 , the method further comprising:

determining a plurality of entity-level visibility statistics for the database entity including the entity-level visibility statistic; and

determining a plurality of user-level visibility statistics including the user-level visibility statistic, the plurality of user-level visibility statistics each quantifying a respective set of instances of the database entity accessible to the user account, wherein the database object retrieval query is determined based at least in part on the plurality of user-level visibility statistics.

10 . The one or more non-transitory computer readable media recited in claim 8 , wherein determining the database object retrieval query comprises:

comparing the first user-level visibility statistic and the second user-level database statistic; and

selecting the first database security subquery to precede the second database security subquery in the database object retrieval query upon determining based on the comparison that the first database security subquery is predicted to provide access to a relatively larger number of database records than the second database security subquery.

11 . The one or more non-transitory computer readable media recited in claim 8 , wherein the first database security subquery is associated with a materialized share rule defining one or more share records stored in a record share table in the database system, the one or more share records directly linking the user account with a first set of instances of the database entity accessible to the user account.

12 . The one or more non-transitory computer readable media recited in claim 8 , wherein the second database security subquery is associated with an unmaterialized share rule defining one or more criteria providing access to a second set of instances of the database entity by the user account.

13 . The one or more non-transitory computer readable media recited in claim 12 , wherein the user account includes a user account attribute value for an attribute, and wherein the unmaterialized share rule provides access to the second set of instances of the database entity by the user account when the second set of instances of the database entity each includes a respective database entity attribute value that matches the user account attribute value.

14 . The one or more non-transitory computer readable media recited in claim 8 , wherein the entity-level visibility statistic is predetermined, and wherein retrieving the entity-level visibility statistic comprises retrieving the entity-level visibility statistic from a database table in the database system.

15 . A database system implemented in a computing system that includes a processor, memory, and a storage device, the database system configured to perform a method comprising:

determining an entity-level visibility statistic for a database entity in a database system based on one or more visibility rules providing access to instances of the database entity to one or more user accounts;

determining a user-level visibility statistic based at least in part on the entity-level visibility statistic, the user-level visibility statistic quantifying a set of instances of the database entity accessible to a user account via the one or more visibility rules;

receiving a request by the user account to execute an input database query retrieving one or more of the instances of the database entity;

determining a database object retrieval query based on the input database query and at least in part on first and second user-level visibility statistics, the database object retrieval query including two or more data security subqueries evaluating accessibility of the one or more instances of the database entity, the two or more database security subqueries including a first database security subquery associated with the first user-level visibility statistic and a second database security subquery associated with the second user-level visibility statistic, the two or more database security subqueries being located within the database object retrieval query based at least in part on the user-level visibility statistic; and

providing access to the one or more instances of the database entity at least in part by executing the database object retrieval query against the database system.

16 . The database system recited in claim 15 , wherein determining the database object retrieval query comprises:

comparing the first user-level visibility statistic and the second user-level database statistic; and

selecting the first database security subquery to precede the second database security subquery in the database object retrieval query upon determining based on the comparison that the first database security subquery is predicted to provide access to a relatively larger number of database records than the second database security subquery.

17 . The database system recited in claim 16 , wherein the first database security subquery is associated with a materialized share rule defining one or more share records stored in a record share table in the database system, the one or more share records directly linking the user account with a first set of instances of the database entity accessible to the user account, and wherein the second database security subquery is associated with an unmaterialized share rule defining one or more criteria providing access to a second set of instances of the database entity by the user account, and wherein the user account includes a user account attribute value for an attribute, and wherein the unmaterialized share rule provides access to the second set of instances of the database entity by the user account when the second set of instances of the database entity each includes a respective database entity attribute value that matches the user account attribute value.

18 . The database system recited in claim 15 , wherein the entity-level visibility statistic is predetermined, and wherein retrieving the entity-level visibility statistic comprises retrieving the entity-level visibility statistic from a database table in the database system.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 7, 2024
From: SIROHI, ARJUN KUMAR; AGARWAL, MAYANK
To: SALESFORCE, INC.
Reel/Frame 066683/0673 →
Continuity (1)
Related Publication 20250272421A1 · Aug 28, 2025
References Cited (26)
US 7779039B2 · Weissman · 2010 [cited by examiner]
US 10936587B2 · Sirohi et al. · 2021 [cited by applicant]
US 11216460B2 · Hay · 2022 [cited by examiner]
US 11249995B2 · Sirohi et al. · 2022 [cited by applicant]
US 11270009B2 · Friedman · 2022 [cited by examiner]
US 11392960B2 · Copeland · 2022 [cited by examiner]
US 11416484B2 · Sirohi · 2022 [cited by examiner]
US 11443264B2 · Copeland · 2022 [cited by examiner]
US 11481785B2 · Copeland · 2022 [cited by examiner]
US 11573960B2 · Li · 2023 [cited by examiner]
US 12135712B2 · Ramesh · 2024 [cited by examiner]
US 20070073657A1 · Santosuosso · 2007 [cited by examiner]
US 20140149392A1 · Wang · 2014 [cited by examiner]
US 20180143858A1 · Sanjabi · 2018 [cited by examiner]
US 20180189348A1 · Sirohi · 2018 [cited by examiner]
US 20180189349A1 · Sirohi · 2018 [cited by examiner]
US 20190342088A1 · Eidson · 2019 [cited by examiner]
US 20200097574A1 · Hay · 2020 [cited by examiner]
US 20200097680A1 · Hay · 2020 [cited by examiner]
US 20200364669A1 · Hay · 2020 [cited by examiner]
US 20200401708A1 · Friedman · 2020 [cited by examiner]
US 20210109929A1 · Sirohi · 2021 [cited by examiner]
US 20220247678A1 · Atwal · 2022 [cited by examiner]
US 20250071191A1 · Li · 2025 [cited by examiner]
“Extensible data security policies,” Finance & Operations, Dynamics 365, Aug. 9, 2023, Retrieved from the Internet: https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/sysadmin/extensible-data-security-… [cited by applicant]
Balbudhe, Kalyani, “Fusion Applications Role-Based Access Control (RBAC),” Oracle Fusion Training & Fusion ELearning, May 1, 2015. [cited by applicant]