IP Library Granted Patent US 10,997,121
Granted Patent B1
US 10,997,121 · App. 16/931,779 · Granted May 4, 2021

Attachable-and-detachable database sessions

Inventors: Tyler Jones (San Francisco, CA); Peter Povinec (Redwood City, CA)
Assignee: Snowflake Inc.
G06F16/1734G06F16/144G06F16/156G06F16/1865H04L67/14H04L67/42
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,997,121
App. No.
16/931,779
Granted
May 4, 2021
Kind
B1
Abstract

In an embodiment, a database platform receives a request from a client for creation of an attachable-and-detachable database session, and responsively creates the requested attachable-and-detachable database session for the client. The database platform sets the attachable-and-detachable database session as a current database session for the client at the database platform. The database platform determines that the client has detached from the attachable-and-detachable database session, and thereafter continues to maintain the attachable-and-detachable database session in data storage at the database platform.

Claims (92)

1. A method comprising:

establishing, by a database platform having at least one hardware processor, a first connection between the database platform and a first client, the first client associated with a first customer account of the database platform, the database platform providing a plurality of types of database sessions including connection-specific database sessions and attachable-and-detachable database sessions;

creating, for the first client upon establishing the first connection, a first connection-specific database session associated at the database platform with the first connection;

setting the first connection-specific database session as a current database session for the first client;

receiving a first attachment request from the first client while the first connection-specific database session is the current database session for the first client, the first attachment request requesting that the first client attach to a first attachable-and-detachable database session that is stored in the first customer account;

setting, in response to receiving the first attachment request from the first client, the first attachable-and-detachable database session as the current database session for the first client;

executing, as at least part of the first attachable-and-detachable database session, one or both of one or more first queries and one or more first database-transaction commands received from the first client while the first attachable-and-detachable database session is the current database session for the first client;

determining that the first client has detached from the first attachable-and-detachable database session; and

maintaining, after having determined that the first client has detached from the first attachable-and-detachable database session, the first attachable-and-detachable database session in the first customer account.

2. The method of claim 1 , further comprising:

receiving, from the first client, while the first connection-specific database session is the current database session for the first client, a first creation request that the database platform create the first attachable-and-detachable database session in the first customer account; and

creating, in response to receiving the first creation request, the first attachable-and-detachable database session in the first customer account.

3. The method of claim 1 , further comprising maintaining, in the first customer account, at least one session-update record reflecting the one or both of one or more first queries and one or more first database-transaction commands executed as part of the first attachable-and-detachable database session.

4. The method of claim 1 , further comprising:

receiving, from the first client after having determined that the first client had detached from the first attachable-and-detachable database session, a second attachment request, the second attachment request requesting that the first client attach to the first attachable-and-detachable database session; and

setting, in response to receiving the second attachment request from the first client, the first attachable-and-detachable database session as the current database session for the first client.

5. The method of claim 4 , further comprising, subsequent to setting the first attachable-and-detachable database session as the current database session for the first client in response to receiving the second attachment request from the first client:

executing, as at least part of the first attachable-and-detachable database session, one or both of one or more second queries and one or more second database-transaction commands received from the first client while the first attachable-and-detachable database session is the current database session for the first client.

6. The method of claim 1 , wherein the first attachment request comprises a first use command with respect to the first attachable-and-detachable database session.

7. The method of claim 1 , wherein:

determining that the first client has detached from the first attachable-and-detachable database session comprises receiving, from the first client, a first leave command with respect to the first attachable-and-detachable database session; and

the method further comprises setting, in response to receiving the first leave command, a previous database session of the first client as the current database session for the first client.

8. The method of claim 7 , wherein the previous database session for the client is the first connection-specific database session.

9. The method of claim 1 , further comprising:

receiving, from a second client after having determined that the first client had detached from the first attachable-and-detachable database session, a second attachment request, the second attachment request requesting that the second client attach to the first attachable-and-detachable database session;

setting, in response to receiving the second attachment request from the second client, the first attachable-and-detachable database session as the current database session for the second client; and

executing, as at least part of the first attachable-and-detachable database session, one or both of one or more second queries and one or more second database-transaction commands received from the second client while the first attachable-and-detachable database session is the current database session for the second client.

