> For the complete documentation index, see [llms.txt](https://trillo.gitbook.io/trillo-workbench-java-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trillo.gitbook.io/trillo-workbench-java-sdk/database.md).

# DSApi (Database APIs)

This section described database APIs. Each database API is a static method of a Java class called DSApi.

Some database APIs take a special parameter called **auditMsg.** It is optional. It is used to create an audit-log of database operations. When it is provided its behavior is as follows:

* If **auditMsg** is non-blank then the provided string is logged into a special table called **AuditLog\_tbl.**
* If **auditMsg** is provided buts its value in an empty string or a string with the value "true", the system generates the log message which corresponds to the operation. For example, "Deleted \<id of the record>.
* Each log message has a timestamp, user-id of the user if the operation is performed in the context of a user.

{% hint style="info" %}
Each database API is a static method of a special Java class called **DSApi.**
{% endhint %}

## Primary Key

Each table created using Trillo Workbench creates the following columns. Each column except the **id** column is optional (can be removed). The column **id** is required for all newly created tables. Its type is **BigInteger** and it is auto-assigned by the database.

The list of columns (attributes assigned to the class) automatically created for a table is as follows:

| **Name**  | **Type**   | **Description**                                                                                                                                                                                                                               |
| --------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id        | BigInteger | The primary key of record, auto-assigned                                                                                                                                                                                                      |
| createdAt | BigInteger | The time of the creation of the record in UTC (epoch)                                                                                                                                                                                         |
| updatedAt | BigInteger | The time the record was updated last.                                                                                                                                                                                                         |
| deleted   | Boolean    | Trillo APIs "**delete"** do not delete a record. They mark the record as deleted. APIs A flag to indicate this record is logically deleted. It will be opaque in all queries and API unless a special flag is used to included deleted items. |
| deletedAt | BigInteger | The time the record was deleted.                                                                                                                                                                                                              |
