# Prepare Database Server

Before configuring ONEWEB platform components, the **database server must be prepared in advance**.\
Proper database preparation ensures that platform components can connect to the required data sources during deployment and runtime.

Database creation is a **mandatory first step**, as ONEWEB archives cannot be deployed until the required schemas are available.

***

#### Purpose of Database Preparation

When planning database configuration for ONEWEB, administrators need to understand:

* Which **ONEWEB components** will be used
* Which **database schemas** are required for each component
* Administrative tasks required to manage the database
* Security privileges needed for database access

This preparation helps prevent deployment failures and simplifies long‑term maintenance.

***

#### ONEWEB Components and Database Schemas

The table below lists the **database schemas required by ONEWEB components** and their associated purposes.

| ONEWEB Component             | Database Schema                                     |
| ---------------------------- | --------------------------------------------------- |
| A2M                          | `eaf_master`                                        |
| IAM2                         | `iam2`                                              |
| App Designer (Configuration) | `eaf_master`                                        |
| App Designer (Transaction)   | Transaction schema (custom name, e.g. `erp_oneweb`) |
| App Runtime                  | Transaction schema defined in App Designer          |
| Process Designer             | `pd`                                                |
| PD Monitor                   | `pd`                                                |
| Process Runtime              | `bpm`                                               |
| Microflow Designer           | `mfd`                                               |
| Microflow Runtime            | Not required                                        |
| AppSpace                     | `asp`                                               |
| Pipeline / Deployment Center | `dpc2`                                              |
| Page Designer                | `page`                                              |
| Page Runtime                 | Not required                                        |
| Dashboard                    | `dashboard_widget`                                  |
| Survey Rabbit                | `survey_rabbit`                                     |
| Scheduler                    | Not required                                        |

> Schema names may be adapted to organizational naming conventions, except where explicitly required by the platform.

***

#### Mandatory Database Setup

Before deploying ONEWEB:

* All required **schemas must be created**
* Database users must have sufficient privileges on those schemas
* Data sources must be able to connect successfully

Without this preparation, ONEWEB archives cannot be deployed or initialized.

***

#### Database Design Recommendations

The following best‑practice recommendations help improve performance, stability, and maintainability.

**Separate Tablespaces per Application**

* Use **separate tablespaces** for each application or schema
* Issues in one tablespace will not affect other applications
* Individual tablespaces can be taken offline without impacting the entire system

***

**Separate Tables and Indexes**

* Store **table data and index data in separate tablespaces**
* This is a common best practice for production environments
* Improves performance tuning and maintenance flexibility

***

**Consistent Data File Naming**

* Use **clear and readable naming conventions** for data files
* Example naming format:
  * `EAF_MASTER_data_01.datafile`
  * `BPM_data_01.datafile`

Consistent naming simplifies administration and troubleshooting.

***

#### Architectural Considerations

From a platform configuration perspective:

* Small environments may consolidate schemas on a single database instance
* Large or critical systems should consider separating configuration and transaction schemas
* Database preparation should align with:
  * Selected deployment architecture (Standalone, HA, Cloud)
  * Environment strategy (Testing, Production, DR)
  * Backup and recovery requirements

***

#### Summary

Preparing the database server correctly ensures that:

* ONEWEB components can be deployed without errors
* Platform configuration proceeds smoothly
* Database performance and scalability are supported from the start

Database preparation is a foundational step in successful ONEWEB platform configuration.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onewebstack.com/oneweb-platform-th/getting-started/platform-configuration/platform-components-overview-and-management/prepare-prerequisite-software/prepare-database-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
