FREE OutSystems Workshops - Build an OutSystems App in 1 hour | ENROLL NOW

Tech Bites - How to integrate with an External DB

< Back to Blog

How to integrate with an external database?

OutSystems allows creating data models from scratch.

But in some cases, we need to connect to other pre-existing databases not hosted in the same environment.

To do this, we will create an extension using Integration Studio, define the integration and later consume that extension in Service Studio.

First, we need to define a database connection in Service Center.

If you don’t have one defined yet, make sure to create one using a user with the required access permissions for the specified database.

Let’s start: open the Integration Studio, create a new extension, and name it.

Right-click the Entities folder and choose Connect to external table or view.

This wizard is super easy to follow. Don’t believe me? Keep watching.

Click the Next button, choose one existing database connection, click next and choose one of the available databases inside this connection.

Now it’s necessary to decide which tables or views we want to access in our OutSystems application. Select the ones needed and click Add.

Click Next and provide a logical database name and click Next once again. 

At this point, the platform is generating the entities that will represent the integrated tables or views. Finally, we finish and publish. 

However, there is still one last configuration: Click the Configure button, the Service Center opens, and we just have to associate the newly created integration with the existing database connection.

We are ready to head over to the Service Studio and use the newly integrated tables in one of our application screens.

Open the manage dependencies window, search for the new extension, and select the external entities. Click apply. 

In the data layer, it is possible to see the dependency on the new extension, referring to the external entities. Have fun scaffolding screens for those entities, create new records, edit, query, you name it! 

We are all set.

Turn Up Academy

Apply to our Turn Up Boot Camp

Senior Instructor

Latest Articles

‍What’s new in OutSystems Developer Cloud

‍What’s new in OutSystems Developer Cloud

Have you heard about the OutSystems Developer Cloud and want to know more about what's new and what the big benefits are? Then this article is for you!

Tech Bites - Should we validate form data on server-side?

Should we validate form data on server-side

When including forms in applications, developers often wonder if they need to re-validate data on the server side after having checked it on the client. Why go to the trouble of checking the data twice?

Tech Bites
The Top 5 Mistakes Handling Asynchronous Data In Outsystems Reactive Apps And How To Avoid Them

The Top 5 Mistakes Handling Asynchronous Data In Outsystems Reactive Apps

When developing an OutSystems reactive web app, you would expect to display data quickly, but it doesn't always happen. Do you know why? We'll explore the reasons and how to tackle them.