> ## Documentation Index
> Fetch the complete documentation index at: https://docs.standardcomputers.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Standards Overview: Schema and Data Definitions in R1

> Understand what Standards are, how they define your data schema, and how to create, configure, and list Standards in your Standard System.

Standards are the core of the Standard System. Every piece of data you save, record, or log on your Standard System uses a Standard. For example, when you save a file on your Standard System, a built-in *file* Standard logs all files automatically so searches run faster. Think of a Standard as a database table definition — it sets the contract for how data should represent a real-world or conceptual object.

## Creating a Standard

When you create a Standard, save the file with the `.stds` extension. Each Standard lives in its own file, and the Standard's name must match its file name exactly.

A Standard always begins with the Standard name, followed by a colon, the Standard reference (an uppercase shorthand identifier), and a pair of curly brackets that contain the Standard's constraints:

```stds theme={null}
vehicle: VHL {
    private vin string:36! VN *
    protected make string MK *
    protected model string MDL *
}
```

In this example:

* `vehicle` is the Standard name (and the file name, `vehicle.stds`).
* `VHL` is the Standard reference used throughout your system to refer to this Standard in shorthand.
* Everything inside `{ }` is a constraint — the columns, variables, or properties that define what a `vehicle` record holds.

<Note>
  Each Standard must have its own `.stds` file, and the file name must match the Standard name exactly. For instance, a Standard named `vehicle` must be saved as `vehicle.stds`.
</Note>

### Enabling Change History

Prepend a Standard's name with `!` to enable change history for that Standard. When change history is on, your Standard System tracks every modification made to records in that table.

```stds theme={null}
!vehicle: VHL {
    private vin string:36! VN *
    protected make string MK *
    protected model string MDL *
}
```

## Listing Standards

After you've created Standards, you can inspect them directly from the command line. Use `stds` or `standards` to list all Standards in your system. To view the details of a specific Standard, pass the Standard name (not the Standard reference) as an argument.

Many web apps and client applications communicate with JSON. Append any standards command with `json` to view the output in JSON format.

```bash theme={null}
# List all Standards
stds

# View a specific Standard by name
stds vehicle

# View as JSON
stds vehicle json
```

<Tip>
  When referencing a Standard in queries or other Standards, always use the Standard reference (e.g. `VHL`) rather than the full name. The full name is only required when listing or inspecting Standards from the command line.
</Tip>