10. The method of claim 1 , wherein:

maintaining the first attachable-and-detachable database session in the first customer account comprises maintaining the first attachable-and-detachable database session in the first customer account until receiving a drop command with respect to the first attachable-and-detachable database session; and

the method further comprises deleting the first attachable-and-detachable database session from the first customer account in response to receiving the drop command.

11. A database platform comprising:

at least one hardware processor; and

one or more computer-storage media containing instructions that, when executed by the at least one hardware processor; cause the at least one hardware processor to perform operations comprising:

establishing a first connection between the database platform and a first client, the first client associated with a first customer account of the database platform, the database platform providing a plurality of types of database sessions including connection-specific database sessions and attachable-and-detachable database sessions;

creating, for the first client upon establishing the first connection, a first connection-specific database session associated at the database platform with the first connection;

setting the first connection-specific database session as a current database session for the first client;

receiving a first attachment request from the first client while the first connection-specific database session is the current database session for the first client, the first attachment request requesting that the first client attach to a first attachable-and-detachable database session that is stored in the first customer account;

setting, in response to receiving the first attachment request from the first client, the first attachable-and-detachable database session as the current database session for the first client;

executing, as at least part of the first attachable-and-detachable database session, one or both of one or more first queries and one or more first database-transaction commands received from the first client while the first attachable-and-detachable database session is the current database session for the first client;

determining that the first client has detached from the first attachable-and-detachable database session; and

maintaining, after having determined that the first client has detached from the first attachable-and-detachable database session, the first attachable-and-detachable database session in the first customer account.

12. The database platform of claim 11 , the operations further comprising:

receiving, from the first client, while the first connection-specific database session is the current database session for the first client, a first creation request that the database platform create the first attachable-and-detachable database session in the first customer account; and

creating, in response to receiving the first creation request, the first attachable-and-detachable database session in the first customer account.

13. The database platform of claim 11 , the operations further comprising maintaining, in the first customer account, at least one session-update record reflecting the one or both of one or more first queries and one or more first database-transaction commands executed as part of the first attachable-and-detachable database session.

14. The database platform of claim 11 , the operations further comprising:

receiving, from the first client after having determined that the first client had detached from the first attachable-and-detachable database session, a second attachment request, the second attachment request requesting that the first client attach to the first attachable-and-detachable database session; and

setting, in response to receiving the second attachment request from the first client, the first attachable-and-detachable database session as the current database session for the first client.

15. The database platform of claim 14 , the operations further comprising, subsequent to setting the first attachable-and-detachable database session as the current database session for the first client in response to receiving the second attachment request from the first client:

executing, as at least part of the first attachable-and-detachable database session, one or both of one or more second queries and one or more second database-transaction commands received from the first client while the first attachable-and-detachable database session is the current database session for the first client.

16. The database platform of claim 11 , wherein the first attachment request comprises a first use command with respect to the first attachable-and-detachable database session.

17. The database platform of claim 11 , wherein:

determining that the first client has detached from the first attachable-and-detachable database session comprises receiving, from the first client, a first leave command with respect to the first attachable-and-detachable database session; and

the operations further comprise setting, in response to receiving the first leave command, a previous database session of the first client as the current database session for the first client.

18. The database platform of claim 17 , wherein the previous database session for the client is the first connection-specific database session.

19. The database platform of claim 11 , the operations further comprising:

receiving, from a second client after having determined that the first client had detached from the first attachable-and-detachable database session, a second attachment request, the second attachment request requesting that the second client attach to the first attachable-and-detachable database session;

setting, in response to receiving the second attachment request from the second client, the first attachable-and-detachable database session as the current database session for the second client; and

executing, as at least part of the first attachable-and-detachable database session, one or both of one or more second queries and one or more second database-transaction commands received from the second client while the first attachable-and-detachable database session is the current database session for the second client.

20. The database platform of claim 11 , wherein:

maintaining the first attachable-and-detachable database session in the first customer account comprises maintaining the first attachable-and-detachable database session in the first customer account until receiving a drop command with respect to the first attachable-and-detachable database session; and

the operations further comprise deleting the first attachable-and-detachable database session from the first customer account in response to receiving the drop command.

