# US 2019/0317940 A1 · Efficient use of trie data structure in databases

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

- Number: US 2019/0317940 A1
- Document ID: US20190317940A1
- Status: Published application
- Kind: A1
- Application number: 16/393,918
- Filed: 2019-04-24
- Published: 2019-10-17
- Earliest claimed: 2017-03-15
- Assignees: Censhare GmbH
- Applicants: censhare AG
- Inventors: Walter BAUER
- Web page: https://patentgrep.com/patent/US20190317940A1

## CPC

- G06F 16/24558: {Binary matching operations}
- G06F 9/30029: {Logical and Boolean instructions, e.g. XOR, NOT}
- G06F 16/2237: {Vectors, bitmaps or matrices}
- G06F 16/2246: {Trees, e.g. B+trees}
- G06F 16/2453: Query optimisation
- G06F 16/24561: {Intermediate data storage techniques for performance improvement}
- G06F 17/11: for solving equations {, e.g. nonlinear equations, general mathematical optimization problems (optimization specially adapted for a specific administrative, business or logistic context G06Q10/04)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The invention provides a time-efficient way of performing a query in a database or information retrieval system comprising operations such as intersection, union, difference and exclusive disjunction on two or more sets of keys stored in a database or information retrieval system. In a novel execution model, all data sources are tries. Two or more input tries are combined in accordance with the respective set operation, to obtain the set of keys associated with the nodes of a respective resulting trie. An intersection operation performed in this way can be used for efficient range queries, in particular when two or more data items are involved in the query. The physical algebra of the implementation of tries based on bitmaps corresponds directly to the logical algebra for the set operations and allows for efficient implementation by means of bitwise Boolean operations.

## Claims

### Claim 1

An electronic database or information retrieval system, the system comprising:
a memory; and
a query execution engine, wherein the engine operates based on at least a trie maintained in the memory, the trie comprising one or more nodes,
wherein each node that is a child node is associated with a key portion;
wherein a key with which a node in the trie is associated is defined by a concatenation of the key portions associated with the nodes on the path from the root node to that node, and
wherein the key comprises control information and content information.

### Claim 2 (depends on 1)

The system of claim 1, wherein the key comprises one or more key parts comprising the content information, and wherein, for each of the key parts, the control information comprises a data type information element specifying a data type of the content information comprised by the key part.

### Claim 3 (depends on 2)

The system of claim 2, wherein a key part comprises the data type information element which specifies the data type of the content information comprised by the key part.

### Claim 4 (depends on 3)

The system of claim 3, wherein the data type information element is located before a content information element.

### Claim 5 (depends on 2)

The system of claim 2, wherein data type information elements are located together, and arranged in the same or inverse order as content information elements whose data types are specified by the data type information elements.

### Claim 6 (depends on 5)

The system of claim 5, wherein the control information is located before the content information in the key.

### Claim 7 (depends on 2)

The system of claim 2, wherein the key comprises two or more key parts comprising content information of different data types.

### Claim 8 (depends on 2)

The system of claim 2, wherein at least one of the data types is a data type of fixed size.

### Claim 9 (depends on 8)

The system of claim 8, wherein the data type of fixed size is an integer, long integer, or a double precision floating point or a time/date primitive.

### Claim 10 (depends on 2)

The system of claim 2, wherein at least one of the data types is a data type of variable size.

### Claim 11 (depends on 10)

The system of claim 10, wherein the data type of variable size is a character string or a variable precision integer.

### Claim 12 (depends on 2)

The system of claim 2, wherein the information of a key part is contained by two or more key portions.

### Claim 13 (depends on 2)

The system of claim 2, wherein the data type of the content information comprised by a key part is a data type of variable size, and wherein the end of the content information element is marked by a specific symbol or by a specific bit in a specific one of the key portions containing the key part.

### Claim 14 (depends on 2)

The system of claim 2, wherein the control information comprises information identifying the last key part.

### Claim 15 (depends on 1)

The system of claim 1, wherein the control information comprises information on whether the trie is used to store a dynamic set or an associative array.

### Claim 16 (depends on 1)

The system of claim 1, wherein a parent node which has more than one child node comprises a bitmap and a number of pointers, wherein each pointer is associated with a bit set in the bitmap and points to a child node of the node.

### Claim 17 (depends on 1)

A computer-implemented method, comprising:
implementing the electronic database application or information retrieval system of claim 1, on one or more computers; and
operating the system for storing keys or keys and values, for storing result keys or keys and values of a query, and/or for storing input keys or keys and values for a query.

### Claim 18 (depends on 17)

The computer-implemented method of claim 17, wherein the key comprises one or more key parts comprising the content information, and wherein, for each of the key parts, the control information comprises a data type information element specifying a data type of the content information comprised by the key part.

### Claim 19 (depends on 1)

A non-transitory computer readable medium having instructions stored thereon that, when executed by one or more processors, cause one or more computers to implement the system of claim 1.

### Claim 20 (depends on 19)

The medium of claim 19, wherein the key comprises one or more key parts comprising the content information, and wherein, for each of the key parts, the control information comprises a data type information element specifying a data type of the content information comprised by the key part.
