{"id":4092,"date":"2024-09-10T09:20:56","date_gmt":"2024-09-10T01:20:56","guid":{"rendered":"https:\/\/five.co\/?p=4092"},"modified":"2026-04-03T16:13:34","modified_gmt":"2026-04-03T08:13:34","slug":"external-databases","status":"publish","type":"post","link":"https:\/\/preview-php85.dzine.org\/five\/blog\/external-databases\/","title":{"rendered":"Database Design: External Databases in Five"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Database Design &#8211; Part 5: Adding an External Database to Five<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Hi and welcome to Five&#8217;s <em><strong>Database Design<\/strong><\/em> 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 &#8211; we cover everything you need to know to build the perfect database.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sometimes, instead of creating a new database from scratch, we would like to <strong>create a web interface for an existing database<\/strong>. Five lets us add an external database to the development environment by using a <strong>connection string.<\/strong> Five supports Microsoft SQL Server (MSSQL), MySQL, and SQLite. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This blog post explains how to add an external database to Five.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">About Five: More Than Just a Database<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In Five, you can create your database like in MySQL Workbench, with one important difference. You don&#8217;t need to write SQL commands to do so.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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 <strong>build and launch a web interface connected to a database<\/strong>. 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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To view Five&#8217;s web interface for databases, visit our <a href=\"https:\/\/default-customerdatabase-tryfive.5au.co\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">customer database sample application<\/a> here.<\/p>\n\n\n\n<div style=\"background-color: #001524;\"><hr style=\"height: 5px;\" \/>\n<pre style=\"text-align: center; overflow: hidden; white-space: pre-line;\"><span style=\"color: #f1ebda; background-color: #4588d8; font-size: calc(18px + 0.390625vw);\"><strong>Create and Launch a Database-Driven Web App<\/strong><br \/><span style=\"font-size: 14pt;\">Rapidly build and deploy a MySQL DB today<\/span><\/span><\/pre>\n<p style=\"text-align: center;\"><a href=\"https:\/\/preview-php85.dzine.org\/five\/get-started\" target=\"_blank\" rel=\"noopener\"><button style=\"background-color: #f8b92b; border: none; color: black; padding: 20px; text-align: center; text-decoration: none; display: inline-block; font-size: 18px; cursor: pointer; margin: 4px 2px; border-radius: 5px;\"><strong>Get Instant Access<\/strong><\/button><br \/><\/a><\/p>\n<hr style=\"height: 5px;\" \/><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Five&#8217;s Database Design Tools: Databases<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Five&#8217;s <strong>Databases<\/strong> feature lets us create a connection to an external, existing database, and then use Five to build a web interface on this database. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To add an external database, a <strong>connection string <\/strong>is required.  The connection string represents a set of parameters in the form of&nbsp;<em>key=value<\/em>&nbsp;pairs separated by semicolons and must contain a Driver, URL, Username, Password, and Name.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here is an example:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>driver=MSSQL;url=serverdb.host.com:1433;username=user;password=password;name=exampleDB<\/code><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Key<\/th><th>Value<\/th><th>Example<\/th><\/tr><\/thead><tbody><tr><td>Driver<\/td><td>The database driver allows you to interact with your chosen DBMS through Five&#8217;s interface.<\/td><td>driver=MSSQL<\/td><\/tr><tr><td>URL<\/td><td>A 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.<\/td><td>url=serverdb.host.com:1433<\/td><\/tr><tr><td>Username<\/td><td>Your username in your DBMS.<\/td><td>username=user<\/td><\/tr><tr><td>Password<\/td><td>Your password in your DBMS.<\/td><td>password=password<\/td><\/tr><tr><td>Name<\/td><td>The name of your database in your DBMS.<\/td><td>name=exampleDB<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s learn how to use the add an external database.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Connecting an External Database to Five<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To connect to an external database with Five, follow these steps:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Prerequisites:<\/strong><br>Have at least one (empty) application ready in Five, as well as an external database compatible with Five.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">1. In Five, select your application and click <strong>Manage.<\/strong><br>2. Now go to <strong>Data &gt; Databases<\/strong>.<br>3. Click the yellow <strong>Plus <\/strong>button. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"447\" src=\"https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/image-71-1024x447.png\" alt=\"\" class=\"wp-image-4094\" srcset=\"https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/image-71-1024x447.png 1024w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/image-71-300x131.png 300w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/image-71-768x335.png 768w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/image-71.png 1320w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"> 4. Click the lookup icon in the Database Type field and select the type.<br>5. Type your connection string in the Connection String field following the above guidelines.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img width=\"1024\" height=\"287\" src=\"https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/image-72-1024x287.png\" alt=\"\" class=\"wp-image-4095\" srcset=\"https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/image-72-1024x287.png 1024w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/image-72-300x84.png 300w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/image-72-768x216.png 768w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/image-72-1536x431.png 1536w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/image-72.png 1838w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">6. Last, click the <strong>Tick \u2714\ufe0f Button <\/strong>to save. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Done! We have just connected Five to an external database. <\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Importing Your Database Schema<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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&#8217;s tables inside Five and work with its data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To do so, <a href=\"https:\/\/help.five.org\/2.7\/docs\/data\/databases\/import-database-schema\" rel=\"nofollow noopener\" target=\"_blank\">follow the steps shown in our documentation<\/a> here.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Go From Database Table to Form<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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 <a href=\"https:\/\/preview-php85.dzine.org\/five\/blog\/form-designer\/\"><em>Advanced Forms<\/em> series<\/a> covers everything you need to know about building forms in Five.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Finding Help<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Have more questions? <a href=\"https:\/\/five.org\" rel=\"nofollow noopener\" target=\"_blank\">Join our user community<\/a> to connect with others and get answers.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Continue Reading About Database Design<\/h2>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<p class=\"wp-block-paragraph\">Discover all articles of our <em>Database Design<\/em> series here. <\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/preview-php85.dzine.org\/five\/blog\/creating-tables\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/preview-php85.dzine.org\/five\/blog\/creating-tables\/\" rel=\"noreferrer noopener\">Creating Tables<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/preview-php85.dzine.org\/five\/blog\/table-relationships\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/preview-php85.dzine.org\/five\/blog\/table-relationships\/\" rel=\"noreferrer noopener\">Creating Relationships<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/preview-php85.dzine.org\/five\/blog\/junction-tables\/\" target=\"_blank\" rel=\"noreferrer noopener\">Junction Tables<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/preview-php85.dzine.org\/five\/blog\/import-csv-into-mysql\/\">Importing Data<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/preview-php85.dzine.org\/five\/blog\/external-databases\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/preview-php85.dzine.org\/five\/blog\/external-databases\/\" rel=\"noreferrer noopener\">Connecting External Databases<\/a><\/li>\n<\/ol>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Database Design &#8211; Part 5: Adding an External Database to Five Hi and welcome to Five&#8217;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 &#8211; we cover everything you need to know [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":4096,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_eb_attr":"","_uag_custom_page_level_css":"","footnotes":""},"categories":[21,49],"tags":[],"class_list":["post-4092","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","category-how-to"],"acf":[],"uagb_featured_image_src":{"full":["https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/Five.Co-Database-Design-External-Databases.jpg",1280,720,false],"thumbnail":["https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/Five.Co-Database-Design-External-Databases-150x150.jpg",150,150,true],"medium":["https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/Five.Co-Database-Design-External-Databases-300x169.jpg",300,169,true],"medium_large":["https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/Five.Co-Database-Design-External-Databases-768x432.jpg",768,432,true],"large":["https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/Five.Co-Database-Design-External-Databases-1024x576.jpg",1024,576,true],"1536x1536":["https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/Five.Co-Database-Design-External-Databases.jpg",1280,720,false],"2048x2048":["https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/09\/Five.Co-Database-Design-External-Databases.jpg",1280,720,false]},"uagb_author_info":{"display_name":"Dominik Keller","author_link":"https:\/\/preview-php85.dzine.org\/five\/author\/f1v5_ed3_my\/"},"uagb_comment_info":0,"uagb_excerpt":"Database Design &#8211; Part 5: Adding an External Database to Five Hi and welcome to Five&#8217;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 &#8211; we cover everything you need to know&hellip;","_links":{"self":[{"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/posts\/4092","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/comments?post=4092"}],"version-history":[{"count":1,"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/posts\/4092\/revisions"}],"predecessor-version":[{"id":17492,"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/posts\/4092\/revisions\/17492"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/media\/4096"}],"wp:attachment":[{"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/media?parent=4092"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/categories?post=4092"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/tags?post=4092"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}