Almost all Servoy applications utilize a database to store user data and application metadata. Servoy can connect to any database that has a JDBC driver available. Servoy bundles PostgreSQL by default, but PostgreSQL can be removed and replaced by any database management system (DBMS).
In Servoy Developer, a new PostgreSQL database can be created from the Solution Explorer tree.
From within Servoy Develop connections to existing databases can also be setup:
application_server/drivers
folder in the Servoy installation folder.Create a new Database Server connection by right clicking on Database Servers node (under Resources) and selecting New Server. A submenu will provide choices of different popular database choices that will fill in some of the connection information to make setup easier.
Even though a database is listed here, the JDBC driver must still be installed in the drivers folder in order to connect to the database. |
Fill in the Server Name, User Name, Password, URL, and Driver for the database. The correct values for the URL and Driver should be obtained from the database documentation, or suggested values will be already entered when going through the New Server menu.
The user account should be of administrator level as to have full access to database objects in Servoy. |
It is best practice to create the data model (tables, primary keys, foreign keys, and fields) before starting to create a solution.Objects in the database can be created with database tools built to administer the database, or within Servoy Developer.
To create a table in Servoy Developer:
The table editor view will appear allowing new columns to be entered.
When a new table is created, Servoy will add a column in the table editor for the primary key. All tables used in Servoy must have a primary key or a row identifier. |
To create columns in Servoy Developer:
Servoy periodically produces Technical Webinars targeted to developers covering a broad range of topics, from new features to new capabilities to best practices.
The following webinar is focused on how Servoy manages some advanced DB functionality like handling failed saves, transactions, record locking and batch updates
The following webinar is focused on the Servoy Query Builder Tool that makes easier to query databases without writing SQL and makes queries database independent