Database Settings
Rulex relies on a database management system, which maintains all the information needed for its functioning as well as input and output tables concerning each elementary block.
Rulex provides a SQLite instance in its installation, which requires no further configuration.
If you want to change this default behavior, the following database versions (or higher) are recommended:
Format | Version |
---|---|
Oracle DB (11 & 12) | 11g or higher |
SQLite | 2.6.0 + |
PostregreSQL (9.0+) | 9, 10, 11 |
SQL Server | 2014, 2016, 2017 |
Modifying database settings
To use a new database simply specify the parameters described in the table below for the new database in File > Database Preferences.
Once correctly defined, the system will reboot automatically and the connection to the new database will be established.
You may also need to modify these parameters when changing the underlying Rulex database settings
Database Preferences options | ||
Parameter Name | PO | Description |
---|---|---|
Platform | type | The database platform. The following platforms are currently supported as database preferences for Rulex:
|
Server | server | The name or the IP of the database server to connect to. |
Port | port | The port of the target server. |
Db name | name | The unique name of the database. |
Authentication | winauth | The type of the authentication (User Name/Password or Window Authentication) |
User name | usr | The name corresponding to a valid user of the database with owner rights |
Password | pwd | The password for the entered user name. From version 4.4.1 of Rulex passwords will be automatically encrypted. |
Schema | schema | The schema of the new database |
Driver | driver | The driver to be used by the SQL Server database (SQL Server only) |
Service name | service | The name of the service used by the Oracle database (Oracle only) |
The only parameter required when connecting to a SQLite database is the database name, which can be manually entered or selected by browsing through available files. If the name you enter does not correspond to an existing database, a new database with the specified name can be created.
Managing database size
SQLite databases tend to grow quickly, and when data are deleted from them they leave behind empty spaces. The database may consequently be larger than strictly necessary.
To get around this problem you can resize the database (File > Resize database), which effectively rebuilds the database, reclaiming these empty spaces and consequently reducing the size of the database file.
From a SQL view point this commands executes a VACUUM statement.
Creating a database snapshot
All SQLite tables are contained in a single file, so it could be a good idea to take a snapshot of the current state of the working database.
This is easily done by saving a copy of the database file (File > Save database file as) and selecting the path where you want to save the copy.