User Interface
Introduction¶
The MIKE Workbench uses a database for data storage, and hence needs a connection to a database server and database in order to start up. PostgreSQL is the recommended database server, and installation guidelines are provided in the Platform installation guide.
A database server may contain several databases, and each database contains at least one so-called workspace that will store the project master data (workspace1).
Sometimes it will be desirable to copy all, or a subset of the master data to a separate project workspace, such that the data can be modified without changing the master data. When the work is complete the relevant parts of the modified data may be copied back to the master data workspace.
The relationships between the database server, the databases and the workspaces are illustrated below.
Users are created for each database. By default all users with administrator rights will have access to all workspaces. Users with non-administrator rights need to be granted access to a workspace by an administrator before being able to login to a workspace.
Database-, workspace- and user management is described in the following sections.
Database management¶
Databases cannot be created and managed directly from the Workbench. Instead a Database utility program is installed along with the Workbench.
The Database Manager Utility program is found under the MIKE INFO / MIKE OPERATIONS group in start.
The database utility program consists of a single toolbar and a log screen.
Besides database management, the Database utility program supports workspace and user management. This is useful when managing custom applications that do not expose the standard Workbench controls. However, when working in the standard Workbench configuration it is recommended to manage workspaces and users from within the Workbench.
Connecting to a Database Server¶
A database server is the application that hosts the databases. The database server can be installed either locally on the same PC as the Workbench, or on a remote PC. To work with the databases on a given database server, a connection from the database utility to the server needs to be established.
This is done by clicking the Server drop-down button, and selecting the server type. At the time of writing, PostgreSQL and Oracle is supported for MIKE OPERATIONS, while MIKE INFO also supports SQLite (only single user version).
Connecting to PostgreSQL¶
Selecting PostgreSQL database server type in the menu will open the login dialog, where the user is prompted for connection parameters.
The connection parameters are:
-
The name of the computer running the database server
-
The communication port
-
The name and password of a user with super user database server rights (for PostgreSQL the default super user is “postgres”)
-
The path to the database server tools
Click Ok to establish the connection, and to get the list of databases on the server listed in the log screen.
Connecting to SQLite¶
Selecting SQLite database server type in the menu will open the login dialog, where the user is prompted for connection parameters.
The connection parameters are:
-
The location of the database
-
The location of MIKE INFO database tools
Click Ok to establish the connection, and to get the list of databases on the server listed in the log screen.
The log screen can be cleared or saved to a text file by selecting the corresponding entries in server drop-down list.
Manage Databases¶
All database management is done through the Database Utility program. The available operations are available in the Database drop-down list, and they are described in the following sections.
Create a new database¶
A database server may contain a single or several databases. New databases are added to the server by selecting “New…” in the Database menu.
A dialog will appear, allowing for specification of a name for the database.
When clicking OK, the relevant database scripts are executed to create and prime the database. The progress is reported in the log screen. A workspace for the master data is automatically created when a new database is created. The master data workspace is assigned the name “workspace1”.
When the scripts have completed, a new database with a single, empty, workspace has been created, and can be connected to from the Workbench.
Update an existing database to a new version¶
When a new Workbench version is released, existing database needs to be updated accordingly. This is done by selecting “Update…” from the database menu, and selecting the database to upgrade from the list in the Update dialog.
It is recommended to take a backup of a database before updating. The time it takes to complete the update the database depends on the amount of data in the database, and for very large databases it may take hours.
Backup and restore a database¶
An existing database can be exported to a file on the disk by selecting the “Backup…” entry in the Database menu.
The name of the database that shall be exported can be selected from the drop down list that appears when clicking Backup. Moreover, the path and name of the file backup file must be provided (extension .backup).Click the Backup button to complete.
To restore a database from a file, simply click “Restore…” in the Database menu, browse to the .backup file, provide a name for the database to restore to, and click “Restore”.
The database backup will be restored to a new database with the specified name.
Please note: It is only possible to restore a PostgreSQL database into another PostgreSQL and likewise with SQLite.
Delete a database¶
To delete a database, click “Remove…” in the Database menu, select the database to delete in the list, and click Drop.
List connected users¶
Before changing or deleting a database, the currently connected users may need to be warned, and asked to log off. A list of the users connected to a given database can be obtained by selecting “Online users…” in the Database menu, select a database in the dialog, and click OK.
Workbench login¶
When the Workbench is started up, a login dialog appears and the user is prompted for a database connection, user credentials and a workspace.
The first time the user logs in, all fields will be empty and the first step will be to establish a connection to the database. A connection can be specified by clicking the “Setup..” button in the form. Click “Add…” to add a new connection.
The connection setup dialog opens. Chose database engine at the bottom.
The following information must be provided for PostgreSQL (left image above):
-
Connection name: This is the user defined name that will represent the collection of connection parameters specified below. It is the connection name that will appear in the Connection drop-down list in the login dialog.
-
Server: This is the name of the computer on which the database server is running. If the server is running on the same computer as the Workbench, the server will be localhost.
-
Port: This is the communication port used by the server. The port was specified during the installation of the database server, and a common default is 5432.
-
Database: This is the name of the database to connect to. The database was assigned a name when it was created using the database utility program.
-
Database type: The database server type.
The following information must be provided for SQLite (right image above):
-
Connection name: This is the user defined name that will represent the collection of connection parameters specified below. It is the connection name that will appear in the Connection drop-down list in the login dialog.
-
Database: This is the name and location of the database to connect to. The database was assigned a name when it was created using the database utility program. Note the .sqlite extension on the database name.
-
Database type: The database server type.
Click OK to save the connection. Notice that any number of connections may be defined by following this procedure. When done, close the Connection manager dialog.
The Connection name(s) are now available in the Connection list.
Next, a user name and password must be provided. When a new database is created a default user with administrator rights is automatically created. The user name and password for this user is:
User name: admin
Password: dssadmin
Use these credentials when logging in for the first time. The Workspace drop-down list will contain all the workspaces in the selected database. A new database will only contain the master data workspace (workspace1).
Click OK to complete the login.
User management¶
When a new database is created, the only user that can access the database will be the admin user which is created by default (see section 3 above). In most cases it will be feasible to grant a number of named users access to the database, possibly with different access rights.
Users are created per database. Users that have been granted administrator rights will by default have access to all workspaces in the database. Users that are not administrators will have to be assigned to a workspace before being able to login.
User management is handled through the System explorer. If the System explorer is not visible after login, it can be enabled by right-clicking on the explorer header, and selecting System in the menu (alternatively, it can be enabled through the View \ Explorers menu).
The System explorer initially only contains a single user (admin), and the master data workspace (workspace1).
Create and Delete Users¶
New users can be added by an administrator by right-clicking on the Users node and select “Create user…”.
The “New user profile” data view opens, and the administrator can enter the user information.
Notice that there are two authentication options. The first is to use Native authentication which implies that the user name and password will be stored in the Workbench database. The other option is to use Active directory authentication, where the user can use the domain credentials to access the Workbench.
If native authentication is selected, both user name and password must be specified. If the Active directory authentication is used, the user name must include the domain, but no password shall be specified.
Click Save to create the new user.
Unless the user was granted administrator rights when created, the user will not have access to any workspaces, and hence will not be able to login until assigned to a workspace.
An administrator can delete an existing user by right-clicking on the user and select “Delete”.
Edit User Information¶
Once a user has been created, the administrator may change full name and email address for all users in the system. This is done by right-clicking on a user, and selecting Edit.
The logged in user may change the same information, plus the password by right-clicking the “My profile” node and selecting the appropriate entry in the menu.
Workspace management¶
Workspaces are created, managed and deleted under the System explorer. To import and export entire workspaces, it is however necessary to use the Database utility.
When a new workspace is created it is empty by default, and the relevant data must be copied from the master data workspace (workspace1) to the new workspace by using the Import data and Export data tools, which are available in the Workbench toolbox.
Create and Delete Workspaces¶
New, empty workspaces are created by selecting “Create…” in the Workspaces context menu, and provide a name for the workspace.
The workspace now appears as a node under Workspaces. A workspace may be deleted by selecting “Delete” from the workspace context menu.
Assigning Users to Workspaces¶
Users without administrator rights need to be assigned to a workspace in order to access it. This is done by selecting “User associations…” from the workspace context menu.
The Workspace information view opens, and users can now be added to the workspace. Notice that only users that do not have administrator rights will appear in the list.
When a user has been assigned to a workspace, the user must be assigned a role. The three different roles are:
-
Workspace lead: The workspace lead is the workspace administrator, and a user with this role has full read and write access to all data in the workspace, and may import and export data to/from the workspace. Moreover, the workspace lead can assign new users to the workspace. The workspace lead can, however, not delete a workspace. Deleting a workspace required administrator rights.
-
Workspace member: A workspace member has the same rights as the workspace lead, except that a workspace member cannot assign new users to a workspace.
-
Workspace reviewer: A workspace reviewer has read-only access to all data in the database.
Exchanging Data Between Workspaces¶
When a workspace is initially created it contains no data, and typically the first step will be to copy a sub-set of the data in the master data workspace to the new workspace.
Data is not exchanged directly between the workspaces, but instead data will first be exported to a repository on the disk using the Data export tool. Next, the data can be imported to a different workspace using the Data import tool.
This is done by logging into the master data workspace (workspace1), and selecting the Data export tool in the Workbench toolbox.
The tool has a single property which is the Export path. Data will initially be exported to the folder selected under this property. Open the tool by clicking the run button.
Data can now be exported simply by dragging them from the explorers to the export view.
Each time a new entity type is added, a corresponding new tab will be added to the tool view.
Data is exported immediately after dropping the data entities in the view, and hence, when all relevant data has been added, the view may be closed.
To import the data in a different workspace, start by logging into the target workspace. Then select the Data import tool, and set the import path to the folder where data was exported to in the previous step.
Run the tool to open the data import view, and click Start to complete the import. If any errors have occurred during import, they will be reported in the tool view. Finally, close the tool view.
Export and Import Workspaces¶
Sometimes it may be desirable to exchange entire workspaces, which are handled by first exporting the entire workspace to a repository on the disk, and then import it either to the same database with a new workspace name, or to a different database. This is all handled using the Database utility tool.
To export a workspace, start by selecting “Export…” in the Workspace menu in the Database utility program.
Select a Database and workspace as well as a file location in the export dialog, and click export.
The entire workspace will be exported to the specified file (.wksp). To import the workspace from the .wksp file, select “Import…” in the Workspace menu.
Select the database to import to, provide a (new) name for the workspace, and browse to the wksp file.
Finally, click Import to import the workspace to the selected database. When the import is complete, the workspace will be visible in the System explorer, and users may be assigned to the workspace by an administrator.