Matrix Operations in Relational Databases via Cache Partitioning

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional Relational Database systems are inefficient in performing Matrix-Related Operations such as Matrix Multiplication and Transpose, which are essential for modern applications like Machine Learning and Deep Learning, due to their reliance on Set Theoretic and Relational operators that lead to high computational costs.

Innovation Solution

The implementation of Matrix Data Sets that are partitioned to reduce data copying and optimized for parallel processing, allowing Matrix Operations to be performed directly in CPU caches, and integrating Matrix Algebra into database query optimizers to enhance processing efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If conventional Set Theoretic and Relational operators are used in Relational Database systems, then the systems can maintain compatibility with traditional database operations, but the computational cost for Matrix-Related Operations becomes excessively high

Engineering Contradiction:
Improvecompatibility with traditional database operationsVSAvoidcomputational cost
Core Design Contradiction:
Adaptability or versatilityVSLoss of energy

Solution Approach 1:

The patent segments matrix operations into distinct phases (parsing, optimization, execution) and separates matrix-related operations from traditional relational operations. Matrix operations are handled by specialized code paths rather than generic relational operators, reducing computational overhead while maintaining compatibility through a unified query interface.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary layer in the query optimizer that detects and transforms matrix operations into optimized execution plans. This intermediary identifies matrix multiplication patterns in the query graph and applies specialized optimization rules before code generation, bridging between traditional SQL semantics and efficient matrix computation.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of operation

If Matrix Operations are performed using conventional Relational operators, then the operations can be executed in existing database engines, but the processing efficiency is significantly reduced

Engineering Contradiction:
Improveexecution in existing database enginesVSAvoidprocessing efficiency
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent changes the operational parameters of matrix computations by detecting patterns like matrix multiplication in the query graph and transforming them into optimized execution plans with different computational parameters. This includes selecting appropriate algorithms, data layouts, and parallelization strategies specific to matrix operations rather than generic relational processing.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent introduces dynamic code generation that adapts the execution plan based on the specific matrix operation detected. The system dynamically selects between different implementation strategies (e.g., block multiplication, stride optimization, parallel execution) based on the operation characteristics, maintaining ease of use while maximizing processing efficiency.

Inventive Principle:
Principle #15Dynamics

3Device complexity

If data is not partitioned for Matrix Operations, then the implementation is simpler, but data copying overhead increases significantly

Engineering Contradiction:
Improveimplementation complexityVSAvoiddata copying overhead
Core Design Contradiction:
Device complexityVSLoss of energy

Solution Approach 1:

The patent segments matrix data into blocks or tiles that can be processed independently and kept in CPU caches during computation. This segmentation reduces the need for repeated data copying from main memory to processors, as blocked data access patterns allow efficient cache utilization. The segmentation is implemented through optimized code generation that works with partitioned matrix data structures.

Inventive Principle:
Principle #1Segmentation

4Device complexity

If Matrix Algebra is not integrated into database query optimizers, then the system architecture remains simpler, but processing efficiency for Matrix-Related operations is not enhanced

Engineering Contradiction:
Improvesystem architecture complexityVSAvoidprocessing efficiency
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent introduces an intermediary layer in the query optimizer that understands Matrix Algebra semantics. This intermediary analyzes the query graph to identify matrix operations, transforms them into optimized representation, and generates specialized execution code. The integration maintains relatively simple architecture by adding this intermediary layer rather than fundamentally redesigning the optimizer, while achieving significant processing efficiency improvements.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS20210303574A1Matrix-related operations in relational databases systems including massively parallel processing systems
Publication Date: 2021.09.30 TERADATA US INC
  • US20210303574A1 patent drawing
  • US20210303574A1 patent drawing
  • US20210303574A1 patent drawing

AI summary

Improved techniques for performing Matrix-Related operations (e.g., Matrix Multiplication, Matrix Transpose) in Relational Database systems are disclosed. Techniques provide Matrix Data Sets for performing Matrix-Related operations in Relational Databases more efficiently than conventional techniques. By way of example, Matrix Data can be partitioned such that data each partition can be processed directly in a cache memory of a processor thereby reducing the need for copying data as it is conventionally done in Relational Databases. In addition, database queries involving Matrix-Related operations can be optimized for a Relational Database by providing Matrix Operations that can be directly used as declarative statements in a Database Query language (e.g., SQL). Furthermore, database query optimizers of a Relational Database can be further enhanced by allowing them to consider Matrix Algebra, as well as other opportunities in processing Matrix-related operation, possibly in connection of one or more the facets of the improved techniques.