SlideShare a Scribd company logo
P R U D H V I
ABSTRACT
Using of Database component in mule using basic example
P R U D H V I
INTRODUCTION
The Database connector allows you to connect
with almost any Java Database Connectivity
(JDBC) relational database using a single
interface for every case. The Database connector
allows you to run diverse SQL operations on your
database, including Select, Insert, Update, Delete,
and even Stored Procedures.
P R U D H V I
DATABASE CONNECTOR EXAMPLE FLOW
P R U D H V I
FLOW:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:db="http://www.mulesoft.org/schema/mule/db" xmlns:jdbc-ee="http://www.mulesoft.org/schema/mule/ee/jdbc"
xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:vm="http://www.mulesoft.org/schema/mule/vm" xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans"
version="EE-3.6.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/ee/jdbc http://www.mulesoft.org/schema/mule/ee/jdbc/current/mule-
jdbc-ee.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener
Configuration"/>
<db:mysql-config name="MySQL_Configuration" host="local" port="8061" user="user" password="password"
database="DBSAMPLE" doc:name="MySQL Configuration"/>
<flow name="DataBase">
<http:listener config-ref="HTTP_Listener_Configuration" path="/DBs" doc:name="HTTP"/>
<db:select config-ref="MySQL_Configuration" doc:name="Database">
<db:parameterized-query><![CDATA[Select * from Students]]></db:parameterized-query>
</db:select>
<logger message="--Result is--#[payload]" level="INFO" doc:name="Logger"/>
</flow>
</mule>
P R U D H V I
Output:
[{Name=Student1, Number=55, Name=Abhi, Id=1}, {Name=Student2, Number=25,
name=Mahesh, Id=2}, {Name=Student3, Number=65, name=Pavan, Id=3},
{Name=Student4, Number=35, name=Siva, Id=4}]
P R U D H V I
Flow of execution:
Trigger: http://localhost:8081/db
Database component connects to the specific database, executes the query
By using logger we are printing the output in the console
P R U D H V I
REFERENCES
https://docs.mulesoft.com/mule-user-guide/v/3.7/database-connector
P R U D H V I
THANK YOU
P R U D H V I

More Related Content

What's hot

Validation
ValidationValidation
Mock component in munit
Mock component in munitMock component in munit
Mock component in munit
sivachandra mandalapu
 
Object store
Object storeObject store
Object store
sivachandra mandalapu
 
Collection aggregator
Collection aggregatorCollection aggregator
Collection aggregator
sivachandra mandalapu
 
How to get http query parameters in mule
How to get http query parameters in muleHow to get http query parameters in mule
How to get http query parameters in mule
Ramakrishna kapa
 
Mule with spring security manager
Mule with spring security managerMule with spring security manager
Mule with spring security manager
Son Nguyen
 
Jms selector
Jms selectorJms selector
Jms selector
sivachandra mandalapu
 
Choice component in mule demo
Choice component in mule demoChoice component in mule demo
Choice component in mule demo
Sudha Ch
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mule
Rajkattamuri
 
Specifying a default exception strategy
Specifying a default exception strategySpecifying a default exception strategy
Specifying a default exception strategy
sivachandra mandalapu
 
How to use processor chain
How to use processor chainHow to use processor chain
How to use processor chain
sivachandra mandalapu
 
Wildcard Filter
Wildcard FilterWildcard Filter
Wildcard Filter
sivachandra mandalapu
 
Data Mapper
Data MapperData Mapper
Quartz component in mule demo
Quartz component in mule demoQuartz component in mule demo
Quartz component in mule demo
Sudha Ch
 
How to use splitter component
How to use splitter componentHow to use splitter component
How to use splitter component
RaviRajuRamaKrishna
 
Defining global exception strategies
Defining global exception strategiesDefining global exception strategies
Defining global exception strategies
sivachandra mandalapu
 

What's hot (18)

Sftplite
SftpliteSftplite
Sftplite
 
Validation
ValidationValidation
Validation
 
Mock component in munit
Mock component in munitMock component in munit
Mock component in munit
 
Object store
Object storeObject store
Object store
 
Collection aggregator
Collection aggregatorCollection aggregator
Collection aggregator
 
How to get http query parameters in mule
How to get http query parameters in muleHow to get http query parameters in mule
How to get http query parameters in mule
 
Mule with spring security manager
Mule with spring security managerMule with spring security manager
Mule with spring security manager
 
Jms selector
Jms selectorJms selector
Jms selector
 
Choice component in mule demo
Choice component in mule demoChoice component in mule demo
Choice component in mule demo
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mule
 
Specifying a default exception strategy
Specifying a default exception strategySpecifying a default exception strategy
Specifying a default exception strategy
 
How to use processor chain
How to use processor chainHow to use processor chain
How to use processor chain
 
Wildcard Filter
Wildcard FilterWildcard Filter
Wildcard Filter
 
Data Mapper
Data MapperData Mapper
Data Mapper
 
Splitter
SplitterSplitter
Splitter
 
Quartz component in mule demo
Quartz component in mule demoQuartz component in mule demo
Quartz component in mule demo
 
