> For the complete documentation index, see [llms.txt](https://docs.amltd.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.amltd.com/dc-works/getting-started/create-a-database-and-table.md).

# Create a Database and Table

## Create a Database and Table

Before creating an Applet, you need a place to store the information it will collect. In DC Works, information is stored in **tables**, and tables are organized within **databases**.

In this guide, you will create:

* A database named **Getting Started**
* A table named **Asset Check-In**
* Five fields for storing asset check-in information

### Create the database

1. In the DC Works Designer, select **Data** from the left navigation menu.
2. On the **Databases** page, select **Create**.
3. In the **Create Database** window, enter `Getting Started` in the **Database Name** field.
4. Select **Create**.

<figure><img src="/files/DMFGAKrNwM4M92Q5JHQG" alt=""><figcaption></figcaption></figure>

*Create the Getting Started database.*

The new database appears on the Databases page.

### Open the database

Select **Getting Started** from the database list.

The database opens to its **Tables** page. Because this is a new database, it does not contain any tables yet.

### Create the table

1. Select **Create**.
2. In the **Create Table** window, select **From Scratch**.
3. Enter `Asset Check-In` in the **Table Name** field.

The other available creation methods—**By Import** and **Table Templates**—will be covered elsewhere in the documentation.

### Add the table fields

Under **Table Fields**, create the following fields:

| Field name             | Data type | Primary field |
| ---------------------- | --------- | ------------- |
| Asset ID               | Text      | Yes           |
| Employee or Location   | Text      | No            |
| Check-In Date and Time | Date      | No            |
| Condition              | Text      | No            |
| Notes                  | Text      | No            |

To add each field:

1. Select the **plus** icon beside **Table Fields**.
2. Enter the field’s name.
3. Select its **Data Type**.
4. Select the **checkmark** to save the field.

Repeat these steps until all five fields appear in the table.

Use the **pencil** icon to modify a field before creating the table. Use the **trash** icon to remove one.

<figure><img src="/files/2rfV8p1KCF1DRm0WQMjW" alt=""><figcaption></figcaption></figure>

### Select the Primary Field

Select the checkbox in the **Primary Field** column for **Asset ID**.

The Primary Field identifies each record when its data is displayed or referenced. For this table, the asset’s ID is the most useful identifying value.

{% hint style="warning" %}
Select **Asset ID** as the Primary Field.

Only one field should be designated as the table’s Primary Field.
{% endhint %}

{% hint style="info" %}
The **List** option is not required for this tutorial. It will be explained later with other field settings.
{% endhint %}

### Create the table

After confirming the table name, fields, data types, and Primary Field, select **Add Table**.

The **Asset Check-In** table now appears on the Getting Started database’s Tables page.

<figure><img src="/files/9zCNn64zeQtPpLdyKqz3" alt=""><figcaption></figcaption></figure>

### View the table’s records

Select **Asset Check-In** to open the table.

The table initially opens to the **Records** view. This is where you can view the information stored in the table.

Because the table has just been created, it displays **No records to display**.

<figure><img src="/files/d2jNE3CSqXDLQGGQr1xh" alt=""><figcaption></figcaption></figure>

The Records view includes columns for:

* Asset ID
* Employee or Location
* Check-In Date and Time
* Condition
* Notes

From this page, authorized users can also add or import records. We will populate the table later through the Applet created in this tutorial.

### View and edit the table fields

Select **Fields** near the top of the page to view the table’s structure.

In addition to the five fields you created, DC Works automatically adds several system fields:

| System field  | Purpose                                   |
| ------------- | ----------------------------------------- |
| Row Key       | Internal identifier for the record        |
| Date Created  | Date and time the record was created      |
| Last Modified | Date and time the record was last changed |
| Created By    | Identifies who or what created the record |

These system fields are managed by DC Works.

The fields you created appear below the system fields. To modify one, select its **pencil** icon. To remove an eligible field, select its **trash** icon.

You can also select **Add Field** to add another field after the table has been created.

{% hint style="warning" %}
Changing or deleting fields in a table that already contains data or is used by an Applet may affect existing records and Applet functionality.
{% endhint %}

### Other table views

The table page contains three principal views:

* **Records** — View and manage active table records.
* **Fields** — View, add, edit, or remove table fields.
* **Deleted** — View records that have been deleted (they can be restored for up to 30 days).

For this tutorial, you will primarily use **Records** and **Fields**.

### Next step

Your database and table are now ready. Continue to **Create Your First Applet** to build the interface that will collect information in the Asset Check-In table.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.amltd.com/dc-works/getting-started/create-a-database-and-table.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
