180 likes | 211 Views
Mendix has been the pioneer in the world of low-code development throughout the time it has provided great yet simple digital transformation methods. MxTechies is a digital transformation leader in the Mendix Low Code space. Mendix has so many methods by which one can migrate/extend their current database from any legacy system to Mendix and Database Connector is just the best and works like a charm. This slideshow will cover everything you need when you start working with the Database connector for Mendix.
E N D
MENDIX DATABASE CONNECTOR +
Hi I’m Kamala Nathan, Mendix Expert Certified, Senior Technical Lead, MxTechies +
I am here to explain what Mendix “Database Connector” is and how it works. +
What is +
Mendix is the pioneer of low-code development providing great yet simple digital transformation methods. • MxTechies is a digital transformation leader in the Mendix Low Code space. • Out of the several methods for migration/extension of the current database from any legacy system to Mendix, Database Connector is the best. • This presentation will cover everything you need when you start working with the Database connector for Mendix. +
Why Database Connector? +
The first reason is that you can simply connect with all the databases that the JDBC supports J D B C +
Like all other Mendix components, Database Connector works well as a plug-and-play activity. No customization or setup is necessary. +
The big part is writing the SQL statements, which is a little different from how we usually do it. Once we get the hang of it, it becomes very simple. +
Need further assistance? Don’t worry, I’m going to help you with 4 Simple Steps. Step 01 • How to secure your database credentials from attack Step 02 • How to execute and SQL Statement Step 03 How to pass your values to a SQL statement Step 04 • Fixes and precautions to avoid a few common errors +
1. How to secure your database credentials from attack? • To re-use the database configuration in multiple requests, go for a configuration page instead of constants. • Make sure to store your password in an encrypted format. • Upon saving, move it to another attribute allowing the configuration page to display an empty value whenever opened.. +
2. How to execute an SQL Statement • Store your SQL statement in a Variable • Add the action activity Execute Query when you want to fetch data from database and Execute Statement for any other operations. • Execute Query will expect an object to create a list of the same objects fetched from database. +
Note: In the above image the jdbcurl has a prefix “jdbc:mysql” which will differ based on the database you want to use. For example “jdbc:postgresql” for postgre SQL. +
3.How to pass your values to an SQL statement • When you want to pass inputs to an SQL statement Mendix uses single quotes to define a String which is similar to SQL. • This makes writing an SQL Statement tricky. • Here’s what we need to keep in mind. +
3.How to pass your values to an SQL statement • To pass a String instead of using single quote once we have to use it thrice • For example: '''+$NewEmployee/Firstname+''' • To pass a date It has to be parsed to String • Example: '+formatDateTime($NewEmployee/JoiningDate, ‘ • dd-MM-yyyy')+' +