Skip to content
dataverse-schema-design logo

Dataverse Schema Design

dataverse-schema-design

This skill provides guidance on designing Dataverse table schemas and data models. Use when users ask about "Dataverse table design", "Dataverse schema", "Dataverse relationships", "Dataverse columns", "data modeling Dataverse", "Dataverse best practices", or need help designing their data struct...

SKILL.md

Full skill instructions

dataverse-schema-design

This skill provides guidance on designing Dataverse table schemas and data models. Use when users ask about "Dataverse table design", "Dataverse schema", "Dataverse relationships", "Dataverse columns", "data modeling Dataverse", "Dataverse best practices", or need help designing their data structure.

Table Design Fundamentals

Naming Conventions

  • Table prefix: Use publisher prefix (e.g., new_, cr123_)
  • Table names: PascalCase, singular (e.g., new_Project, new_Task)
  • Column names: prefix_columnname (e.g., new_projectname, new_startdate)

Create Table with SDK

# Basic table
client.create_table("new_Project", {
    "new_ProjectName": "string",      # Text column
    "new_Description": "string",       # Multi-line text
    "new_Budget": "decimal",           # Currency/​decimal
    "new_StartDate": "datetime",       # Date and time
    "new_IsActive": "bool",            # Yes/​No
    "new_Priority": Priority           # Choice/​enum
})

Column Types

Text Columns

# Single line (max 4000 chars)
"new_Name": "string"

# Multi-line text (memo)
"new_Description": "string"  # Will be nvarchar(max)

Number Columns

# Integer
"new_Quantity": "int"

# Decimal (with precision)
"new_Amount": "decimal"  # Default precision

# Currency (use decimal with formatting)
"new_Budget": "decimal"

Date/​Time Columns

# Date and time
"new_StartDate": "datetime"

# Date only (format in app)
"new_DueDate": "datetime"

Boolean Columns

# Yes/​No
"new_IsActive": "bool"
"new_IsApproved": "bool"

Choice (Picklist) Columns

from enum import IntEnum

class Status(IntEnum):
    DRAFT = 1
    SUBMITTED = 2
    APPROVED = 3
    REJECTED = 4

class Priority(IntEnum):
    LOW = 1
    MEDIUM = 2
    HIGH = 3

# Create table with choices
client.create_table("new_Request", {
    "new_Name": "string",
    "new_Status": Status,
    "new_Priority": Priority
})

Relationship Patterns

One-to-Many (1:N)

Parent table has many child records.

Account (1) ←→ (N) Contact
└── An account has many contacts

Project (1) ←→ (N) Task
└── A project has many tasks

Implementation:

  • Create lookup column on child table
  • Reference parent using @odata.bind
# Create contact linked to account
contact = {
    "firstname": "John",
    "lastname": "Doe",
    "[email protected]": f"/​accounts({account_id})"
}
client.create("contact", contact)

Many-to-Many (N:N)

Records in both tables can relate to multiple records in the other.

Account (N) ←→ (N) Contact
└── Contacts can be related to multiple accounts

Note: N:N relationships require creating an intersection entity via the UI or advanced API calls.

Self-Referential

Table references itself (e.g., employee hierarchy).

Employee
├── new_ManagerId → Employee
└── Parent employee record

Schema Design Best Practices

Do's

  1. Plan before creating - Design schema on paper first
  2. Use meaningful names - Clear, descriptive column names
  3. Add descriptions - Document purpose of each column
  4. Set required fields - Enforce data quality
  5. Use appropriate types - Don't store numbers as text
  6. Create indexes - On frequently filtered columns
  7. Use lookups - Instead of duplicating data

Don'ts

  1. Don't over-normalize - Balance between normalization and performance
  2. Don't use reserved names - Avoid system column names
  3. Don't create wide tables - Split into related tables if >100 columns
  4. Don't store calculated data - Use calculated columns instead
  5. Don't ignore security - Plan field-level security early

Common Schema Patterns

Master-Detail

Account (Master)
├── new_AccountNumber
├── new_Name
└── Contacts (Detail)
    ├── new_FirstName
    ├── new_LastName
    └── _parentcustomerid_value (FK)

Status Workflow

new_Request
├── new_Name
├── new_Status (Draft → Submitted → Approved/​Rejected)
├── new_SubmittedOn
├── new_ApprovedBy
└── new_ApprovedOn

Audit Trail

new_Order
├── new_OrderNumber
├── new_Status
├── createdon (system)
├── createdby (system)
├── modifiedon (system)
└── modifiedby (system)

Adding Columns to Existing Tables

# Add new columns
client.create_columns("new_Project", {
    "new_CompletionPercentage": "int",
    "new_ActualEndDate": "datetime"
})

# Remove columns
client.delete_columns("new_Project", ["new_OldColumn"])

References

  • See references/​table-design.md for detailed patterns
  • See references/​relationships.md for relationship examples
  • See references/​performance.md for optimization tips

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View