Xano Documentation
  • πŸ‘‹Welcome to Xano!
  • 🌟Frequently Asked Questions
  • πŸ”Security & Compliance (Trust Center)
  • πŸ™Feature Requests
  • πŸ’”Known Issues
  • Before You Begin
    • Using These Docs
    • Where should I start?
    • Set Up a Free Xano Account
    • Key Concepts
    • The Development Life Cycle
    • Navigating Xano
    • Plans & Pricing
  • The Database
    • Designing your Database
    • Database Basics
      • Using the Xano Database
      • Field Types
      • Relationships
      • Database Views
      • Export and Sharing
      • Data Sources
    • Migrating your Data
      • Airtable to Xano
      • Supabase to Xano
      • CSV Import & Export
    • Database Performance and Maintenance
      • Storage
      • Indexing
      • Maintenance
      • Schema Versioning
  • πŸ› οΈThe Function Stack
    • Building with Visual Development
      • APIs
        • Swagger (OpenAPI Documentation)
      • Custom Functions
        • Async Functions
      • Background Tasks
      • Triggers
      • Middleware
      • Configuring Expressions
      • Working with Data
    • Functions
      • AI Tools
      • Database Requests
        • Query All Records
          • External Filtering Examples
        • Get Record
        • Add Record
        • Edit Record
        • Add or Edit Record
        • Patch Record
        • Delete Record
        • Bulk Operations
        • Database Transaction
        • External Database Query
        • Direct Database Query
        • Get Database Schema
      • Data Manipulation
        • Create Variable
        • Update Variable
        • Conditional
        • Switch
        • Loops
        • Math
        • Arrays
        • Objects
        • Text
      • Security
      • APIs & Lambdas
        • Realtime Functions
        • External API Request
        • Lambda Functions
      • Data Caching (Redis)
      • Custom Functions
      • Utility Functions
      • File Storage
      • Cloud Services
    • Filters
      • Manipulation
      • Math
      • Timestamp
      • Text
      • Array
      • Transform
      • Conversion
      • Comparison
      • Security
    • Data Types
      • Text
      • Expression
      • Array
      • Object
      • Integer
      • Decimal
      • Boolean
      • Timestamp
      • Null
    • Environment Variables
    • Additional Features
      • Response Caching
  • Testing and Debugging
    • Testing and Debugging Function Stacks
    • Unit Tests
    • Test Suites
  • CI/CD
  • File Storage
    • File Storage in Xano
    • Private File Storage
  • Realtime
    • Realtime in Xano
    • Channel Permissions
    • Realtime in Webflow
  • Maintenance, Monitoring, and Logging
    • Statement Explorer
    • Request History
    • Instance Dashboard
      • Memory Usage
  • Building Backend Features
    • User Authentication & User Data
      • Separating User Data
      • Restricting Access (RBAC)
      • OAuth (SSO)
    • Webhooks
    • Messaging
    • Emails
    • Custom Report Generation
    • Fuzzy Search
    • Chatbots
  • Xano Features
    • Snippets
    • Instance Settings
      • Release Track Preferences
      • Static IP (Outgoing)
      • Change Server Region
      • Direct Database Connector
      • Backup and Restore
      • Security Policy
    • Advanced Back-end Features
      • Xano Link
      • Developer API (Deprecated)
    • Metadata API
      • Master Metadata API
      • Tables and Schema
      • Content
      • Search
      • File
      • Request History
      • Workspace Import and Export
      • Token Scopes Reference
  • Xano AI
    • Building a Backend Using AI
    • Get Started Assistant
    • AI Database Assistant
    • AI Lambda Assistant
    • AI SQL Assistant
    • API Request Assistant
    • Template Engine
    • Streaming APIs
  • AI Tools
    • MCP Servers
      • Connecting Clients
      • MCP Functions
  • Xano Transform
    • Using Xano Transform
  • Xano Actions
    • What are Actions?
    • Browse Actions
  • Team Collaboration
    • Realtime Collaboration
    • Managing Team Members
    • Branching & Merging
    • Role-based Access Control (RBAC)
  • Agencies
    • Xano for Agencies
    • Agency Features
      • Agency Dashboard
      • Client Invite
      • Transfer Ownership
      • Agency Profile
      • Commission
      • Private Marketplace
  • Enterprise
    • Xano for Enterprise
    • Enterprise Features
      • Microservices
      • Tenant Center
      • Compliance Center
      • Security Policy
      • Instance Activity
      • Deployment
      • RBAC (Role-based Access Control)
      • Xano Link
  • Your Xano Account
    • Account Page
    • Billing
    • Referrals & Commissions
  • Troubleshooting & Support
    • Error Reference
    • Troubleshooting Performance
      • When a single workflow feels slow
      • When everything feels slow
      • RAM Usage
      • Function Stack Performance
    • Getting Help
      • Granting Access
      • Community Code of Conduct
      • Community Content Modification Policy
  • Special Pricing
    • Students & Education
    • Non-Profits
  • Security
    • Best Practices
Powered by GitBook
On this page
  • Text
  • Integer
  • UUID
  • Object
  • Table Reference
  • Vector
  • Enum
  • Timestamp
  • Date
  • Boolean
  • Decimal
  • Email
  • Password
  • JSON
  • Storage
  • Geography

Was this helpful?

  1. The Database
  2. Database Basics

Field Types

Last updated 2 months ago

Was this helpful?

Text

A text field can contain anything that you'd want to provide, such as names, addresses, location names, and descriptions.

Hello
John Smith
Chicago

Integer

An integer is just a whole number, such as 3, 42, 100, etc...

1
100
1000

UUID

