# US 2013/0275474 A1 · Automating Evolution of Schemas and Mappings

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

- Number: US 2013/0275474 A1
- Document ID: US20130275474A1
- Status: Published application
- Kind: A1
- Application number: 13/909,058
- Filed: 2013-06-03
- Published: 2013-10-17
- Earliest claimed: 2010-06-15
- Assignees: Microsoft Corporation
- Applicants: Microsoft Corporation
- Inventors: James F. Terwilliger; Philip A. Bernstein; Aditya Unnithan
- Web page: https://patentgrep.com/patent/US20130275474A1

## CPC

- G06F 16/213: {with details for schema evolution support}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Aspects of the subject matter described herein relate to automating evolution of schemas and mappings. In aspects, mappings between a conceptual model and a store model are updated automatically in response to a change that occurs to the conceptual model. For example, when a change occurs to the conceptual model, a local scope of the change is determined. The local scope indicates mappings that are most similar to the type(s) affected by the change. Based on the local scope, a pattern of mappings between the conceptual model and the store model is determined. Using this pattern and the nature of the change, the mappings are updated according to the pattern. In addition, the store model and data thereon may be updated in a manner to preserve existing data that is not to be deleted in response to the change.

## Claims

### Claim 1

A method implemented at least in part by a computer, the method comprising:
determining a change to a conceptual model that is mapped to a store model via mappings between types of the conceptual model and elements of the store model, the conceptual model including a hierarchy of types;
determining a local scope that indicates relevant mappings to use to identify a pattern for modifying the mappings to be consistent with the change;
searching for a mapping pattern of the local scope, the mapping pattern indicating how other types of the local scope have been mapped to elements of the store model; and
updating the mappings between the conceptual model and the store model using the mapping pattern of the local scope.

### Claim 2 (depends on 1)

The method of claim 1, further comprising storing indications of changes made to the conceptual model in a change log and wherein determining a change to a conceptual model comprises reading an indication of the change from the change log.

### Claim 3 (depends on 1)

The method of claim 1, further comprising creating a mapping relation that represents the mappings between types of the conceptual model and elements of the store model.

### Claim 4 (depends on 3)

The method of claim 3, wherein creating a mapping relation comprises creating a table in which each row of the table represents a property-to-property mapping between a property of the conceptual model and a corresponding element of the store model.

### Claim 5 (depends on 3)

The method of claim 3, wherein creating a mapping relation comprises creating a tuple that includes:
conceptual model entity type, property, and conditions, if any;
store model table, column, and conditions, if any;
a flag that indicates whether the property is part of a key; and
a domain of the property.

### Claim 6 (depends on 1)

The method of claim 1, wherein determining a local scope comprises:
assigning a pair (0,0) to a type of the hierarchy and all of the type's siblings;
for each type with an assigned pair (m, n), if the type's parent is not assigned a pair, assigning a pair (m+2, n) to the parent;
for each type with an assigned pair (m, n), assigning a pair (m+1, n) to any siblings of the type that have no assigned pair;
for each type that has no pair and whose parent has a pair (m, n), assigning a pair (m, n+1);
for each type in the hierarchy, computing a priority score using the type's pair (m, n) using a formula of 1+m−2−n; and
selecting types for the local scope based on the priority scores of the types.

### Claim 7 (depends on 1)

The method of claim 1, wherein determining a local scope comprises identifying types in the conceptual model that are closest in the hierarchy to a type involved with the change.

### Claim 8 (depends on 1)

The method of claim 1, wherein searching for a pattern in the local scope comprises determining whether each type in the local scope is mapped to the store model using table-per-type, table-per-concrete class, or table-per-hierarchy.

### Claim 9

In a computing environment, a system comprising:
at least one processor;
a change manager configured to determine a change to a conceptual model that is mapped to a store model via mappings between types of the conceptual model and elements of the store model, the conceptual model including a hierarchy of types;
a similarity detector configured to determine a local scope that indicates relevant mappings to use to identify a pattern for modifying the mappings to be consistent with the change
a pattern recognizer configured to search for a mapping pattern of the local scope, the mapping pattern indicating how other types of the local scope have been mapped to elements of the store model; and
a mapping manager configured to update the mappings between the conceptual model and the store model using the mapping pattern of the local scope.

