IP Library › Granted Patent US 10,387,402
Granted Patent B2
US 10,387,402 · App. 15/362,484 · Granted Aug 20, 2019

System and method for conditionally updating an item with attribute granularity

Inventors: Stefano Stefani (Issaquah, WA); Chiranjeeb Buragohain (Seattle, WA); Jai Vasanth (Seattle, WA); Wei Xiao (Kirkland, WA)
Assignee: Amazon Technologies, Inc.
G06F16/235G06F16/23G06F16/2365G06F16/278
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,387,402
App. No.
15/362,484
Granted
Aug 20, 2019
Kind
B2
Abstract

A system that implements a scaleable data storage service may maintain tables in a non-relational data store on behalf of clients. Each table may include multiple items. Each item may include one or more attributes, each containing a name-value pair. Attribute values may be scalars or sets of numbers or strings. The system may provide an API usable to request that values of one or more of an item's attributes be updated. An update request may be conditional on expected values of one or more item attributes (e.g., the same or different item attributes). In response to a request to update the values of one or more item attributes, the previous values and/or updated values may be optionally returned for the updated item attributes or for all attributes of an item targeted by an update request. Items stored in tables may be indexed using a simple or composite primary key.

Claims (87)

1. A method, comprising:

receiving a request to update an item stored in a table in a non-relational data store,

wherein the item comprises a plurality of attributes,

wherein the request comprises:

a condition for the item to be evaluated prior to updating the item, and

a key that uniquely identifies the item in the table,

wherein the condition pertains to at least one attribute of the item, wherein the at least one attribute is separate from the key that uniquely identifies the item in the table, and

wherein the request is formatted according to a non-SQL (Structured Query Language) interface for the non-relational data store to specify the condition and the key in one request to the non-relational data store;

in response to said receiving:

accessing the item according to the key in the one request, and

evaluating the item according to the condition in the one request; and

in response to determining that the condition is met, updating the item according to the one request, wherein the item is not updated if the condition is not met.

2. The method of claim 1 ,

wherein the condition for the item specifies a respective condition for each of two or more attributes of the item; and

wherein determining that the condition for the item is met comprises determining that the respective conditions for the two or more attributes are met.

3. The method of claim 1 ,

wherein the condition for the item specifies a current value of a numeric attribute of the item; and

wherein said updating the item according to the request comprises incrementing or decrementing the current value of the numeric attribute by an amount indicated in the request.

4. The method of claim 1 ,

wherein the condition for the item specifies a current value of an attribute of the item; and

wherein said updating the item according to the request comprises replacing the current value of the attribute with a different value specified in the request.

5. The method of claim 1 ,

wherein the condition for the item specifies that an attribute of the item exists; and

wherein said updating the item according to the request comprises deleting the attribute from the item.

6. The method of claim 1 ,

wherein the condition for the item specifies that an attribute of the item does not exist; and

wherein said updating the item according to the request comprises adding the attribute to the item.

7. The method of claim 1 ,

wherein the condition for the item specifies that the item exists; and

wherein said updating the item according to the request comprises inserting the item into the table of the non-relational data store.

8. A system, comprising:

a plurality of computing nodes, each comprising at least one processor and memory comprising program instructions executable to:

receive a request to update an item stored in a table in a non-relational data store,

wherein the item comprises a plurality of attributes,

wherein the request comprises:

a condition for the item to be evaluated prior to updating the item, and

a key that uniquely identifies the item in the table,

wherein the condition pertains to at least one attribute of the item, wherein the at least one attribute is separate from the key that uniquely identifies the item in the table, and

wherein the request is formatted according to a non-SQL (Structured Query Language) interface for the non-relational data store to specify the condition and the key in one request to the non-relational data store;

in response to receiving the request:

access the item according to the key in the one request, and

evaluate the item according to the condition in the one request; and

in response to determining that the condition is met, update the item according to the one request, wherein the item is not updated if the condition is not met.

9. The system of claim 8 ,

wherein the condition for the item specifies a respective condition for each of two or more attributes of the item; and

wherein determining that the condition for the item is met comprises determining that the respective conditions for the two or more attributes are met.

10. The system of claim 8 ,

wherein the condition for the item specifies a current value of a numeric attribute of the item; and

wherein updating the item according to the request comprises incrementing or decrementing the current value of the numeric attribute by an amount indicated in the request.

11. The system of claim 8 ,

wherein the condition for the item specifies a current value of an attribute of the item; and

wherein updating the item according to the request comprises replacing the current value of the attribute with a different value specified in the request.

12. The system of claim 8 ,

wherein the condition for the item specifies that an attribute of the item exists; and

wherein updating the item according to the request comprises deleting the attribute from the item.

13. The system of claim 8 ,

wherein the condition for the item specifies that an attribute of the item does not exist; and

wherein updating the item according to the request comprises adding the attribute to the item.

14. The system of claim 8 ,

wherein the condition for the item specifies that the item exists; and

wherein updating the item according to the request comprises inserting the item into the table of the non-relational data store.

15. A non-transitory, computer-readable storage medium storing program instructions that if executed on one or more computers cause the one or more computers to:

receive a request to update an item stored in a table in a non-relational data store,

wherein the item comprises a plurality of attributes,

wherein the request comprises:

a condition for the item to be evaluated prior to updating the item, and

a key that uniquely identifies the item in the table,

wherein the condition pertains to at least one attribute of the item, wherein the at least one attribute is separate from the key that uniquely identifies the item in the table, and

wherein the request is formatted according to a non-SQL (Structured Query Language) interface for the non-relational data store to specify the condition and the key in one request to the non-relational data store; in response to receiving the request:

access the item according to the key in the one request, and

evaluate the item according to the condition in the one request; and

in response to determining that the condition is met, update the item according to the one request, wherein the item is not updated if the condition is not met.

16. The non-transitory, computer-readable storage medium of claim 15 ,

wherein the condition for the item specifies a respective condition for each of two or more attributes of the item; and

wherein determining that the condition for the item is met comprises determining that the respective conditions for the two or more attributes are met.

17. The non-transitory, computer-readable storage medium of claim 15 ,

wherein the condition for the item specifies a current value of a numeric attribute of the item; and

wherein updating the item according to the request comprises incrementing or decrementing the current value of the numeric attribute by an amount indicated in the request.

18. The non-transitory, computer-readable storage medium of claim 15 ,

wherein the condition for the item specifies a current value of an attribute of the item; and

wherein updating the item according to the request comprises replacing the current value of the attribute with a different value specified in the request.

19. The non-transitory, computer-readable storage medium of claim 15 ,

wherein the condition for the item specifies that an attribute of the item exists; and

wherein updating the item according to the request comprises deleting the attribute from the item.

20. The non-transitory, computer-readable storage medium of claim 15 ,

wherein the condition for the item specifies that an attribute of the item does not exist; and

wherein updating the item according to the request comprises adding the attribute to the item.

Continuity (3)
Continuation 14092779 · Nov 27, 2013
Continuation 13169995 · Jun 27, 2011
Related Publication 20170075949A1 · Mar 16, 2017