SlideShare a Scribd company logo
DATABASE INTEGRATE
WITH MULE
MULE HAS INTRODUCED IT’S NEW JDBC COMPONENT
RECENTLY WHICH ALLOW USTO CONNECT ALMOST WITH
ALMOST ANY JAVA DATABASE CONNECTIVITY (JDBC)
RELATIONAL DATABASE USING A SINGLE INTERFACE FOR
EVERY CASE.
IT ALSO RUN DIVERSE SQL OPERATIONS ON OUR DATABASE,
INCLUDING SELECT, INSERT, UPDATE, DELETE, AND EVEN
STORED PROCEDURES.
SOWE CAN SAYTHAT ALMOST ALLTYPE OF DB OPERATION
CAN BE DONE HERE SMOOTHLY WITHTHIS NEW COMPONENT
We I will give you few small demo here on how to operate with this new
component.
Let’s consider we have the following simple Mule flow :-
As you can see we have used the new DB connecter to fetch the Data from
Database and display the data in an XML format in logger
The new Database component is of 3 query type :
• Parameterized
• Dynamic
• FromTemplate
For more info.. Please visit :-
http://www.mulesoft.org/documentation/display/current/Database+C
onnector
Configuring the Database
For configuring the database, we need to configure the global database connector
with your existing DB as follows :-
<db:generic-config name="Generic_Database_Configuration"
url="jdbc:sqlserver://ANIRBAN-
PCSQLEXPRESS:1433;databaseName=Anirban;user=sa;password=******"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
doc:name="Generic DatabaseConfiguration" />
The above code is a sample of connecting Mule with SQL server database.
Now there are various ways to use this new component….
I will show you small examples here
Configuring a From-Template Query
You can use a template to pre-define an SQL query that you can
use and reuse in your application's flows.
It enables you to define a query statement once, in a global element
in your application (globalTemplate Query ), then reuse the query
multiple times whenever required
<db:template-query name=“simpleQuery" doc:name="Template Query">
<db:parameterized-query >select * from table1 </db:parameterized-query>
</db:template-query>
<db:select config-ref="Generic_Database_Configuration"
doc:name="Database">
<db:template-query-ref name="withoutParameter"/>
</db:select>
And referring the template in the Mule flow as follows :-
Dynamic query :
Mule replaces all MEL expressions in the query with the result of the
expression evaluation, then sends the result to the database. As such, you are
responsible for making sure that any string in your query statement is
interpretable by the database (i.e. quoting strings, data formatting, etc.)
<db:select config-ref="Generic_Database_Configuration" doc:name="Database">
<db:dynamic-query><![CDATA[select * from table1]]>
</db:dynamic-query>
</db:select>
Above example shows the use of dynamic query
Parameterized query :
Mule replaces all Mule Expression Language (MEL) expressions inside a query
with "?" to create a prepared statement, then evaluates the MEL expressions
using the current event so as to obtain the value for each parameter.
<db:select config-ref="Generic_Database_Configuration" doc:name="Database">
<db:parameterized-query><![CDATA[select * from table1 where
Id=23]]></db:parameterized-query>
</db:select>
Above example shows the use of Parameterized query
Stored procedure:
This new jdbc component can also execute stored procedure as follows :-
<db:stored-procedure config-ref="Generic_Database_Configuration">
<db:parameterized-query>{ call selectData() }</db:parameterized-query>
</db:stored-procedure>
Above example shows the use of stored procedure where selectData() is a stored
procedure

More Related Content

What's hot

Mule database connector
Mule database connectorMule database connector
Mule database connector
Ankush Sharma
 
Jdbc
JdbcJdbc
DataBase Connectivity
DataBase ConnectivityDataBase Connectivity
DataBase Connectivity
Akankshaji
 
Jdbc
JdbcJdbc
Java database connectivity
Java database connectivityJava database connectivity
Java database connectivity
Atul Saurabh
 
MuleSoft ESB - CSV File to Database
MuleSoft ESB - CSV File to DatabaseMuleSoft ESB - CSV File to Database
MuleSoft ESB - CSV File to Database
akashdprajapati
 
Mule mel 5_tips
Mule mel 5_tipsMule mel 5_tips
Mule mel 5_tips
kunal vishe
 