21. One or more computer-storage media containing instructions that, when executed by at least one hardware processor, cause the at least one hardware processor to perform operations comprising:

establishing a first connection between a database platform and a first client, the first client associated with a first customer account of the database platform, the database platform providing a plurality of types of database sessions including connection-specific database sessions and attachable-and-detachable database sessions;

creating, for the first client upon establishing the first connection, a first connection-specific database session associated at the database platform with the first connection;

setting the first connection-specific database session as a current database session for the first client;

receiving a first attachment request from the first client while the first connection-specific database session is the current database session for the first client, the first attachment request requesting that the first client attach to a first attachable-and-detachable database session that is stored in the first customer account;

setting, in response to receiving the first attachment request from the first client, the first attachable-and-detachable database session as the current database session for the first client;

executing, as at least part of the first attachable-and-detachable database session, one or both of one or more first queries and one or more first database-transaction commands received from the first client while the first attachable-and-detachable database session is the current database session for the first client;

determining that the first client has detached from the first attachable-and-detachable database session; and

maintaining, after having determined that the first client has detached from the first attachable-and-detachable database session, the first attachable-and-detachable database session in the first customer account.

22. The one or more computer-storage media of claim 21 , the operations further comprising:

receiving, from the first client, while the first connection-specific database session is the current database session for the first client, a first creation request that the database platform create the first attachable-and-detachable database session in the first customer account; and

creating, in response to receiving the first creation request, the first attachable-and-detachable database session in the first customer account.

23. The one or more computer-storage media of claim 21 , the operations further comprising maintaining, in the first customer account, at least one session-update record reflecting the one or both of one or more first queries and one or more first database-transaction commands executed as part of the first attachable-and-detachable database session.

24. The one or more computer-storage media of claim 21 , the operations further comprising:

receiving, from the first client after having determined that the first client had detached from the first attachable-and-detachable database session, a second attachment request, the second attachment request requesting that the first client attach to the first attachable-and-detachable database session; and

setting, in response to receiving the second attachment request from the first client, the first attachable-and-detachable database session as the current database session for the first client.

25. The one or more computer-storage media of claim 24 , the operations further comprising, subsequent to setting the first attachable-and-detachable database session as the current database session for the first client in response to receiving the second attachment request from the first client:

executing, as at least part of the first attachable-and-detachable database session, one or both of one or more second queries and one or more second database-transaction commands received from the first client while the first attachable-and-detachable database session is the current database session for the first client.

26. The one or more computer-storage media of claim 21 , wherein the first attachment request comprises a first use command with respect to the first attachable-and-detachable database session.

27. The one or more computer-storage media of claim 21 , wherein:

determining that the first client has detached from the first attachable-and-detachable database session comprises receiving, from the first client, a first leave command with respect to the first attachable-and-detachable database session; and

the operations further comprise setting, in response to receiving the first leave command, a previous database session of the first client as the current database session for the first client.

28. The one or more computer-storage media of claim 27 , wherein the previous database session for the client is the first connection-specific database session.

29. The one or more computer-storage media of claim 21 , the operations further comprising:

receiving, from a second client after having determined that the first client had detached from the first attachable-and-detachable database session, a second attachment request, the second attachment request requesting that the second client attach to the first attachable-and-detachable database session;

setting, in response to receiving the second attachment request from the second client, the first attachable-and-detachable database session as the current database session for the second client; and

executing, as at least part of the first attachable-and-detachable database session, one or both of one or more second queries and one or more second database-transaction commands received from the second client while the first attachable-and-detachable database session is the current database session for the second client.

30. The one or more computer-storage media of claim 21 , wherein:

maintaining the first attachable-and-detachable database session in the first customer account comprises maintaining the first attachable-and-detachable database session in the first customer account until receiving a drop command with respect to the first attachable-and-detachable database session; and

the operations further comprise deleting the first attachable-and-detachable database session from the first customer account in response to receiving the drop command.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 21, 2020
From: JONES, TYLER; POVINEC, PETER
To: SNOWFLAKE INC.
Reel/Frame 053260/0201 →
Cited By (4)
US 12,221,654 US 12,226,401 US 12,274,692 US 12,519,863