IP Library Granted Patent US 7,809,741
Granted Patent B2
US 7,809,741 · App. 11/395,105 · Granted Oct 5, 2010

Generating and utilizing composite keys in lieu of compound keys

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 7,809,741
App. No.
11/395,105
Granted
Oct 5, 2010
Kind
B2
Abstract

Various technologies and techniques are disclosed that improve the retrieval or interaction with data in databases. A database has one or more tables with compound keys. An entity key that is a single composite key of each of the compound keys is generated via an invertible composition transformation. The composite entity key is a binary serialization of the respective compound keys. The composite entity key is used by separate applications to interact with the database instead of the respective underlying compound keys. The composite entity key is decomposed into the underlying compound keys when a particular database operation needs to be performed. The results are then returned to the separate application with the composite entity key.

Claims (47)

1. A computer-implemented method for generating a composite key for interacting with a data store, the method comprising the steps of:

storing data for an entity having a plurality of attributes with a compound key, wherein values of the plurality of attributes of the entity are stored in a data store with each value of each attribute of the entity stored in a separate column of the data store, and the compound key is associated with a plurality of key columns of the data store to which the entity is bound that contain compound key values of the entity corresponding to a set of attributes identified by the compound key;

retrieving a plurality of compound key values of the entity at a database application on a computing device, the plurality of compound key values of the entity retrieved from the plurality of key columns of the data store to which the entity is bound that correspond to the set of attributes identified by the compound key;

generating a single composite key for the entity based on component parts of the compound key by applying an invertible composition transformation to the plurality of compound key values of the entity retrieved from the plurality of key columns of the data store to which the entity is bound, the single composite key for the entity including a single encoded value that is generated from binary serialization of the plurality of key columns of the data store to which the entity is bound and that is converted back into the plurality of compound key values of the entity when an inverse of the invertible composition transformation that was used to generate the single composite key for the entity is applied to decode the single encoded value; and

providing the single composite key for the entity to a separate application for requesting access to the data for the entity stored in the data store using the single composite key of for the entity.

2. The computer-implemented method of claim 1 , further comprising:

receiving a request from the separate application to access a portion of data in the data store using the single composite key for the entity; and

generating a compound key for the entity comprising the plurality of compound key values of the entity by applying the inverse of the invertible composition transformation to the single composite key for the entity.

3. The computer-implemented method of claim 2 , further comprising:

using the compound key for the entity to access the data stored for the entity in the data store; and

returning a set of results to the separate application along with the single composite key for the entity and not the compound key for the entity.

4. The computer-implemented method of claim 1 , further comprising:

generating, a corresponding composite key for each of a plurality of compound keys in the data store.

5. The computer-implemented of claim 1 , wherein the single composite key for the entity further includes a null value bitmask having bits corresponding to the plurality of key columns if one or more of the plurality of key columns of the data store to which the entity is bound contain a null value.

6. The computer-implemented method of claim 5 , wherein the composite key includes a set of flags in a first byte of the composite key.

7. The computer-implemented method of claim 6 , wherein the composite key includes a null value bitmask indicator in a high bit of the first byte.

8. The computer-implemented method of claim 1 , wherein the single composite key for the entity has a base-64 encoding.

9. A computer-readable storage medium having computer-executable instructions causing a computer to perform the steps recited in claim 1 .

10. A computer-readable storage medium storing computer-executable instructions for causing a computer to perform steps comprising:

storing data for an entity having a plurality of attributes with a compound key, wherein values of the plurality of attributes of the entity are stored in a data store with each value of each attribute of the entity stored in a separate column of the data store, and the compound key is associated with a plurality of key columns of the of the data store to which the entity is bound that contain compound key values corresponding to a set of attributes identified by the compound key;

retrieving a plurality of compound key values of the entity, the plurality of compound key values of the entity retrieved from the plurality of key columns of the data store to which the entity is bound that correspond to the set of attributes identified by the compound key;

generating a single composite key for the entity based on component parts of the compound key by applying an invertible composition transformation to the plurality of compound key values of the entity retrieved from the plurality of key columns of the data store to which the entity is bound, the single composite key for the entity including a single encoded value that is generated from binary serialization of the plurality of key columns of the data store to which the entity is bound and that is converted back into the plurality of compound key values of the entity when an inverse of the invertible composition transformation that was used to generate the single composite key for the entity is applied to decode the single encoded value;

providing the single composite key for the entity to a separate application;

receiving a request from the separate application to perform a database operation on data stored for the entity in the data store using the single composite key for the entity to request access to the data stored for the entity in the data store;

generating a compound key for the entity comprising the plurality of compound key values of the entity by applying the inverse of the invertible composition transformation to the single composite key for the entity; and

using the compound key for the entity to perform the database operation on the data stored for the entity in the data store.

11. The computer-readable storage medium of claim 10 , further storing computer-executable instructions for:

returning a result of the database operation to the separate application with the single composite key for the entity.

12. The computer-readable storage medium of claim 10 , wherein the single composite key for the entity further includes a null value bitmask having bits corresponding to the plurality of key columns if one or more of the plurality of key columns of the data store to which the entity is bound contain a null value.

13. The computer-readable storage medium of claim 10 , wherein the single composite key for the entity has a base-64 encoding.

14. The computer-readable storage medium of claim 10 , wherein the single composite key for the entity is provided so the separate application does not have to work with the compound key for the entity.

15. A computer-implemented method for using a composite key of to interact with a data store, the method comprising the steps of:

storing data for an entity having a plurality of attributes with a compound key, wherein values of the plurality of attributes of the entity are stored in a data store with each value of each attribute of the entity stored in a separate column of the data store, and the compound key is associated with a plurality of key columns of the data store to which the entity is bound that contain compound key values corresponding to a set of attributes identified by the compound key;

generating a binary serialization of the plurality of key columns of the data store to which the entity is bound at a database application on a computing device, the binary serialization of the plurality of key columns of the data store comprising a single encoded binary value that is converted into a plurality of compound key values of the entity when the single encoded binary value is decoded;

including the binary serialization of the compound key in a single composite key for the entity;

including a null value bitmask having bits corresponding to the plurality of key columns in the single composite key for the entity if one or more of the plurality of key columns of the data store to which the entity is bound contain a null value;

receiving a request to access the data stored for the entity in the data store using the single composite key for the entity;

converting the binary serialization of the plurality of key columns of the data store included in the single composite key for the entity from the singled encoded binary value into the plurality of compound key values of the entity;

generating a compound key for the entity comprising the plurality of compound key values of the entity; and

using the compound key for the entity to perform a database operation on the data stored for the entity in the data store.

16. The computer-implemented method of claim 15 , further comprising:

receiving a selection of at least one instance of the entity from a target data source through a query.

17. The computer-implemented method of claim 15 , wherein the single composite key for the entity has a base-64 encoding.

18. The computer-implemented method of claim 15 , wherein the single composite key for the entity is provided so a separate application does not have to work with a compound key for the entity.

19. The computer-implemented method of claim 15 , further comprising:

storing the single composite key for the entity in the data store.

20. A computer-readable storage medium having computer-executable instructions causing a computer to perform the steps recited in claim 15 .

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2014
From: MICROSOFT CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 034542/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 3, 2006
From: HAYS, CHRISTOPHER A.; MINEEV, ALEXANDRE I.
To: MICROSOFT CORPORATION
Reel/Frame 017570/0315 →