Mule esb :Data Weave
Mule esb :Data WeaveMule esb :Data Weave
Mule esb :Data Weave
AnilKumar Etagowni
 
My sql with java
My sql with javaMy sql with java
My sql with java
oly07104
 
JDBC ppt
JDBC pptJDBC ppt
JDBC ppt
Rohit Jain
 
Parameters as a part of body
Parameters as a part of bodyParameters as a part of body
Parameters as a part of body
Anirban Sen Chowdhary
 
MuleSoft ESB Message Enricher
MuleSoft ESB Message Enricher MuleSoft ESB Message Enricher
MuleSoft ESB Message Enricher
akashdprajapati
 
Jdbc
JdbcJdbc
Query transport problems
Query transport problemsQuery transport problems
Query transport problems
Igor Prudnecionok
 
Mule with jdbc(my sql)
Mule with jdbc(my sql)Mule with jdbc(my sql)
Mule with jdbc(my sql)
charan teja R
 
Mule jdbc
Mule   jdbcMule   jdbc
Mule jdbc
KalaimathiS
 
Lecture 1. java database connectivity
Lecture 1. java database connectivityLecture 1. java database connectivity
Lecture 1. java database connectivity
Waheedullah Suliman Khail
 
Mule new jdbc component
Mule new jdbc componentMule new jdbc component
Mule new jdbc component
Anirban Sen Chowdhary
 
Caching and invalidating with managed store
Caching and invalidating with managed storeCaching and invalidating with managed store
Caching and invalidating with managed store
Anirban Sen Chowdhary
 
Mule with drools
Mule with droolsMule with drools
Mule with drools
F K
 

What's hot (20)

Mule database connector
Mule database connectorMule database connector
Mule database connector
 
Jdbc
JdbcJdbc
Jdbc
 
DataBase Connectivity
DataBase ConnectivityDataBase Connectivity
DataBase Connectivity
 
Jdbc
JdbcJdbc
Jdbc
 
Java database connectivity
Java database connectivityJava database connectivity
Java database connectivity
 
MuleSoft ESB - CSV File to Database
MuleSoft ESB - CSV File to DatabaseMuleSoft ESB - CSV File to Database
MuleSoft ESB - CSV File to Database
 
Mule mel 5_tips
Mule mel 5_tipsMule mel 5_tips
Mule mel 5_tips
 
Mule esb :Data Weave
Mule esb :Data WeaveMule esb :Data Weave
Mule esb :Data Weave
 
My sql with java
My sql with javaMy sql with java
My sql with java
 
JDBC ppt
JDBC pptJDBC ppt
JDBC ppt
 
Parameters as a part of body
Parameters as a part of bodyParameters as a part of body
Parameters as a part of body
 
MuleSoft ESB Message Enricher
MuleSoft ESB Message Enricher MuleSoft ESB Message Enricher
MuleSoft ESB Message Enricher
 
Jdbc
JdbcJdbc
Jdbc
 
Query transport problems
Query transport problemsQuery transport problems
Query transport problems
 
Mule with jdbc(my sql)
Mule with jdbc(my sql)Mule with jdbc(my sql)
Mule with jdbc(my sql)
 
Mule jdbc
Mule   jdbcMule   jdbc
Mule jdbc
 
Lecture 1. java database connectivity
Lecture 1. java database connectivityLecture 1. java database connectivity
Lecture 1. java database connectivity
 
Mule new jdbc component
Mule new jdbc componentMule new jdbc component
Mule new jdbc component
 
Caching and invalidating with managed store
Caching and invalidating with managed storeCaching and invalidating with managed store
Caching and invalidating with managed store
 
Mule with drools
Mule with droolsMule with drools
Mule with drools
 

Viewers also liked

Input and output flow using http and java component
Input and output flow using http and java componentInput and output flow using http and java component
Input and output flow using http and java component
Son Nguyen
 
Sending mail in mule
Sending mail in muleSending mail in mule
Sending mail in mule
Son Nguyen
 
Input and output flow with logger component
Input and output flow with logger componentInput and output flow with logger component
Input and output flow with logger component
Son Nguyen
 
Integrate to retrieve data microsoft azure
Integrate to retrieve data microsoft azureIntegrate to retrieve data microsoft azure
Integrate to retrieve data microsoft azure
Son Nguyen
 
