Mendix for FrontEnd and MySQL for Backend

-1
Hi! I have a MySQL database with tables and data on a server. And I want to use Mendix to display, modify and save that data. I don't want to use Mendix as a database, I want to continue using MySQL. How should I do it?
asked
4 answers
2

Mendix employee here. What you’re asking for is not a standard way to use Mendix. Mendix apps are full stack apps that manage and maintain their own UI, logic layer, and data in a database. They can optionally read/write to other systems via API or even a JDBC connection, and some apps even exclusively operate on remote data.

What you’re doing with the SQL Connector in the other thread is technically possible. You could write queries for every single data operation you want to make, and treat all of the data in Mendix as non-persistable (in-memory) objects. However, your development speed will not be very fast.

Instead, you should let Mendix control the database, whether you use MySQL as the backing engine or not. This way all of the queries to and from the database are managed for you. When the app is ready, migrate you existing database into the Mendix data model by using a CSV or Excel import modules that are available in the Mendix app store.

answered
1

You are going off the deep end. I hope this explanation gets you back on track:

The ‘DatabaseConnector’ is a module that you add to an existing Mendix application. The Mendix application itself uses it’s own Mendix database, probably Postgres, and it uses the DatabaseConnector to execute specific queries on an external database (your current MySql database). So this setup has two databases. The application’s own database, which is used whenever users log on and go about their business in the app, and your MySql database, which is used whenever a microflow is triggered the uses the DatabaseConnector to execute a query to an external database.

Adding the MySql to your application settings in Mendix Studio Pro, makes your Mendix application use a MySql database, and that will be the only one. Mendix is a database-independent platform and can run locally on a different database then it does in your app’s other environments. 

So that should clear up the difference between those two. There is, however, a big catch:
Mendix is NOT your regular relational database and has its own database management. This disables Mendix to use your MySql database tables, for starters because they have no id-attribute on each record. Your MySql database also does not have the association tables that Mendix uses. Therefore, your best choice will be setting up a regular new application, adding the module DatabaseConnector, and creating queries to execute on your MySql database.

************* upon posting this text I see Eric’s wise words, making me come up with another timesaving idea:

You can:

- Create an Excel document

- Export each table out of your current MySql database and import it to a Spreadsheet-tab into your Excel document. Each table in its own tab

- Go to new.mendix.com, click button ‘Create App’  and select “App from a spreadsheet”

- Use your Excel 

- Upon requested by the wizard, add the associations that you have existing in your current MySql database

Needles to say: Try this with two tables first.

Good luck, hope you succeed!

answered
0

Thank you both for your time.

The question is that I cannot stop maintaining the MySQL database because I have connected to this database another application, Business Intelligence, to make queries and reports in this MySQL database. Can Business Intelligence connect to Mendix?

answered
0

Hello again!

Finally I am developing an application with DatabaseConnector to load data from MySQL. As shown in this video: https://www.youtube.com/watch?v=eJVFyDONU9Y.

But, how do I load data from two entities into a dataView? these may be associated. My goal is to show data in textBox of entity1 and referenceselector of entity2 in the same dataView.

Thank you!

 

 

answered