Database query using a user-defined function

US9244999B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-9244999-B2
Application numberUS-201313744676-A
CountryUS
Kind codeB2
Filing dateJan 18, 2013
Priority dateFeb 27, 2012
Publication dateJan 26, 2016
Grant dateJan 26, 2016

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

A database query by using a user-defined function (UDF) is provided. A computer-implemented method for performing the database query by using the UDF includes detecting whether a command for invoking the UDF to transmit a parameter value has been received. Based on detecting that the command for invoking the UDF to transmit the parameter value has been received: a first interface of the UDF is started; the parameter value is received through the first interface; and the received parameter value is transmitted to an external data source. The method further includes returning to detecting whether the command for invoking the UDF to transmit the parameter value has been received.

First claim

Opening claim text (preview).

What is claimed is: 1. A computer-implemented method for performing a database query by using a user-defined function (UDF), comprising: detecting whether a command for invoking the UDF, by a relational database management system (RDBMS), to transmit a parameter value has been received; based on detecting that the command for invoking the UDF to transmit the parameter value has been received: starting a first interface that is a transmitting interface of the UDF; receiving the parameter value through the first interface; transmitting the received parameter value through the first interface to an external data source; and returning to detecting whether the command for invoking the UDF to transmit the parameter value has been received; detecting whether data can be received; based on detecting that the data can be received: starting a second interface that is a receiving interface of the UDF, the second interface operating asynchronously with respect to the first interface, and the first and second interfaces are threads of the UDF created by the RDBMS; creating, by the RDBMS, a buffer in the UDF at runtime; receiving the data from the external data source through the second interface, wherein the received data is obtained from the external data source in response to the transmitting of the received parameter value to the external data source through the first interface; and storing, by the second interface, the data received from the external data source into the buffer; detecting whether stored data has been received from the external source based on monitoring the buffer; and based on detecting that the stored data has been received from the external data source, providing the data received from the external data source by copying contents of the buffer. 2. The computer-implemented method of claim 1 , further comprising: removing the data received from the external data source which has been provided. 3. The computer-implemented method of claim 1 , wherein the UDF returns to detecting whether the command for invoking the UDF to transmit the parameter value has been received without waiting for the data to be received by the second interface of the UDF in response to transmitting the received parameter value through the first interface to the external data source. 4. The computer-implemented method of claim 1 , wherein the external data source is a not-only structured query language (NoSQL) system. 5. A system for performing a database query by using a user-defined function (UDF), comprising: a detecting unit configured to detect whether a command for invoking the UDF, by a relational database management system (RDBMS), to transmit a parameter value is received and whether data can be received; a transmitting unit configured to perform, in response to determining that the detecting unit detects the command for invoking the UDF to transmit a parameter value: start a first interface that is a transmitting interface of the UDF; receive a parameter value through the first interface; and transmit the received parameter value through the first interface to the external data source; a returning unit configured to return to detect whether the command for invoking the UDF to transmit a parameter is received; an obtaining unit configured to perform, in response to determining that the detecting unit detects that the data can be received: start a second interface that is a receiving interface of the UDF, the second interface operating asynchronously with respect to the first interface, and the first and second interfaces are threads of the UDF created by the RDBMS; and receive data from the external data source through the second interface, wherein the received data is obtained from the external data source in response to the transmitting of the received parameter value to the external data source through the first interface; a storing unit configured to store, by the second interface, the data received from the external data source into a buffer, wherein the RDBMS creates the buffer in the UDF at runtime; wherein the detecting unit is further configured to detect whether there is stored data received from the external data source based on monitoring the buffer; and a providing unit configured to provide the data received from the external data source, in response to determining that the detecting unit detects that there is stored data received from the external data source by copying contents of the buffer. 6. The system of claim 5 , further comprising: a removing unit configured to remove the data received from the external data source which has been provided. 7. The system of claim 3 , wherein the system returns to detecting whether the command for invoking the UDF to transmit the parameter value has been received without waiting for the data to be received by the second interface of the UDF in response to transmitting the received parameter value through the first interface to the external data source. 8. The system of claim 5 , wherein the external data source is a not-only structured query language (NoSQL) system. 9. A computer program product for performing a database query by using a user-defined function (UDF), the computer program product comprising: a computer readable storage medium having computer readable program code embodied therewith, the computer readable program code comprising computer readable program code configured to perform a method comprising: detecting whether a command for invoking the UDF, by a relational database management system (RDBMS), to transmit a parameter value has been received; based on detecting that the command for invoking the UDF to transmit the parameter value has been received: starting a first interface that is a transmitting interface of the UDF; receiving the parameter value through the first interface; transmitting the received parameter value through the first interface to an external data source; and returning to detecting whether the command for invoking the UDF to transmit the parameter value has been received; detecting whether data can be received; based on detecting that the data can be received: starting a second interface that is a receiving interface of the UDF, the second interface operating asynchronously with respect to the first interface, and the first and second interfaces are threads of the UDF created by the RDBMS; creating, by the RDBMS, a buffer in the UDF at runtime; receiving the data from the external data source through the second interface, wherein the received data is obtained from the external data source in response to the transmitting of the received parameter value to the external data source through the first interface; and storing, by the second interface, the data received from the external data source into the buffer; detecting whether stored data has been received from the external data source based on monitoring the buffer; and based on detecting that the stored data has been received from the external data source, providing the data received from the external data source by copying contents of the buffer. 10. The computer program product of claim 9 , further comprising: removing the data received from the external data source which has been provided. 11. The computer program product of claim 9 , wherein the UDF returns to detecting whether the command for invoking the UDF to transmit the parameter value has been received without waiting for the data to be received by the second interface of the UDF in response to transmitting the received parameter value through the first interface to the external data source. 12. The computer program pro

Assignees

Inventors

Classifications

  • G06F16/284Primary

    Relational databases · CPC title

  • Integrating or interfacing systems involving database management systems · CPC title

  • Physics · mapped topic

  • Physics · mapped topic

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US9244999B2 cover?
A database query by using a user-defined function (UDF) is provided. A computer-implemented method for performing the database query by using the UDF includes detecting whether a command for invoking the UDF to transmit a parameter value has been received. Based on detecting that the command for invoking the UDF to transmit the parameter value has been received: a first interface of the UDF is …
Who is the assignee on this patent?
IBM
What technology area does this patent fall under?
Primary CPC classification G06F16/284. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Jan 26 2016 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 8 related publications on this page (citations in our corpus or others sharing the same primary CPC).