How to use splitter component
How to use splitter componentHow to use splitter component
How to use splitter component
 
Defining global exception strategies
Defining global exception strategiesDefining global exception strategies
Defining global exception strategies
 

Similar to Basic example using database component

Database component in mule demo
Database component in mule demoDatabase component in mule demo
Database component in mule demo
Sudha Ch
 
How to use bean as datasource in database connector
How to use bean as datasource in database connectorHow to use bean as datasource in database connector
How to use bean as datasource in database connector
RaviRajuRamaKrishna
 
Bean as Datasource
Bean as DatasourceBean as Datasource
Bean as Datasource
sivachandra mandalapu
 
Database Component
Database ComponentDatabase Component
Database Component
Durga Prasad Kakarla
 
Database component
Database component Database component
Database component
Sunil Komarapu
 
Database component
Database component Database component
Database component
F K
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mule
javeed_mhd
 
Mule Database component
Mule Database component Mule Database component
Mule Database component
AbdulImrankhan7
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivity
Tanmoy Barman
 
Simple Way for MySQL to NoSQL
Simple Way for MySQL to NoSQLSimple Way for MySQL to NoSQL
Simple Way for MySQL to NoSQL
Okcan Yasin Saygılı
 
Overview Of JDBC
Overview Of JDBCOverview Of JDBC
Overview Of JDBC
Mindfire Solutions
 
Jdbc
JdbcJdbc
Jdbc
Ishucs
 
20151010 my sq-landjavav2a
20151010 my sq-landjavav2a20151010 my sq-landjavav2a
20151010 my sq-landjavav2a
Ivan Ma
 
Jdbc
Jdbc   Jdbc
Jdbc
Ishucs
 
Mule database-connectors
Mule database-connectorsMule database-connectors
Mule database-connectors
princeirfancivil
 
Mule database-connectors
Mule  database-connectorsMule  database-connectors
Mule database-connectors
D.Rajesh Kumar
 
Mule database-connectors
Mule database-connectorsMule database-connectors
Mule database-connectors
irfan1008
 
Mule database-connectors
Mule database-connectorsMule database-connectors
Mule database-connectors
Phaniu
 
How to use salesforce cloud connector
How to use salesforce cloud connectorHow to use salesforce cloud connector
How to use salesforce cloud connector
RaviRajuRamaKrishna
 
MuleSoft Database Connector
MuleSoft Database ConnectorMuleSoft Database Connector
MuleSoft Database Connector
krishna2162
 

Similar to Basic example using database component (20)

Database component in mule demo
Database component in mule demoDatabase component in mule demo
Database component in mule demo
 
How to use bean as datasource in database connector
How to use bean as datasource in database connectorHow to use bean as datasource in database connector
How to use bean as datasource in database connector
 
Bean as Datasource
Bean as DatasourceBean as Datasource
Bean as Datasource
 
Database Component
Database ComponentDatabase Component
Database Component
 
Database component
Database component Database component
Database component
 
Database component
Database component Database component
Database component
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mule
 
Mule Database component
Mule Database component Mule Database component
Mule Database component
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivity
 
Simple Way for MySQL to NoSQL
Simple Way for MySQL to NoSQLSimple Way for MySQL to NoSQL
Simple Way for MySQL to NoSQL
 
Overview Of JDBC
Overview Of JDBCOverview Of JDBC
Overview Of JDBC
 
Jdbc
JdbcJdbc
Jdbc
 
20151010 my sq-landjavav2a
20151010 my sq-landjavav2a20151010 my sq-landjavav2a
20151010 my sq-landjavav2a
 
Jdbc
Jdbc   Jdbc
Jdbc
 
Mule database-connectors
Mule database-connectorsMule database-connectors
Mule database-connectors
 
Mule database-connectors
Mule  database-connectorsMule  database-connectors
Mule database-connectors
 
Mule database-connectors
Mule database-connectorsMule database-connectors
Mule database-connectors
 
Mule database-connectors
Mule database-connectorsMule database-connectors
Mule database-connectors
 
How to use salesforce cloud connector
How to use salesforce cloud connectorHow to use salesforce cloud connector
How to use salesforce cloud connector
 
MuleSoft Database Connector
MuleSoft Database ConnectorMuleSoft Database Connector
MuleSoft Database Connector
 

More from prudhvivreddy

About Mule execution units
About Mule execution unitsAbout Mule execution units
About Mule execution units
prudhvivreddy
 
Working with components
Working with componentsWorking with components
Working with components
prudhvivreddy
 
About mule transformers
About mule transformersAbout mule transformers
About mule transformers
prudhvivreddy
 
About jms
About jmsAbout jms
About jms
prudhvivreddy
 
Webservices
WebservicesWebservices
Webservices
prudhvivreddy
 
Generating the mule flow as html document
Generating the mule flow as html documentGenerating the mule flow as html document
Generating the mule flow as html document
prudhvivreddy
 
Sftp connector
Sftp connectorSftp connector
Sftp connector
prudhvivreddy
 
