Start here

Manual Database Setup

A detailed walkthrough of creating tables, choosing data types, and setting up relationships.

Builders who know their exact schema6 min read

Manual Database Setup: The Schema Builder

The NoCodeBackend Schema Builder gives you granular, point-and-click control over your database structure. It is the perfect tool for developers and architects who already have a clear Entity-Relationship Diagram (ERD) or know exactly what tables and data types their application needs.

This guide explores the complete process of building your schema manually, configuring column types, and optimizing your data model.


1. Detailed Overview

Unlike AI setup which abstracts the database creation, Manual Setup gives you direct access to enterprise data definition capabilities through a visual interface.

When you build a table manually, NoCodeBackend translates your UI actions into strict, highly optimized database structures.

Why Use Manual Setup?

  • Precision: You control exact data types (e.g., distinguishing between INT and BIGINT, or VARCHAR and TEXT).
  • Data Integrity: You can enforce strict constraints at the database level (NOT NULL, Default values, specific character lengths), preventing bad data from ever entering your system.
  • Iterative Design: You can start with a basic schema and seamlessly add columns as your application scales.

2. Step-by-Step Guide: Building a Data Schema

Let's build a typical E-Commerce schema with customers, products, and orders.

Step 2.1: Creating the Base Tables

  1. Navigate to Manage Tables in your database dashboard.
  2. Click Add Table.
  3. Name the table customers (always use plural, lowercase snake_case).
  4. Click Add Column and define:
    • email (Type: VARCHAR, Length: 255, Required: true)
    • password (Type: PASSWORD, Required: true)
  5. Save the table.
  6. Create another table named products.
  7. Add columns:
    • name (Type: VARCHAR, Length: 255, Required: true)
    • price (Type: DECIMAL, Precision: 10, Scale: 2, Required: true)
    • stock_count (Type: INT, Required: true, Default Value: 0)
  8. Save the products table.

Step 2.2: Creating the Order Data Structure

Now we need a table to store the orders customers place.

  1. Click Add Table and name it orders.
  2. Add the base columns:
    • customer_id (Type: INT, Required: true)
    • product_id (Type: INT, Required: true)
    • total_amount (Type: DECIMAL, Precision: 10, Scale: 2, Required: true)
    • status (Type: DROPDOWN, Options: pending, shipped, delivered, Required: true, Default: pending)
  3. Save the table.

(Note: While the Schema Builder creates the structural columns, rigorous referential foreign-keys are automatically mapped if you use the AI Setup wizard, or you can manage data linkage purely through your API payload logic).


3. Configuration & Parameters

Every column in the schema builder has specific configuration properties mapped natively to enterprise data standards.

Data Types Breakdown

  • INT: Whole numbers up to ~2.1 billion. Ideal for standard relational IDs, counters, and quantities.
  • BIGINT: Massive whole numbers. Use this if your IDs or counters will exceed 2 billion.
  • VARCHAR: Standard string storage where you define a maximum length (e.g., 255). Highly optimized for searching.
  • TEXT: Large string storage for long-form content, articles, or massive descriptions.
  • DECIMAL: Exact precision numbers. Crucial for financial applications (e.g., price, currency). You define Precision (total digits) and Scale (digits after the decimal).
  • FLOAT / DOUBLE: Floating-point numbers. Use for scientific calculations where exact precision is not strictly required.
  • BOOLEAN: Native true (1) or false (0) toggles.
  • DATE / DATETIME / TIMESTAMP: For storing dates and times.
  • JSON: Stores raw JSON objects or arrays. Perfect for unstructured data or variable configuration settings that don't need their own tables.
  • DROPDOWN: Maps to standard Enum types. You can specify the exact string options allowed (e.g., active, archived).
  • PASSWORD: A secure pseudo-type that maps to hashed storage, ensuring sensitive credentials are never stored in plaintext.

Column Constraints

  • Required (NOT NULL): The database will reject any POST or PUT request that leaves this field empty.
  • Default Value: If the client omits this field in a POST request, the database will automatically insert this fallback value.

4. Best Practices & Edge Cases

  • The id Column: Do not manually create an id column. NoCodeBackend automatically injects a Primary Key into every table you make.
  • Use Decimal for Money: Never use FLOAT for currency, as floating-point math can lead to precision errors (e.g., $1.99 + $2.01 = $4.00000000001). Always use DECIMAL(10,2).
  • Handling Arrays: If a user can have multiple "tags", do not create a comma-separated string column. Either use a JSON column to store an array ["tag1", "tag2"], or create a separate user_tags table for strict normalization.
  • Naming Conventions: Always use snake_case for columns (e.g., first_name, not firstName). This guarantees consistent behavior across the REST API and webhook payloads.

5. Troubleshooting

Common Errors

Error: Column limit reached

  • Cause: Your current billing plan limits the number of tables or columns you can create in a single database.
  • Resolution: Upgrade your workspace plan or remove unnecessary tables.

Error: Table already exists

  • Cause: You are trying to create a table with a name that is reserved by NoCodeBackend's internal system.
  • Resolution: Choose a different, application-specific name for your table.
Manual Database Setup | Help Center