OriginChainDB

Create a table in the console

Name a table, choose its fields and check the saved definition.

Create a small public.tasks table with two text fields: id and title.

Screenshots show the current local console with sample data. Live controls depend on your instance's capabilities; preview changes stay in the browser. Select a screenshot to enlarge it.

Create a table in Data ExplorerCreating a table defines its structure; adding records is a separate step.
  1. Choose New tableOpen Data Explorer in the selected database.
  2. Name the table and keyChoose the field that uniquely identifies each record.
  3. Add and review fieldsSelect a type and required settings for each field.
  4. Create and inspect StructureConfirm the saved definition before adding records.

1. Open the table editor

Open your instance → Data Explorer → New table.

2. Name the table and its fields

Use public.tasks; keep id as the required primary key and title as text.

Use public.tasks; keep id as the required primary key and title as text.

Create a table dialog with public namespace, tasks table and id and title string fields

The primary key gives each task a unique ID; Required means a record must include that field.

3. Choose the datatype

Choose the value a field accepts, such as text, a number or true/false.

Choose the value a field accepts, such as text, a number or true/false.

Native datatype picker in the table editor

Keep String for both fields in this example, then choose Create table (or Register table on a connected instance).

4. Check the new table

Confirm tasks appears with two fields; zero records is expected until you add data.

Confirm tasks appears with two fields; zero records is expected until you add data.

Data Explorer showing public.tasks with id and title fields and zero records

5. Inspect the saved fields

Open Structure to check field types, the primary key and available edit actions.

Open Structure to check field types, the primary key and available edit actions.

Structure view of the newly created tasks table

Add the first record when the definition is correct.

Indexes, relationships and later changes
  • Indexes: open the Indexes view; a modality checkbox alone does not build a working search index.
  • Connections: inspect the schema map; declare a relation before querying it.
  • Edit structure: review which changes the connected instance allows before submitting.
  • Delete: remove dependencies and read the confirmation; deleting a live table can remove its data.

See vector setup or full-text setup when you need search.

Prefer a schema file?

The visual editor uses fields, not a TOML tab; use the registration API for a file.

Separate example: an orders schema in TOML
namespace   = "shop"
table       = "orders"
primary_key = ["id"]

[[columns]]
name = "id"
ty = "str"
required = true

[[columns]]
name = "customer"
ty = "str"
required = true

[[columns]]
name = "amount_cents"
ty = "i64"
required = true

[[columns]]
name = "status"
ty = "str"
required = true

[[columns]]
name = "notes"
ty = "str"

[[columns]]
name = "placed_ms"
ty = "u64"

[[indexes]]
name = "by_status"
columns = ["status"]

[[check_constraints]]
name = "amount_non_negative"
expression = "amount_cents >= 0"
[[relations]]
name = "placed_by"
from_col = "customer"
target = { namespace = "shop", table = "customers", pk = "id" }
bidirectional = true

The optional relation requires shop.customers to exist first.

© 2026 Silicoyn Technologies Pvt Ltd

On this page