<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kaartic Sivaraam</title>
    <description>The latest articles on DEV Community by Kaartic Sivaraam (@sivaraam).</description>
    <link>https://dev.to/sivaraam</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F148836%2F3762ba7b-1c51-4dc3-9fe9-fd75e93da2e6.png</url>
      <title>DEV Community: Kaartic Sivaraam</title>
      <link>https://dev.to/sivaraam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sivaraam"/>
    <language>en</language>
    <item>
      <title>Database generic way of achieving Query Result Change Notification</title>
      <dc:creator>Kaartic Sivaraam</dc:creator>
      <pubDate>Wed, 29 Jan 2020 09:45:40 +0000</pubDate>
      <link>https://dev.to/sivaraam/database-generic-way-of-achieving-query-result-change-notification-2fef</link>
      <guid>https://dev.to/sivaraam/database-generic-way-of-achieving-query-result-change-notification-2fef</guid>
      <description>&lt;p&gt;There's a use case in which we would like a Java application to know when a result of a SELECT query changes as a consequence of a DML update in a database. On exploration, this seems to be achievable in the Oracle database using Oracle's "&lt;a href="https://docs.oracle.com/cd/E11882_01/appdev.112/e41502/adfns_cqn.htm#ADFNS546"&gt;&lt;em&gt;Query Result Change Notification&lt;/em&gt;&lt;/a&gt;" (at least with some limitations). As changing the datastore to Oracle database is not an option, we are looking for a solution that works with the following databases:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;PostgreSQL&lt;/li&gt;
&lt;li&gt;MySQL&lt;/li&gt;
&lt;li&gt;MS SQL Server&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Further exploration reveled that MS SQL Server has "&lt;a href="https://docs.microsoft.com/en-us/sql/relational-databases/native-client/features/working-with-query-notifications?view=sql-server-ver15"&gt;&lt;em&gt;Query Notifications&lt;/em&gt;&lt;/a&gt;" which is similar to Oracle's "&lt;em&gt;Query Result Change Notification&lt;/em&gt;". PostgreSQL and MySQL equivalents could not be found.&lt;/p&gt;

&lt;p&gt;Coming to the question, what could be a (possibly efficient) way to achieve this in PostgreSQL and MySQL databases? Is there any Java library that helps us know when a SELECT query result changes as a consequence of a DML update in a database?&lt;/p&gt;

&lt;p&gt;PS: I've tried to provide enough information in the question. In case any information is required, kindly let me know.&lt;/p&gt;

</description>
      <category>help</category>
      <category>database</category>
      <category>sql</category>
      <category>java</category>
    </item>
  </channel>
</rss>
