Skip to content

Database

Database and system administration topics cover the server-side configuration of WSi — database management, user accounts, and system-wide defaults.

Topics

TopicDescription
Database ManagementThe Database Management dialog — 91 tables, import/export, and wizards
Custom CalculationsWriting custom cost and time formulas per process
Process TreeHow the process hierarchy controls which processes are available
Settings TableApplication-wide key/value defaults stored in the database
Materials & StockSheet materials, tube materials, profiles, specifications, and stock sizes
Tooling & BendingDies, punches, cutting tools, and bend deduction tables
Pricing & RatesHourly rates, sheet/tube prices, surcharges, and cost calculation

TIP

These topics are intended for system administrators. If you are a regular WSi user, you likely do not need to access these settings. Contact your sales representative at WSoptics if you have questions.

Database Management

WARNING

Always save a backup of your current database before making changes. Use File → Save database to create a backup .dat file you can restore from if needed. Incorrect values affect cost calculations and process parameters throughout WSi — make sure you understand the impact of any change before applying it.

What the Database Dialog Is For

The Database dialog is WSi's central hub for viewing and editing all built-in data tables that drive the application's cost calculations, process parameters, and manufacturing rules. It gives you access to 91 tables covering materials, processes, pricing, tooling, and system settings.

The dialog is primarily for users who configure WSi for their company — typically a system administrator or a designated WSi power user working under guidance from WSoptics.

Table Groups Overview

The 91 tables are organised into five logical groups:

GroupWhat it coversDocs
MaterialsSheet materials, tube materials, profiles, stock, coatingsMaterials & Stock
Processes & RatesProcess tree, hourly rates, time fallbacksProcess Tree, Pricing & Rates
Tooling & BendingDies, punches, cutting tools, bend deductionTooling & Bending
PricingPrices, rates, surcharges, transportPricing & Rates
ConstraintsDimensional limits, material compatibility, prioritiesTooling & Bending

Each group has its own dedicated documentation page with the full table reference. The sections below give a high-level overview only.

Opening the Dialog

Navigate to Settings → Database. The dialog opens with a table list on the left and a data editor on the right.

Dialog Features

Editing Tables

Click a table name in the left sidebar to open it in the editor on the right. The editor shows the table's columns and rows in a spreadsheet-like view. You can:

  • Edit cells directly by clicking on them
  • Add or remove rows using the context menu (right-click)
  • Delete a row with the normal delete action, or cascade delete (which also removes dependent rows in related tables)

A filter field at the top of the editor lets you search within the currently visible table.

Table Visibility

Click Edit table selection in the menu bar to show or hide individual tables from the left sidebar. This helps you focus on the tables you need without scrolling through all 91.

Pending Changes

The dialog tracks changes made since it was opened. Click Pending changes to see a diff view comparing your current edits against the table's initial state when the dialog opened.

Error Reporting

If any table contains data that fails validation (e.g. missing references, invalid values), an Errors panel appears at the bottom of the dialog. It shows the type of error, the affected table/column/row, and related tables/columns for context. Click Details to see more information.

File Menu

The File menu provides backup, restore, and import/export operations.

Save Database

File → Save database writes all current table data to a single .dat database file. Changes are also saved automatically when you close the dialog (you are prompted to confirm if there are unsaved changes).

Load Database

File → Load database reads table data from a .dat database file and replaces the current data. This is useful for restoring from a backup or switching to a different database configuration.

Export

  • File → Export → Export all tables (JSON) — Exports every table to JSON files.
  • File → Export → Export all tables (CSV) — Exports every table as CSV files. Useful for editing in a spreadsheet application.
  • Right-click any table in the sidebarExport (JSON) or Export (CSV) to export that one table.

Import

  • File → Import → Import table from file — Bulk import tables from local files (JSON or CSV).
  • File → Import → Import table from server — Import tables from an HTTP server.
  • Right-click any table in the sidebarImport (File) to replace that table with data from a local file.

TIP

You can also open the CSV Import settings dialog from the menu bar to configure delimiter, encoding, and other import options.

Restore Defaults

  • File → Restore Defaults → Restore current table — Resets the selected table back to its built-in default values.
  • File → Restore Defaults → Restore all tables — Resets all 91 tables to their built-in defaults. This preserves any custom function IDs in the Processes - Calculation table, so your custom calculation scripts are not lost.

WARNING

Restoring defaults replaces all your changes for the affected table(s). Make sure you have saved or exported your data first.

Wizards

The dialog provides several wizards accessible from the Tools menu:

  • Sheet Price Editor — Guides you through setting up sheet pricing parameters
  • Tube Price Editor — Guides you through setting up tube pricing parameters
  • Motion Parameter Wizard — Helps configure motion parameters for cutting operations
  • Setup Wizard — General setup assistance for initial WSi configuration
  • Create Missing Sheets — Automatically generates sheet entries for materials that are missing sheet definitions
  • Create Missing Tubes — Automatically generates tube entries for materials that are missing tube definitions

Version Compatibility

WSi tracks database versions to ensure compatibility between the application and the data:

  • If you open a database that was last edited with a newer version of WSi, the dialog opens in read-only mode. You can view data but not edit it — you need to upgrade to the minimum required version.
  • If the database has been migrated by a newer version, your changes may not apply to future versions. The dialog shows a "Database stale" warning in this case.
  • Some changes to table values may trigger a database fork — a duplication of the database to preserve compatibility with older versions. You are prompted to confirm before this happens.

Changing the Database

If you need to switch to a different database (for example, to load a project-specific database), use Settings → Client → Reset → Change Database. This closes the current database and prompts you to select a new one. The application restarts with the new database.

TIP

Changing the database restarts the application. Make sure you save any unsaved work first.