Basic example using file connector in anypoint studio
Basic example using file connector in anypoint studioBasic example using file connector in anypoint studio
Basic example using file connector in anypoint studio
prudhvivreddy
 
H2O - the optimized HTTP server
H2O - the optimized HTTP serverH2O - the optimized HTTP server
H2O - the optimized HTTP server
Kazuho Oku
 

Viewers also liked (6)

Input and output flow using http and java component
Input and output flow using http and java componentInput and output flow using http and java component
Input and output flow using http and java component
 
Sending mail in mule
Sending mail in muleSending mail in mule
Sending mail in mule
 
Input and output flow with logger component
Input and output flow with logger componentInput and output flow with logger component
Input and output flow with logger component
 
Integrate to retrieve data microsoft azure
Integrate to retrieve data microsoft azureIntegrate to retrieve data microsoft azure
Integrate to retrieve data microsoft azure
 
Basic example using file connector in anypoint studio
Basic example using file connector in anypoint studioBasic example using file connector in anypoint studio
Basic example using file connector in anypoint studio
 
H2O - the optimized HTTP server
H2O - the optimized HTTP serverH2O - the optimized HTTP server
H2O - the optimized HTTP server
 

Similar to Database integrate with mule

Mule jdbc
Mule   jdbcMule   jdbc
OpenDMS - the first 2 weeks
OpenDMS - the first 2 weeksOpenDMS - the first 2 weeks
OpenDMS - the first 2 weeks
JPC Hanson
 
Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)
Lucas Jellema
 
Introduction to sql server
Introduction to sql serverIntroduction to sql server
Introduction to sql server
Vinay Thota
 
MyBatis
MyBatisMyBatis
MyBatis
Roman Dovgan
 
Liquibase for java developers
Liquibase for java developersLiquibase for java developers
Liquibase for java developers
Illia Seleznov
 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12
kaashiv1
 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12
kaashiv1
 
Ebook12
Ebook12Ebook12
Ebook12
kaashiv1
 
Mule connectors-session1
Mule connectors-session1Mule connectors-session1
Mule connectors-session1
Vishnukanth Rachineni
 
TSQL in SQL Server 2012
TSQL in SQL Server 2012TSQL in SQL Server 2012
TSQL in SQL Server 2012
Eduardo Castro
 
Sql interview question part 8
Sql interview question part 8Sql interview question part 8
Sql interview question part 8
kaashiv1
 
Ebook8
Ebook8Ebook8
Ebook8
kaashiv1
 
Mule database connector
Mule database connectorMule database connector
Mule database connector
D.Rajesh Kumar
 
Mule connectors-part 1
Mule connectors-part 1Mule connectors-part 1
Mule connectors-part 1
VirtusaPolaris
 
Mule ESB Components
Mule ESB Components Mule ESB Components
Mule ESB Components
pat_91
 
Mule data bases
Mule data basesMule data bases
Mule data bases
Naresh Naidu
 
J2EE pattern 5
J2EE pattern 5J2EE pattern 5
J2EE pattern 5
Naga Muruga
 
Overview Of JDBC
Overview Of JDBCOverview Of JDBC
Overview Of JDBC
Mindfire Solutions
 
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data TablesPostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
Sperasoft
 

Similar to Database integrate with mule (20)

Mule jdbc
Mule   jdbcMule   jdbc
Mule jdbc
 
OpenDMS - the first 2 weeks
OpenDMS - the first 2 weeksOpenDMS - the first 2 weeks
OpenDMS - the first 2 weeks
 
Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)
 
Introduction to sql server
Introduction to sql serverIntroduction to sql server
Introduction to sql server
 
MyBatis
MyBatisMyBatis
MyBatis
 
Liquibase for java developers
Liquibase for java developersLiquibase for java developers
Liquibase for java developers
 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12
 
Sql interview question part 12
Sql interview question part 12Sql interview question part 12
Sql interview question part 12
 
Ebook12
Ebook12Ebook12
Ebook12
 
Mule connectors-session1
Mule connectors-session1Mule connectors-session1
Mule connectors-session1
 
TSQL in SQL Server 2012
TSQL in SQL Server 2012TSQL in SQL Server 2012
TSQL in SQL Server 2012
 
