# US 2021/0342322 A1 · Database implementation for different application versions

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0342322 A1
- Document ID: US20210342322A1
- Status: Published application
- Kind: A1
- Application number: 16/866,331
- Filed: 2020-05-04
- Published: 2021-11-04
- Earliest claimed: 2020-05-04
- Assignees: salesforce.com, inc.
- Applicants: salesforce.com, inc.
- Inventors: Serge Philippe Rielau; Randy Philip Spalten; Jeffrey Ira Cohen
- Web page: https://patentgrep.com/patent/US20210342322A1

## CPC

- G06F 16/219: {Managing data history or versioning (querying versioned data G06F16/2474; querying temporal data G06F16/2477)}
- G06F 16/24575: {using context}
- G06F 16/211: {Schema design and management}
- G06F 16/221: {Column-oriented storage; Management thereof}
- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F 16/24573: {using data annotations, e.g. user-defined metadata}
- G06F 16/2474: {Sequence data queries, e.g. querying versioned data}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques are disclosed for handling database queries from multiple different application versions using a single database. A computer system executing a database management system (DBMS) may receive a database query for a database, where the database query is received from a particular version of an application having a plurality of versions. The database query may specify the particular version. The computer system may then identify catalog tables, where the catalog tables include version information columns storing version access information. The computer system may determine that version access information for the database query indicates that one or more database objects corresponding to the database query are accessible to the particular version of the application. Based on the determining, the computer system may access one or more database objects that are responsive to the database query and are accessible to the particular version of the application, which may advantageously reduce or avoid duplication of data stored in the database.

## Claims

### Claim 1

A method, comprising:
receiving, by a computer system executing a database management system (DBMS), a database query for a database, wherein the database query is received from a particular version of an application having a plurality of versions, and wherein the database query specifies the particular version;
identifying, by the computer system, one or more catalog tables, wherein the one or more catalog tables include one or more version information columns storing version access information;
determining, by the computer system, that version access information for the database query indicates that one or more database objects corresponding to the database query are accessible to the particular version of the application; and
accessing, by the computer system based on the determining, one or more database objects that are responsive to the database query and are accessible to the particular version of the application.

### Claim 2 (depends on 1)

The method of claim 1, wherein the one or more version information columns include a version column specifying information indicative of a range of application versions for which one or more database objects stored in the database are accessible.

### Claim 3 (depends on 1)

The method of claim 1, wherein the version information columns specify version access information for the one or more database objects, and wherein the one or more database objects include one or more of the following types of objects: schema, table, column, index, trigger, procedure and statistics.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
prior to the receiving the database query for the database:
receiving, by the computer system from the particular version of the application, updates for the application, wherein the updates are associated with the particular version; and
altering, by the computer system based on the received updates, the one or more catalog tables, wherein the altering includes altering metadata stored in the catalog tables that specifies one or more database objects stored in the database that are accessible to the particular version.

### Claim 5 (depends on 4)

The method of claim 4, wherein the updates indicate one or more differences between databased objects that are accessible to the particular version and database objects that are accessible to an earlier version of the application.

### Claim 6 (depends on 1)

The method of claim 1, wherein one of the catalog tables is a schema catalog table that specifies, for at least one application, a schema that is applicable to that one application.

### Claim 7 (depends on 1)

The method of claim 1, wherein the version access information for the database query permits, for the particular version of the application, access to a first portion of data included in the one or more database objects, and wherein the method further comprises:
in response to receiving an additional database query from a different version of the application, accessing, by the computing system based on version access information for the different version of the application, a second, different portion of the data included in the one or more database objects.

### Claim 8 (depends on 1)

The method of claim 1, wherein the identified catalog tables include a first catalog table that defines version access information in a first format and a second catalog table that defines version access information in a second format.

### Claim 9 (depends on 8)

The method of claim 8, wherein the first format specifies version access information as a particular application version, and wherein the second format specifies version access information as a range of application versions.

### Claim 10

A non-transitory computer-readable medium having instructions stored thereon that are capable of causing a computing device executing a database management system (DBMS) to implement operations comprising:
receiving a database query for a database, wherein the database query is received from a particular version of an application having a plurality of versions, and wherein the database query specifies the particular version;
identifying one or more catalog tables, wherein the one or more catalog tables include one or more version information columns storing version access information;
determining that version access information for the database query indicates that one or more database objects corresponding to the database query are accessible to the particular version of the application; and
accessing, based on the determining, data that is responsive to the database query and are accessible to the particular version of the application.

### Claim 11 (depends on 10)

The non-transitory computer-readable medium of claim 10, wherein the one or more version information columns include a start version column and a stop version column that specify a range of application versions for which one or more database objects stored in the database are accessible.

### Claim 12 (depends on 10)

The non-transitory computer-readable medium of claim 10, wherein the one or more version information columns specify version access information for at least a schema object and a database table object of the database, wherein the schema object is a named collection of tables and the database table object is a particular type of table that stores data in the database for the application having the plurality of versions.

### Claim 13 (depends on 10)

The non-transitory computer-readable medium of claim 10, wherein the operations further comprise:
prior to the receiving the database query for the database:
receiving, from the particular version of the application, updates for the application, wherein the updates are associated with the particular version; and
altering, based on the received updates, the one or more catalog tables, wherein the altering includes altering metadata stored in the catalog tables that specifies one or more database objects stored in the database that are accessible to the particular version.

### Claim 14 (depends on 10)

The non-transitory computer-readable medium of claim 10, wherein one of the catalog tables is a schema catalog table that specifies, for at least one application, a schema that is applicable to that one application, and wherein the schema catalog table specifies schema names that correspond to different applications.

### Claim 15 (depends on 10)

The non-transitory computer-readable medium of claim 10, wherein the operations further comprise:
adding an index table to the database; and
based on adding the index table, adding a row to an index catalog table that includes metadata for one or more index tables in the database, wherein the row includes respective values for a start version column and a stop version column specifying information indicative of one or more versions of the application for which one or more database objects stored in the database are accessible.

### Claim 16 (depends on 10)

The non-transitory computer-readable medium of claim 10, wherein the version access information for the database query permits, for the particular version of the application, access to a first portion of data included in the one or more database objects, and wherein the operations further comprise:
in response to receiving an additional database query from a different version of the application, accessing, based on version access information for the different version of the application, a second, different portion of the data included in the one or more database objects.

### Claim 17

A method, comprising:
transmitting, by a particular version of an application to a database management system (DBMS), a database query for a database, wherein the database query specifies the particular version of the application, and wherein the database maintains version access information in one or more version information columns of one or more catalog tables; and
receiving, by the particular version of the application from the DBMS, data that is responsive to the database query, wherein the data is retrieved from the database based on the version access information specifying that one or more database objects are accessible to the particular version of the application.

### Claim 18 (depends on 17)

The method of claim 17, further comprising:
transmitting, by the particular version of the application to the DBMS, updates for one or more database objects, wherein the updates are associated with the particular version, and wherein the updates include alterations for metadata stored in one or more catalog tables.

### Claim 19 (depends on 17)

The method of claim 17, wherein one of the catalog tables is a schema catalog table that specifies, for at least one application, a schema that is applicable to that one application.

### Claim 20 (depends on 17)

The method of claim 17, wherein the one or more version information columns include a version column specifying information indicative of a range of application versions for which one or more database objects stored in the database are accessible.
