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

# Collection Node

> Define database table schemas for your application data

## Overview

The **Collection Node** defines database table schemas. It specifies what data structure your tables will have, including field names, types, and validation rules.

<img src="https://mintcdn.com/vibeflow/Vp9iYgMK68mQ5fXV/images/collection-node.png?fit=max&auto=format&n=Vp9iYgMK68mQ5fXV&q=85&s=c0eabc28e2585dbdacb561d26d626125" alt="Collection Node configuration showing schema fields, types, and basic indexes" style={{ width: "100%", borderRadius: "8px", marginTop: "1rem", marginBottom: "2rem" }} width="1218" height="1438" data-path="images/collection-node.png" />

<Warning>
  Collection nodes define schemas only; they don't connect to other nodes. Other nodes reference collections by name.
</Warning>

## Required Configuration

### Table Name

The name of your database table (e.g., `users`, `products`, `orders`)

### Schema Fields

At least one field beyond the auto-generated `id` field. Each field needs:

* **Field Name:** Non-empty identifier
* **Field Type:** Select at least one data type
* **Required/Optional:** Must be explicitly set

## Optional Configuration

### Indexes

You can add **Basic Indexes** to speed up queries on specific fields. Each index is configured with a name and one or more fields from your schema.

Basic indexes allow faster lookup and sorting operations on the selected fields. Field order matters when configuring multi-field indexes.

## How to Use

1. **Create Collection Node.** Define your table schema.
2. **Reference by Name.** In Query/Mutation nodes, set the Collection field to your table name.
3. **No Direct Connections.** Collection nodes don't connect to other nodes.

## Related Nodes

<CardGroup cols={2}>
  <Card title="Query Node" icon="search" href="/nodes/query-node">
    Read data from collections
  </Card>

  <Card title="Mutation Node" icon="edit" href="/nodes/mutation-node">
    Create, update, delete collection data
  </Card>
</CardGroup>
