<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Architecture - Best Practices - To retrieve data from database</title><link>https://community.appian.com/discussions/f/best-practices/14053/architecture---best-practices---to-retrieve-data-from-database</link><description>When i should go for direct database connection to get the data from database vs REST API to get data from database. 
 What are the pros &amp;amp; cons of each approach. Detailed help is highly appreciated.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Architecture - Best Practices - To retrieve data from database</title><link>https://community.appian.com/thread/63773?ContentTypeID=1</link><pubDate>Thu, 03 Jan 2019 04:18:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:609daeb3-907a-48b0-bf9d-b996e17d11c6</guid><dc:creator>Pravin Sawant</dc:creator><description>Thanks David for detailed reply. But about ACID properties internally REST API should take care, it&amp;#39;s not between Appian &amp;amp; REST. Let&amp;#39;s say if we are saying deposit money then that instruction to rest API should handle internally in any language. As currently happening using Angular or React, both uses REST.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Architecture - Best Practices - To retrieve data from database</title><link>https://community.appian.com/thread/63762?ContentTypeID=1</link><pubDate>Wed, 02 Jan 2019 14:55:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3d601c1f-5596-468f-85d3-70a4b3f00985</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;The only reason I would consider a service (which is going to require a completely different skill set with a separate team to create / maintain the thing) would be for data security, integrity, and transactional stablility, i.e. ACID compliance.&lt;br /&gt; &lt;br /&gt; That would render the REST service moot, because REST can&amp;#39;t handle ACID compliant transactions.&lt;br /&gt; &lt;br /&gt; So I would never replace Appian&amp;#39;s built in DB connection for a REST API. If the need arose I would, however, very strongly recommend replacing Appian&amp;#39;s built in DB connection for a SOAP API.&amp;nbsp; If you&amp;#39;re doing a bank transaction, anything with money, or things that need exceedingly strict control on the database transactions, such as all-or-nothing mandated, you would probably do well to use SOAP service instead of Appian.&amp;nbsp; In my opinion, there&amp;#39;s no condition where I&amp;#39;d rather use REST than Appian.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Architecture - Best Practices - To retrieve data from database</title><link>https://community.appian.com/thread/63760?ContentTypeID=1</link><pubDate>Wed, 02 Jan 2019 08:55:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8df73ab2-9b6b-4db2-bee3-39991cb79848</guid><dc:creator>Pravin Sawant</dc:creator><description>Thanks Amit,&lt;br /&gt;
&lt;br /&gt;
I heard from other than Appian BPM developer is always use services to get the data for best design practices. Because in case getting data from database is taking time then it BPM tool performance is hampered. If we do on Services then that load takes care by REST service. Is that true?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Architecture - Best Practices - To retrieve data from database</title><link>https://community.appian.com/thread/63758?ContentTypeID=1</link><pubDate>Wed, 02 Jan 2019 08:17:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7feb671c-33c0-4592-8ffb-fba3a98502c1</guid><dc:creator>amitm9</dc:creator><description>If you have direct database connection where required table and data available. Then better go for it, REST API not needed unnecessarily.&lt;br /&gt;
Use query rule or queryEntity() to fetch data as per your requirement again. If you need entire data then query rule is the best. Thanks.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Architecture - Best Practices - To retrieve data from database</title><link>https://community.appian.com/thread/63756?ContentTypeID=1</link><pubDate>Wed, 02 Jan 2019 07:09:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:02e4cd41-e9c0-47dc-814d-43115d622d7b</guid><dc:creator>Pravin Sawant</dc:creator><description>Thanks Paul.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Architecture - Best Practices - To retrieve data from database</title><link>https://community.appian.com/thread/63754?ContentTypeID=1</link><pubDate>Wed, 02 Jan 2019 07:00:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fe94856e-27d6-4f76-8d16-8745964dbf9c</guid><dc:creator>paulc919</dc:creator><description>I think it depends on what the architecture ground rules state for the organisation. &lt;br /&gt;
&lt;br /&gt;
Query Entity rules are the best performing option in Appian and also provide the most flexibility - but there may be organisational restrictions on direct access from Appian to external databases. REST API&amp;#39;s might be ok but again depends on payload response, performance, network hops etc. &lt;br /&gt;
&lt;br /&gt;
Where possible I&amp;#39;d opt for direct access as that is going to be better from a performance viewpoint.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Architecture - Best Practices - To retrieve data from database</title><link>https://community.appian.com/thread/63750?ContentTypeID=1</link><pubDate>Wed, 02 Jan 2019 05:47:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:434220e3-a196-4da2-8f55-d1c921227715</guid><dc:creator>Pravin Sawant</dc:creator><description>anyone can you please give input.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>