### Claim 10 (depends on 9)

The system of claim 9 further comprising:
a log manager configured to store indications of changes made to the conceptual model in a change log; and
wherein the change manager is further configured to read an indication of the change from the change log.

### Claim 11 (depends on 9)

The system of claim 9 further comprising:
a visual schema modification tool configured to create a mapping relation that represents the mappings between types of the conceptual model and elements of the store model.

### Claim 12 (depends on 11)

The system of claim 11 wherein the visual schema modification tool is further configured to create a table in which each row of the table represents a property-to-property mapping between a property of the conceptual model and a corresponding element of the store model.

### Claim 13 (depends on 11)

The system of claim 11 wherein the visual schema modification tool is further configure to create the mapping relation by creating a tuple that includes:
conceptual model entity type, property, and conditions, if any;
store model table, column, and conditions, if any;
a flag that indicates whether the property is part of a key; and
a domain of the property.

### Claim 14 (depends on 9)

The system of claim 9 wherein the similarity detector is configured to determine the local scope by:
assigning a pair (0,0) to a type of the hierarchy and all of the type's siblings;
for each type with an assigned pair (m, n), if the type's parent is not assigned a pair, assigning a pair (m+2, n) to the parent;
for each type with an assigned pair (m, n), assigning a pair (m+1, n) to any siblings of the type that have no assigned pair;
for each type that has no pair and whose parent has a pair (m, n), assigning a pair (m, n+1);
for each type in the hierarchy, computing a priority score using the type's pair (m, n) using a formula of 1+m−2̂(−n); and
selecting types for the local scope based on the priority scores of the types.

### Claim 15 (depends on 9)

The system of claim 9 wherein the similarity detector is configured to determine the local scope by:
identifying types in the conceptual model that are closest in the hierarchy to a type involved with the change.

### Claim 16 (depends on 9)

The system of claim 9 wherein the pattern recognizer is configured to search for the mapping pattern in the local scope by:
determining whether each type in the local scope is mapped to the store model using table-per-type, table-per-concrete class, or table-per-hierarchy.

### Claim 17

A computer storage media having computer-executable instructions, which when executed perform actions, comprising:
determining a change to a conceptual model that is mapped to a store model via mappings between types of the conceptual model and elements of the store model, the conceptual model including a hierarchy of types;
determining a local scope that indicates relevant mappings to use to identify a pattern for modifying the mappings to be consistent with the change;
searching for a mapping pattern of the local scope, the mapping pattern indicating how other types of the local scope have been mapped to elements of the store model; and
updating the mappings between the conceptual model and the store model using the mapping pattern of the local scope.

### Claim 18 (depends on 17)

The computer storage media of claim 17 further comprising instructions to perform the actions of:
storing indications of changes made to the conceptual model in a change log and wherein determining a change to a conceptual model comprises reading an indication of the change from the change log.

### Claim 19 (depends on 17)

The computer storage media of claim 17 further comprising instructions to perform the actions of:
creating a mapping relation that represents the mappings between types of the conceptual model and elements of the store model.

### Claim 20 (depends on 17)

The computer storage media of claim 17 wherein determine the local scope comprises:
assigning a pair (0,0) to a type of the hierarchy and all of the type's siblings;
for each type with an assigned pair (m, n), if the type's parent is not assigned a pair, assigning a pair (m+2, n) to the parent;
for each type with an assigned pair (m, n), assigning a pair (m+1, n) to any siblings of the type that have no assigned pair;
for each type that has no pair and whose parent has a pair (m, n), assigning a pair (m, n+1);
for each type in the hierarchy, computing a priority score using the type's pair (m, n) using a formula of 1+m−2̂(−n); and
selecting types for the local scope based on the priority scores of the types.