Sql interview question part 8
Sql interview question part 8Sql interview question part 8
Sql interview question part 8
 
Ebook8
Ebook8Ebook8
Ebook8
 
Mule database connector
Mule database connectorMule database connector
Mule database connector
 
Mule connectors-part 1
Mule connectors-part 1Mule connectors-part 1
Mule connectors-part 1
 
Mule ESB Components
Mule ESB Components Mule ESB Components
Mule ESB Components
 
Mule data bases
Mule data basesMule data bases
Mule data bases
 
J2EE pattern 5
J2EE pattern 5J2EE pattern 5
J2EE pattern 5
 
Overview Of JDBC
Overview Of JDBCOverview Of JDBC
Overview Of JDBC
 
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data TablesPostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
 

More from Son Nguyen

Wsdl connector introduction
Wsdl connector introductionWsdl connector introduction
Wsdl connector introduction
Son Nguyen
 
Android intergrate with mule
Android intergrate with muleAndroid intergrate with mule
Android intergrate with mule
Son Nguyen
 
Mule flow overview
Mule flow overviewMule flow overview
Mule flow overview
Son Nguyen
 
Mule flow and filter
Mule flow and filterMule flow and filter
Mule flow and filter
Son Nguyen
 
Handle exceptions in mule
Handle exceptions in muleHandle exceptions in mule
Handle exceptions in mule
Son Nguyen
 
Spring security integrate with mule
Spring security integrate with muleSpring security integrate with mule
Spring security integrate with mule
Son Nguyen
 
Message processor in mule
Message processor in muleMessage processor in mule
Message processor in mule
Son Nguyen
 
Expression language in mule
Expression language in muleExpression language in mule
Expression language in mule
Son Nguyen
 
Mule with data weave
Mule with data weaveMule with data weave
Mule with data weave
Son Nguyen
 
Using spring scheduler mule
Using spring scheduler muleUsing spring scheduler mule
Using spring scheduler mule
Son Nguyen
 
Composite source in bound and out-bound
Composite source in bound and out-boundComposite source in bound and out-bound
Composite source in bound and out-bound
Son Nguyen
 
Batch job processing
Batch job processingBatch job processing
Batch job processing
Son Nguyen
 
Using message enricher
Using message enricherUsing message enricher
Using message enricher
Son Nguyen
 
Finance connectors with mule
Finance connectors with muleFinance connectors with mule
Finance connectors with mule
Son Nguyen
 
Google drive connection
Google drive connectionGoogle drive connection
Google drive connection
Son Nguyen
 
Using properties in mule
Using properties in muleUsing properties in mule
Using properties in mule
Son Nguyen
 
Mule integrate with microsoft
Mule integrate with microsoftMule integrate with microsoft
Mule integrate with microsoft
Son Nguyen
 
Jms queue
Jms queueJms queue
Jms queue
Son Nguyen
 
Anypoint connectors
Anypoint connectorsAnypoint connectors
Anypoint connectors
Son Nguyen
 
Mule esb basic introduction
Mule esb basic introductionMule esb basic introduction
Mule esb basic introduction
Son Nguyen
 

More from Son Nguyen (20)

Wsdl connector introduction
Wsdl connector introductionWsdl connector introduction
Wsdl connector introduction
 
Android intergrate with mule
Android intergrate with muleAndroid intergrate with mule
Android intergrate with mule
 
Mule flow overview
Mule flow overviewMule flow overview
Mule flow overview
 
Mule flow and filter
Mule flow and filterMule flow and filter
Mule flow and filter
 
Handle exceptions in mule
Handle exceptions in muleHandle exceptions in mule
Handle exceptions in mule
 
Spring security integrate with mule
Spring security integrate with muleSpring security integrate with mule
Spring security integrate with mule
 
Message processor in mule
Message processor in muleMessage processor in mule
Message processor in mule
 
Expression language in mule
Expression language in muleExpression language in mule
Expression language in mule
 
Mule with data weave
Mule with data weaveMule with data weave
Mule with data weave
 
Using spring scheduler mule
Using spring scheduler muleUsing spring scheduler mule
Using spring scheduler mule
 
Composite source in bound and out-bound
Composite source in bound and out-boundComposite source in bound and out-bound
Composite source in bound and out-bound
 
