Calculating... until our next FREE Code-Along Session. Secure your spot now

Build Your First Web App Today

Your 14-Day Free Trial Is Waiting To Be Activated
GET INSTANT ACCESS READ MORE ABOUT FIVE

Database Design: External Databases in Five

Avatar photo
Dominik Keller
Sep 10th, 2024
Blog

Database Design – Part 5: Adding an External Database to Five

Hi and welcome to Five’s Database Design series. This series of blog posts teaches you how to create a MySQL database from scratch in Five. From adding table fields to creating many-to-many relationships and importing data – we cover everything you need to know to build the perfect database.

Sometimes, instead of creating a new database from scratch, we would like to create a web interface for an existing database. Five lets us add an external database to the development environment by using a connection string. Five supports Microsoft SQL Server (MSSQL), MySQL, and SQLite.

This blog post explains how to add an external database to Five.


About Five: More Than Just a Database

Five is a rapid application development environment for building database-driven web applications. Every application developed in Five has its own, fully customizable MySQL database.

In Five, you can create your database like in MySQL Workbench, with one important difference. You don’t need to write SQL commands to do so.

Five gives you the power of a database GUI in an easy-to-use and intuitive web application. You can create tables, assign data types, define table relationships, and import or query data.

Beyond its database features, Five lets you develop an entire web application on your database. Five makes it easy to build a modern web app with forms, charts, dashboards, and PDF reports that are all connected to your database.

Unlike traditional SQL tools, which only serve as a graphical user interface for a database (but are usually not very user-friendly), Five allows you to build and launch a web interface connected to a database. This makes Five ideal for rapidly creating internal databases to store data about products, inventory, business partners, to-do lists, members, suppliers, or other data.

To view Five’s web interface for databases, visit our customer database sample application here.


Create and Launch a Database-Driven Web App
Rapidly build and deploy a MySQL DB today




Five’s Database Design Tools: Databases

Five’s Databases feature lets us create a connection to an external, existing database, and then use Five to build a web interface on this database.

To add an external database, a connection string is required. The connection string represents a set of parameters in the form of key=value pairs separated by semicolons and must contain a Driver, URL, Username, Password, and Name.

Here is an example:

driver=MSSQL;url=serverdb.host.com:1433;username=user;password=password;name=exampleDB

KeyValueExample
DriverThe database driver allows you to interact with your chosen DBMS through Five’s interface.driver=MSSQL
URLA database connection URL provides a way of identifying a database so that the selected driver recognizes it and connects to it, this can be a host name or an IP address including the port number.url=serverdb.host.com:1433
UsernameYour username in your DBMS.username=user
PasswordYour password in your DBMS.password=password
NameThe name of your database in your DBMS.name=exampleDB

Let’s learn how to use the add an external database.


Connecting an External Database to Five

To connect to an external database with Five, follow these steps:

Prerequisites:
Have at least one (empty) application ready in Five, as well as an external database compatible with Five.


1. In Five, select your application and click Manage.
2. Now go to Data > Databases.
3. Click the yellow Plus button.


4. Click the lookup icon in the Database Type field and select the type.
5. Type your connection string in the Connection String field following the above guidelines.


6. Last, click the Tick ✔️ Button to save.

Done! We have just connected Five to an external database.


Importing Your Database Schema

Now that we have successfully established the connection to our external database, we must next import its schema to make it visible in Five. Once the schema is imported, you can, for example, view your external database’s tables inside Five and work with its data.

To do so, follow the steps shown in our documentation here.


Go From Database Table to Form

In the last five articles, we have introduced core database design principles to you. We learned how to create tables and relationships, and how to import data into a database. Once our database is configured, the next step in our development process is creating forms. Our Advanced Forms series covers everything you need to know about building forms in Five.


Finding Help

Have more questions? Join our user community to connect with others and get answers.


Continue Reading About Database Design

Discover all articles of our Database Design series here.

  1. Creating Tables
  2. Creating Relationships
  3. Junction Tables
  4. Importing Data
  5. Connecting External Databases

Start developing your first application!

Get Started For Free Today

Sign Up Free Book a demo

Build Your Web App With Five

200+ Free Trials Started This Week

Start Free

Thank you for your message!

Our friendly staff will contact you shortly.

CLOSE