Child pages
  • Working with Database Servers
Skip to end of metadata
Go to start of metadata

This chapter provides an overview of the procedures for connecting to a database, creating a new database, and other common functions when working with databases in Servoy. For more information, see also the Deployment Guide.

Connecting to a Database

Servoy can connect to any database that has a JDBC driver; common drivers come pre-installed with Servoy. To connect to an existing Database:

  1. In Solution Explorer, access the context menu for Database Servers under the Resources project node.
  2. Select Connect to an existing database and select your desired database from the list.
    • The database editor window will open that allows you to specify properties for the database connection.
  3. Save the new database connection using the File>Save menu.
    • The new database connection will appear under the Database Servers list.
    • This step is only required when you first add a new type of database connection to Resources project. Additional database connections to the same database type will be saved to the project automatically.

More information about database server connections can be found in the Database Connections chapter of the Deployment Guide.

Creating a New Database

Servoy comes with a pre-installed PostgreSQL database. To add a new PostgreSQL database to your Resources project:

  1. In Solution Explorer, access the context menu for Database Servers under the Resources project node.
  2. Select Create new database>Create PostgreSQL database from the list.
    • The database editor window will open that allows you to specify properties for the database connection.

The new database connection will appear under the Database Servers list.

Interacting with the Database Server

The context menu on the Database Servers node provides the following actions for local and database server interaction:

  • Synchronize with DB server information – synchronizes local and database information
  • Reload tables/table structure from DB – downloads predefined tables and table structures from an existing database.
  • Update Servoy sequences – downloads Servoy sequences (typically used as primary keys) stored on the database. 

The following actions are also available via the context menu on each server listed under the Database Servers node:

  • Open server (Opens the database editor to view/edit properties for the connection)
  • Open SQL Editor (Opens the database for editing using the SQL editor plugin)
  • Create table 
  • Duplicate Server 
  • Enable/Disable Server
  • Load relations (Loads predefined relations in the server)
  • Suggest foreign types 
  • Delete database 
  • Search for references (Search results will appear in Search view normally found at the bottom of the workbench)
  • No labels