Imap connector
Imap connectorImap connector
Imap connector
prudhvivreddy
 
Ftp connector
Ftp connectorFtp connector
Ftp connector
prudhvivreddy
 
Hdfs connector
Hdfs connectorHdfs connector
Hdfs connector
prudhvivreddy
 
Ajax connector
Ajax connectorAjax connector
Ajax connector
prudhvivreddy
 
Basic example using vm component
Basic example using vm componentBasic example using vm component
Basic example using vm component
prudhvivreddy
 
Basic example using until successful component
Basic example using until successful componentBasic example using until successful component
Basic example using until successful component
prudhvivreddy
 
Basic example using message properties component
Basic example using message properties componentBasic example using message properties component
Basic example using message properties component
prudhvivreddy
 
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
 
Basic example using quartz component in anypoint studio
Basic example using quartz component in anypoint studioBasic example using quartz component in anypoint studio
Basic example using quartz component in anypoint studio
prudhvivreddy
 
Mule fundamentals
Mule fundamentalsMule fundamentals
Mule fundamentals
prudhvivreddy
 
Salesforce connector Example
Salesforce connector ExampleSalesforce connector Example
Salesforce connector Example
prudhvivreddy
 
Munit junit test case
Munit junit test caseMunit junit test case
Munit junit test case
prudhvivreddy
 

More from prudhvivreddy (19)

About Mule execution units
About Mule execution unitsAbout Mule execution units
About Mule execution units
 
Working with components
Working with componentsWorking with components
Working with components
 
About mule transformers
About mule transformersAbout mule transformers
About mule transformers
 
About jms
About jmsAbout jms
About jms
 
Webservices
WebservicesWebservices
Webservices
 
Generating the mule flow as html document
Generating the mule flow as html documentGenerating the mule flow as html document
Generating the mule flow as html document
 
Sftp connector
Sftp connectorSftp connector
Sftp connector
 
Imap connector
Imap connectorImap connector
Imap connector
 
Ftp connector
Ftp connectorFtp connector
Ftp connector
 
Hdfs connector
Hdfs connectorHdfs connector
Hdfs connector
 
Ajax connector
Ajax connectorAjax connector
Ajax connector
 
Basic example using vm component
Basic example using vm componentBasic example using vm component
Basic example using vm component
 
Basic example using until successful component
Basic example using until successful componentBasic example using until successful component
Basic example using until successful component
 
Basic example using message properties component
Basic example using message properties componentBasic example using message properties component
Basic example using message properties component
 
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
 
Basic example using quartz component in anypoint studio
Basic example using quartz component in anypoint studioBasic example using quartz component in anypoint studio
Basic example using quartz component in anypoint studio
 
Mule fundamentals
Mule fundamentalsMule fundamentals
Mule fundamentals
 
Salesforce connector Example
Salesforce connector ExampleSalesforce connector Example
Salesforce connector Example
 
Munit junit test case
Munit junit test caseMunit junit test case
Munit junit test case
 

Recently uploaded

Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 

Recently uploaded (20)

Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 

Basic example using database component

  • 1. P R U D H V I
  • 2. ABSTRACT Using of Database component in mule using basic example P R U D H V I
  • 3. INTRODUCTION The Database connector allows you to connect with almost any Java Database Connectivity (JDBC) relational database using a single interface for every case. The Database connector allows you to run diverse SQL operations on your database, including Select, Insert, Update, Delete, and even Stored Procedures. P R U D H V I
  • 4. DATABASE CONNECTOR EXAMPLE FLOW P R U D H V I
  • 5. FLOW: <?xml version="1.0" encoding="UTF-8"?> <mule xmlns:db="http://www.mulesoft.org/schema/mule/db" xmlns:jdbc-ee="http://www.mulesoft.org/schema/mule/ee/jdbc" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:vm="http://www.mulesoft.org/schema/mule/vm" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/ee/jdbc http://www.mulesoft.org/schema/mule/ee/jdbc/current/mule- jdbc-ee.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd"> <http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/> <db:mysql-config name="MySQL_Configuration" host="local" port="8061" user="user" password="password" database="DBSAMPLE" doc:name="MySQL Configuration"/> <flow name="DataBase"> <http:listener config-ref="HTTP_Listener_Configuration" path="/DBs" doc:name="HTTP"/> <db:select config-ref="MySQL_Configuration" doc:name="Database"> <db:parameterized-query><![CDATA[Select * from Students]]></db:parameterized-query> </db:select> <logger message="--Result is--#[payload]" level="INFO" doc:name="Logger"/> </flow> </mule> P R U D H V I
  • 6. Output: [{Name=Student1, Number=55, Name=Abhi, Id=1}, {Name=Student2, Number=25, name=Mahesh, Id=2}, {Name=Student3, Number=65, name=Pavan, Id=3}, {Name=Student4, Number=35, name=Siva, Id=4}] P R U D H V I
  • 7. Flow of execution: Trigger: http://localhost:8081/db Database component connects to the specific database, executes the query By using logger we are printing the output in the console P R U D H V I
  • 9. THANK YOU P R U D H V I