> For the complete documentation index, see [llms.txt](https://docs.openg2p.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openg2p.org/products/registry/registry/developer-zone/building-a-registry/concepts/registry-and-register-metadata.md).

# Register Metadata

While the **ORM models** define how data is stored in the database and the **Pydantic schemas** define validation and API data structures, the OpenG2P Registry platform also requires registers to be defined in **platform metadata tables**.

These metadata definitions allow the platform to dynamically:

* Discover available registers
* Configure UI rendering
* Route API requests
* Load appropriate service classes and domain models

The metadata is also important for the **Registry UI layer**, which uses these definitions to dynamically render register interfaces and workflows.

The primary metadata table used for this purpose is **`g2p_register_definition`**.

Register metadata can be created either:

* Directly through database configuration scripts, or
* Through the **Configuration section of the Registry Staff UI**

***

### Metadata Model Relationships

```mermaid
erDiagram
    G2PRegisterDefinition ||--o{ G2PRegisterSchema : "has"
    G2PRegisterDefinition ||--o{ G2PRegisterSection : "has"
    G2PRegisterDefinition ||--o{ G2PRegisterUITab : "has"
    G2PRegisterDefinition ||--o{ G2PIntakeFormDefinition : "has"

    G2PRegisterUITab ||--o{ G2PRegisterUITabSection : "orders"
    G2PRegisterSection ||--o{ G2PRegisterUITabSection : "placed in"

    G2PIntakeFormDefinition ||--o{ G2PIntakeFormUITab : "has"
    G2PIntakeFormUITab ||--o{ G2PIntakeFormUITabSection : "orders"
    G2PRegisterSection ||--o{ G2PIntakeFormUITabSection : "reuses"
```

***

### Metadata Tables

| Document                                                                                                                                                          | SQL seed file                         | Purpose                                                    |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | ---------------------------------------------------------- |
| [G2PRegisterDefinition](/products/registry/registry/developer-zone/building-a-registry/concepts/registry-and-register-metadata/g2pregisterdefinition.md)          | `g2p_register_definitions.sql`        | Register catalog, hierarchy, dedup and ID flags            |
| [G2PRegisterSchema](/products/registry/registry/developer-zone/building-a-registry/concepts/registry-and-register-metadata/g2pregisterschema.md)                  | `g2p_register_schemas.sql`            | Dedup, search result, and filter JSON schemas              |
| [G2PRegisterSection](/products/registry/registry/developer-zone/building-a-registry/concepts/registry-and-register-metadata/g2pregistersection.md)                | `g2p_register_sections.sql`           | Section UI schema, verification, list display              |
| [G2PRegisterUITab](/products/registry/registry/developer-zone/building-a-registry/concepts/registry-and-register-metadata/g2pregisteruitab.md)                    | `g2p_register_ui_tabs.sql`            | Staff portal tab layout per register                       |
| [G2PRegisterUITabSection](/products/registry/registry/developer-zone/building-a-registry/concepts/registry-and-register-metadata/g2pregisteruitabsections.md)     | `g2p_register_ui_tab_sections.sql`    | Tab → section ordering                                     |
| G2PRegistryDocument                                                                                                                                               | `g2p_registry_documents.sql`          | Registry-level files in object storage (templates, assets) |
| [G2PIntakeFormDefinition](/products/registry/registry/developer-zone/building-a-registry/concepts/registry-and-register-metadata/g2pintakeformdefinition.md)      | `g2p_intake_form_definitions.sql`     | Intake form definitions                                    |
| [G2PIntakeFormUITab](/products/registry/registry/developer-zone/building-a-registry/concepts/registry-and-register-metadata/g2pintakeformuitab.md)                | `g2p_intake_form_ui_tabs.sql`         | Tabs within an intake form                                 |
| [G2PIntakeFormUITabSection](/products/registry/registry/developer-zone/building-a-registry/concepts/registry-and-register-metadata/g2pintakeformuitabsections.md) | `g2p_intake_form_ui_tab_sections.sql` | Intake tab → section ordering                              |


---

# 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.openg2p.org/products/registry/registry/developer-zone/building-a-registry/concepts/registry-and-register-metadata.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.