Batch job processing
Batch job processingBatch job processing
Batch job processing
 
Using message enricher
Using message enricherUsing message enricher
Using message enricher
 
Finance connectors with mule
Finance connectors with muleFinance connectors with mule
Finance connectors with mule
 
Google drive connection
Google drive connectionGoogle drive connection
Google drive connection
 
Using properties in mule
Using properties in muleUsing properties in mule
Using properties in mule
 
Mule integrate with microsoft
Mule integrate with microsoftMule integrate with microsoft
Mule integrate with microsoft
 
Jms queue
Jms queueJms queue
Jms queue
 
Anypoint connectors
Anypoint connectorsAnypoint connectors
Anypoint connectors
 
Mule esb basic introduction
Mule esb basic introductionMule esb basic introduction
Mule esb basic introduction
 

Recently uploaded

Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
FODUU
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
Claudio Di Ciccio
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 

Recently uploaded (20)

Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 

Database integrate with mule

  • 2. MULE HAS INTRODUCED IT’S NEW JDBC COMPONENT RECENTLY WHICH ALLOW USTO CONNECT ALMOST WITH ALMOST ANY JAVA DATABASE CONNECTIVITY (JDBC) RELATIONAL DATABASE USING A SINGLE INTERFACE FOR EVERY CASE. IT ALSO RUN DIVERSE SQL OPERATIONS ON OUR DATABASE, INCLUDING SELECT, INSERT, UPDATE, DELETE, AND EVEN STORED PROCEDURES. SOWE CAN SAYTHAT ALMOST ALLTYPE OF DB OPERATION CAN BE DONE HERE SMOOTHLY WITHTHIS NEW COMPONENT
  • 3. We I will give you few small demo here on how to operate with this new component. Let’s consider we have the following simple Mule flow :- As you can see we have used the new DB connecter to fetch the Data from Database and display the data in an XML format in logger
  • 4. The new Database component is of 3 query type : • Parameterized • Dynamic • FromTemplate For more info.. Please visit :- http://www.mulesoft.org/documentation/display/current/Database+C onnector
  • 5. Configuring the Database For configuring the database, we need to configure the global database connector with your existing DB as follows :- <db:generic-config name="Generic_Database_Configuration" url="jdbc:sqlserver://ANIRBAN- PCSQLEXPRESS:1433;databaseName=Anirban;user=sa;password=******" driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" doc:name="Generic DatabaseConfiguration" /> The above code is a sample of connecting Mule with SQL server database.
  • 6. Now there are various ways to use this new component…. I will show you small examples here
  • 7. Configuring a From-Template Query You can use a template to pre-define an SQL query that you can use and reuse in your application's flows. It enables you to define a query statement once, in a global element in your application (globalTemplate Query ), then reuse the query multiple times whenever required <db:template-query name=“simpleQuery" doc:name="Template Query"> <db:parameterized-query >select * from table1 </db:parameterized-query> </db:template-query> <db:select config-ref="Generic_Database_Configuration" doc:name="Database"> <db:template-query-ref name="withoutParameter"/> </db:select> And referring the template in the Mule flow as follows :-
  • 8. Dynamic query : Mule replaces all MEL expressions in the query with the result of the expression evaluation, then sends the result to the database. As such, you are responsible for making sure that any string in your query statement is interpretable by the database (i.e. quoting strings, data formatting, etc.) <db:select config-ref="Generic_Database_Configuration" doc:name="Database"> <db:dynamic-query><![CDATA[select * from table1]]> </db:dynamic-query> </db:select> Above example shows the use of dynamic query
  • 9. Parameterized query : Mule replaces all Mule Expression Language (MEL) expressions inside a query with "?" to create a prepared statement, then evaluates the MEL expressions using the current event so as to obtain the value for each parameter. <db:select config-ref="Generic_Database_Configuration" doc:name="Database"> <db:parameterized-query><![CDATA[select * from table1 where Id=23]]></db:parameterized-query> </db:select> Above example shows the use of Parameterized query
  • 10. Stored procedure: This new jdbc component can also execute stored procedure as follows :- <db:stored-procedure config-ref="Generic_Database_Configuration"> <db:parameterized-query>{ call selectData() }</db:parameterized-query> </db:stored-procedure> Above example shows the use of stored procedure where selectData() is a stored procedure