UUID stands for universally unique identifier, and is a random string of letters and numbers, typically used to enforce amongst other records in the table.

105c8b80-fd24-4cf3-bbed-a43e8134c8b0
984x0t12-rt12-5ey6-poqw-b12y1923e6l0

Object

Imagine a folder that can hold different types of information together - like how a contact card holds someone's name, phone, and address. Or, recording certain data about vehicles, such as year, make, and model.

{
  "make": "Toyota",
  "model": "Corolla",
  "year": 2020
    }

This field type is like a quick link to a record in another table (or even the same table, if your use case requires it). Table references are useful when separating data between tables and maintaining relationships between them.

For example, you might have a table of users, and a table of user roles. In your users table, you could add a table reference to your roles table to link each user to a specific role. This is advantageous because it is easier to maintain consistency and make changes to role types.

Vectors are used for AI/LLM applications to store data that helps the model find the most relevant information based on the query being made. Think of it like a DNA sequence - it's just a string of values that might not mean much to us when we look at them directly, but they encode important information that the AI system knows how to interpret.

[-0.235, 0.458, -0.891, 0.023, 0.444, -0.657, ...]
  • It's a fixed-length array of numbers (often hundreds or thousands of elements)

  • The numbers are usually floating-point values (often between -1 and 1)

  • Each vector has the same dimensionality (length) within a given field

  • The individual numbers themselves don't have inherent meaning - they're abstract representations that are provided by an AI model and stored for later use.

An enum is like a text field, but only allows for specific values. It's like a multiple choice question instead of a freeform input. For example, an enum field would be appropriate to use if you wanted to store a color from a specific list.

Red
Blue
Green
Orange

Xano stores timestamps in . They are stored in the database as an integer, but appear to you as human readable timestamps in your local timezone. While it may seem unintuitive, this format is ideal for ensuring that you can always store and return accurate time-based data in a user's local time zone, and have the most flexibility when down-to-the-millisecond accuracy is required.

1733762528000 // This Epoch timestamp in MS represents Mon, 09 Dec 2024 16:42:08 GMT

This is just a calendar date. It offers less flexibility than the recommended Timestamp field, but can be useful when exact times are not important, such as birthdays or anniversaries.

A boolean is just a true or false value. It's a bit different than storing true or false in a text string and the recommended option if you need to store true and false values.

  • Booleans take up less storage space, as they are one-bit values (0/1) instead of the full text.

  • They enforce data validation and ensure that only true / false values are stored in the database instead of different variations with potential errors (such as TRUE, true, ture, Y, 1)

This is similar to the integer field, but allows for decimal points. Use this field type for things like money ($12.34) or measurments (3.14 inches).

Xano's Email field is really just a text field, but enforces proper formatting to ensure that emails are entered properly into the database.

Xano's Password field is really just a text field, but includes extra security around storing and showing the value to you.

  • Xano's passwords are stored encrypted. Password fields will never store passwords in plain text.

  • They are not viewable from the database view.

  • If you return the password field in a database query, only the encrypted version is shown. It is not possible to retrieve raw user passwords from a password field.

Think of this as a flexible container that can hold different types of information in an organized way - like a recipe that lists ingredients and steps.

{
  "name": "Classic Chocolate Chip Cookies",
  "prepTime": 15,
  "ingredients": [
    {
      "item": "flour",
      "amount": 2.25,
      "unit": "cups"
    },
    {
      "item": "chocolate chips",
      "amount": 2,
      "unit": "cups"
    }
  ],
  "steps": [
    "Cream butter and sugars",
    "Add eggs and vanilla",
    "Mix in dry ingredients",
    "Stir in chocolate chips"
  ],
  "isGlutenFree": false,
  "servings": 24
}

Xano includes support for file storage, and utilizes your database to record files you have stored in Xano. The database tables themselves do not include the actual files; only metadata for the files themselves, such as name, size, and location.

{
  "promoImage": {
    "access": "public",
    "path": "/vault/ABC123xyz/D3F4G5hij/K7L8M9.../sample-image.png",
    "name": "sample-image.png",
    "type": "image",
    "size": 123456,
    "mime": "image/png",
    "meta": {
      "width": 1080,
      "height": 400
    },
    "url": "https://example-domain.io/vault/ABC123xyz/sample-image.png"
  }
}

Geography fields in Xano can contain different types of information, all based around latitude and longitude.

  • Points on a map

  • A route of connected points

  • A polygon of points, such as a specific geographical area

Geo Point

{
    "type": "point",
    "data": {
        "lng": 128.233455,
        "lat": 39.391205
    }
}

Path

{
    "type": "path",
    "data": [
            {
                "lng": -115.697829,
                "lat": 38.512029
            },
            {
                "lng": 15.719451,
                "lat": 32.816569
            }
        ]
}

Polygon

{
 "type": "poly",
 "data": [
   {
     "lng": -169.592325,
     "lat": 79.284391
   },
   {
     "lng": -70.737922,
     "lat": 77.866587
   },
   {
     "lng": 56.995958,
     "lat": 12.476723
   },
   {
     "lng": -156.669723,
     "lat": -29.580055
   },
   {
     "lng": -169.592325,
     "lat": 79.284391
   }
 ]
}

Table Reference

Vector

Enum

Timestamp

Date

Boolean

Decimal

Email

Password

JSON

Storage

Geography

πŸ“„
πŸ”’
γŠ™οΈ
🍱
❓
πŸ€–
πŸ›‘
πŸ••
πŸ“…
βœ…
πŸ”’
πŸ“¨
πŸ”‘
πŸ’»
πŸ–ΌοΈ
πŸ—ΊοΈ