JavaScript Stored Procedure Deployment via Atomic Bundles

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing database management systems face challenges in deploying and managing stored procedures and user-defined functions due to vendor-specific languages, complexity in managing dependencies, and limitations in using modern programming languages, which hinder developer productivity and lead to issues like vendor lock-in and difficulty in tracking code changes.

Innovation Solution

The technique involves bundling JavaScript modules into a single atomic unit and automatically generating SQL call specifications from typed declarations, allowing for the deployment of JavaScript and TypeScript stored procedures and user-defined functions into a database management system, leveraging modern development tools and version control systems, and avoiding conflicts by managing dependencies outside the database.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If vendor-specific stored procedure languages (e.g., PL/SQL, Transact-SQL) are used, then stored procedures can be executed inside the database address space avoiding network round trips, but the languages are proprietary, developers are scarce, and tool support is lacking

Engineering Contradiction:
Improvenetwork round trip timeVSAvoidlanguage portability
Core Design Contradiction:
Loss of timeVSAdaptability or versatility

Solution Approach 1:

The patent enables the database management system to execute stored procedures written in multiple programming languages (Java, C#, Python, Ruby, Perl, PHP, JavaScript, etc.) in addition to traditional SQL. This is achieved through a language execution environment that can dynamically load and execute procedures in various languages, making the database system universal and language-agnostic while maintaining the performance benefit of in-database execution

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Ease of operation

If stored procedures are stored in the database, then they can be executed directly, but they become harder to track within version control systems

Engineering Contradiction:
Improvedirect executionVSAvoidcode version control
Core Design Contradiction:
Ease of operationVSLoss of information

Solution Approach 1:

The patent extracts stored procedure code from the database storage and allows it to be maintained in external version control systems. The system loads procedure code dynamically from these external sources at runtime, separating the code repository from the database while maintaining direct execution capability. This enables developers to track changes using standard version control tools while the database can still execute the procedures directly

Inventive Principle:
Principle #2Taking out (Extraction)

3Productivity

If stored procedures are written in modern programming languages, then developer productivity increases and modern development tools can be used, but managing dependencies and libraries becomes more complex

Engineering Contradiction:
Improvedeveloper productivityVSAvoiddependency management
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent merges the dependency management system with the database management system itself. The database includes a package manager that automatically resolves, downloads, and installs required libraries and dependencies for stored procedures written in modern languages. This integration simplifies dependency management by combining it with the procedure execution environment, allowing developers to use modern languages and tools without bearing the full burden of complex dependency resolution

Inventive Principle:
Principle #5Merging (Combining)

4Adaptability or versatility

If arbitrary Java classes are loaded into the database using tools like loadjava, then Java libraries can be used and large-scale procedures can be implemented, but conflicting Java classes from different JAR files can cause errors

Engineering Contradiction:
Improvelibrary usageVSAvoidclass conflicts
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent implements a feedback mechanism through its package manager that automatically detects, resolves, and manages conflicts between different Java classes from multiple JAR files. The system monitors class definitions across loaded libraries and provides feedback to resolve naming conflicts, version mismatches, and dependency issues, preventing the errors that would otherwise occur when conflicting classes are loaded into the database

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS11360976B2Deployment of javascript and typescript stored procedures and user-defined functions into database management systems
Publication Date: 2022.06.14 ORACLE INT CORP
  • US11360976B2 patent drawing
  • US11360976B2 patent drawing
  • US11360976B2 patent drawing

AI summary

Herein are computerized techniques for deploying JavaScript and TypeScript stored procedures and user-defined functions into a database management system (DBMS). In an embodiment, a computer generates a SQL call specification for each subroutine of one or more subroutines encoded in a scripting language. The generating is based on a signature declaration of the subroutine. Each subroutine comprises a definition of a stored procedure or a user-defined function. The computer packages the definition and the SQL call specification of each subroutine into a single bundle file. The definition and the SQL call specification of each subroutine are deployed into a DBMS from the single bundle file. Eventually, the SQL call specification of at least one subroutine is invoked to execute the definition of the subroutine in the DBMS.