# US 2017/0293619 A1 · Simulating data definition triggers in a database system

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

- Number: US 2017/0293619 A1
- Document ID: US20170293619A1
- Status: Published application
- Kind: A1
- Application number: 15/277,838
- Filed: 2016-09-27
- Published: 2017-10-12
- Earliest claimed: 2016-04-11
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: AVINASH DUBEY; ASHISH KUMAR; ANDRAS BELOKOSZTOLSZKI; VINAY SACHDEV
- Web page: https://patentgrep.com/patent/US20170293619A1

## CPC

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

## Abstract

Techniques are described herein for simulating triggers in a database. A database server receives a query that targets a database managed by the database server. The database server is registered with a plugin that determines whether the query is a particular type of query. If so, plugin sends a message to an external process that includes features of the query. The database server can also execute the query regardless of whether the particular type of query is detected.

## Claims

### Claim 1

A method comprising:
receiving, at a database server, a first query that targets a first database managed by the database server;
determining, by a plugin registered with the database server, whether the first query is a first type of query;
in response to determining that the first query is the first type of query, sending a message to a process that is external to the database server, wherein the message includes one or more features based on the first query; and
executing, at the database server, the first query.

### Claim 2 (depends on 1)

The method of claim 1 wherein:
the first type of query is a DDL query that targets a particular table in the first database;
the particular table has a first structure prior to execution of the DDL query and a second structure after execution of the DDL query; and
the one or more features indicate information about the second structure of the particular table.

### Claim 3 (depends on 1)

The method of claim 1 wherein sending the message includes sending a message to cause an operation to be performed in a second database that is different than the first database.

### Claim 4 (depends on 1)

The method of claim 1, wherein:
a particular feature of the one or more features identifies a particular table in the first database with a first schema;
the first query, when executed by the database server, produces a second schema for the particular table in the first database;
the second schema is different than the first schema;
the method further comprises:
in response to receiving the message, the process that is external to the database server sending, to the database server, a second query that causes the database server to store a record in a second table;
wherein the record includes data that defines the second schema.

### Claim 5 (depends on 4)

The method of claim 4 comprising:
in response to the second query, updating a transaction log with data from the record;
based on the transaction log, generating a trail file; and
using the trail file to duplicate at least a portion of the first database.

### Claim 6 (depends on 1)

The method of claim 1 further comprising the process that is external to the database server performing:
generating a new query based on the one or more features; and
sending the new query to a database server, wherein the new query includes information that is based on the one or more features.

### Claim 7 (depends on 1)

The method of claim 1, wherein determining whether the first query is the first type of query comprises determining that the first query, when executed by the database server, modifies a schema of the first database.

### Claim 8 (depends on 1)

The method of claim 1, wherein determining whether the first query is the first type of query comprises determining that the first query comprises one or more particular keywords.

### Claim 9 (depends on 1)

The method of claim 1, wherein the database server and the process that is external to the database server are executed on different computers.

### Claim 10 (depends on 1)

The method of claim 1, further comprising, in response to determining that the first query is the first type of query, sending a notification to a user identifying the first type of query and one or more actions available to the user.

### Claim 11 (depends on 10)

The method of claim 10, wherein the one or more actions are based on the first type of query.

### Claim 12

One or more non-transitory computer-readable media having stored thereon instructions which, when executed by one or more computing devices, cause a database server to perform:
receiving a first query that targets a first database managed by the database server;
determining, by a plugin registered with the database server, whether the first query is a first type of query;
in response to determining that the first query is the first type of query, sending a message to a process that is external to the database server, wherein the message includes one or more features based on the first query; and
executing the first query.

### Claim 13 (depends on 12)

The one or more non-transitory computer-readable media of claim 12 wherein:
the first type of query is a DDL query that targets a particular table in the first database;
the particular table has a first structure prior to execution of the DDL query and a second structure after execution of the DDL query; and
the one or more features indicate information about the second structure of the particular table.

### Claim 14 (depends on 12)

The one or more non-transitory computer-readable media of claim 12 wherein sending the message includes sending a message to cause an operation to be performed in a second database that is different than the first database.

### Claim 15 (depends on 12)

The one or more non-transitory computer-readable media of claim 12, wherein:
a particular feature of the one or more features identifies a particular table in the first database with a first schema;
the first query, when executed, produces a second schema for the particular table in the first database;
the second schema is different than the first schema;
in response to receiving the message, the process that is external to the database server is configured to send, to the database server, a second query that causes the database server to store a record in a second table; and
the record includes data that defines the second schema.

### Claim 16 (depends on 15)

The one or more non-transitory computer-readable media of claim 15 further having stored thereon instructions which, when executed by one or more computing devices, cause the database server to perform:
in response to the second query, updating a transaction log with data from the record;
based on the transaction log, generating a trail file; and
using the trail file to duplicate at least a portion of the first database.

### Claim 17 (depends on 12)

The one or more non-transitory computer-readable media of claim 12, the process that is external to the database server performing:
generating a new query based on the one or more features; and
sending the new query to a database server, wherein the new query includes information that is based on the one or more features.

### Claim 18 (depends on 12)

The one or more non-transitory computer-readable media of claim 12, wherein determining whether the first query is the first type of query comprises determining that the first query, when executed, modifies a schema of the first database.

### Claim 19 (depends on 12)

The one or more non-transitory computer-readable media of claim 12, wherein determining whether the first query is the first type of query comprises determining that the first query comprises one or more particular keywords.

### Claim 20 (depends on 12)

The one or more non-transitory computer-readable media of claim 12, wherein the database server and the process that is external to the database server are executed on different computers.
