# US 2019/0317927 A1 · Automatic attribute structural variation detection for not only structured query language database

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

- Number: US 2019/0317927 A1
- Document ID: US20190317927A1
- Status: Published application
- Kind: A1
- Application number: 16/454,981
- Filed: 2019-06-27
- Published: 2019-10-17
- Earliest claimed: 2015-08-11
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Zhao Cao; Ju Wei Shi; Chen Wang; Lanjun Wang; Shuo Zhang
- Web page: https://patentgrep.com/patent/US20190317927A1

## CPC

- G06F 16/211: {Schema design and management}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Methods and a system are provided. A method includes automatically detecting, by an attribute structural variation detector, attribute structural variations in record schemas of a database lacking schema enforcement. The automatically detecting step includes encoding, by an encoder, nodes in the record schemas based on respective updated node labels to obtain a plurality of codes. The encoding step comprises, for each of the plurality of codes: recording, by a label frequency counter, a frequency f1 of the record schemas that include a given label; and recording, by a label frequency counter, a frequency fc of the record schemas that use a given one of the plurality of codes to update a label of a next level. An attribute variation is detected and retrieved responsive to the frequency fc≠0, and the frequency f1>(two times the frequency fc).

## Claims

### Claim 1

A method, comprising:
automatically detecting, by an attribute structural variation detector, attribute structural variations in record schemas of a database lacking schema enforcement, wherein said automatically detecting step includes:
encoding, by an encoder, nodes in the record schemas based on respective updated node labels to obtain a plurality of codes;
wherein said encoding step comprises, for each of the plurality of codes:
recording, by a label frequency counter, a frequency f1 of the record schemas that include a given label; and
recording, by a label frequency counter, a frequency fc of the record schemas that use a given one of the plurality of codes to update a label of a next level,
wherein an attribute variation is detected and retrieved responsive to the frequency fc≠0, and the frequency f1>(two times the frequency fc).

### Claim 2 (depends on 1)

The method of claim 1, wherein an attribute variation is detected and retrieved responsive to respective values of the frequency f1 and the frequency fc.

### Claim 3 (depends on 1)

The method of claim 1, wherein the attribute structural variations are automatically detected by the attribute structural variation detector based on following rules:
the frequency fc=0, which represents that a given node is a leaf node in all of the record schemas;
the frequency f1=the frequency fc, which represents that the given node is a non-leaf node in all of the record schemas; and
the frequency f1>a sum of the frequencies fc and fc≠0, which represents that the given node is the leaf node in some of the record schemas and the non-leaf node in others of the record schemas, thereby indicating that a structural variation exists.

### Claim 4 (depends on 1)

The method of claim 1, wherein the database is a Not Only Structured Query Language database.

### Claim 5 (depends on 1)

The method of claim 1, further comprising clustering, by a clusterer, to differentiate between different object types, and wherein the method is performed for the schema records of a same one of the different object types.

### Claim 6 (depends on 1)

A non-transitory article of manufacture tangibly embodying a computer readable program which when executed causes a computer to perform the steps of claim 1.

### Claim 7

A method, comprising:
automatically detecting, by an attribute structural variation detector, attribute structural variations in record schemas of a database lacking schema enforcement, wherein said automatically detecting step includes:
encoding, by an encoder, nodes in the record schemas based on respective updated node labels to obtain a plurality of codes;
recording, by a label frequency counter, a frequency f1 of the record schemas that include a given label;
recording, by a code use frequency counter, a frequency fc of the record schemas that use a given one of the plurality of codes to update a label of a next level; and
wherein an attribute variation is detected and retrieved responsive to the frequency fc≠0, and the frequency f1>(two times the frequency fc).

### Claim 8 (depends on 7)

The method of claim 7, wherein the attribute structural variations are automatically detected by the attribute structural variation detector based on following rules:
the frequency fc=0, which represents that a given node is a leaf node in all of the record schemas;
the frequency f1=the frequency fc, which represents that the given node is a non-leaf node in all of the record schemas; and
the frequency f1>a sum of the frequencies fc and fc≠0, which represents that the given node is the leaf node in some of the record schemas and the non-leaf node in others of the record schemas, thereby indicating that a structural variation exists.

### Claim 9 (depends on 7)

A non-transitory article of manufacture tangibly embodying a computer readable program which when executed causes a computer to perform the steps of claim 7.

### Claim 10

A system for automatically detecting attribute structural variations in record schemas of a database lacking schema enforcement, the system comprising:
an encoder for encoding nodes in the record schemas based on respective updated node labels to obtain a plurality of codes;
wherein said encoder, for each of the plurality of codes:
records a frequency f1 of the record schemas that include a given label; and
records a frequency fc of the record schemas that use a given one of the plurality of codes to update a label of a next level,
wherein an attribute variation is detected and retrieved responsive to the frequency fc≠0, and the frequency f1>(two times the frequency fc).

### Claim 11 (depends on 10)

The system of claim 10, wherein an attribute variation is detected and retrieved responsive to respective values of the frequency f1 and the frequency fc.

### Claim 12 (depends on 10)

The system of claim 10, wherein the attribute structural variations are automatically detected by the attribute structural variation detector based on following rules:
the frequency fc=0, which represents that a given node is a leaf node in all of the record schemas;
the frequency f1=the frequency fc, which represents that the given node is a non-leaf node in all of the record schemas; and
the frequency f1>a sum of the frequencies fc and fc≠0, which represents that the given node is the leaf node in some of the record schemas and the non-leaf node in others of the record schemas, thereby indicating that a structural variation exists.
