Tutorials

No-Code Database: Design Relations Before Building Screens

A linked-record model, import sequence and relationship validation sample. Explore the interface with Atoms.

Start building for free
6 min readPublished
Illustrative editorial photograph for no code database
On this page

A no code database should preserve the relationships and rules behind your records. Design those rules before building forms and charts. If an order can refer to a missing customer or a user can retrieve another team's rows, a polished interface will not make the data dependable.

This guide uses a synthetic customer-and-order example to explain identifiers, linked records, import order and access checks. The schema is an authored design. Its behavior must be implemented and tested in the database or service you actually choose.

Choose records that represent different things

Start by identifying the entities your workflow needs. In the sample, a customer is a person or organization that places an order. An order is a transaction with its own identifier and status. An order item connects a product to an order with a quantity and price.

Table Identifier Important relationships
Customers customer_id Belongs to a workspace
Products product_id Belongs to a workspace
Orders order_id References customer and workspace
Order items item_id References order and product

Do not repeat the customer's editable contact details in every order row unless you deliberately need a historical snapshot. Store current contact information with the customer. If an invoice must preserve the address used at purchase, label that copied address as a transaction snapshot rather than another current customer record.

Softr's database overview provides a builder-oriented survey. For a concrete relational backend, Supabase's table documentation explains tables and related database concepts. These sources describe options; your chosen platform's actual constraints and permission features need their own verification.

Use stable identifiers for relationships

Display names are useful for people but weak as relationship keys. Two customers can share a name, and a company can change its name without becoming a different customer. Use a stable identifier and show the friendly name alongside it.

The following synthetic records demonstrate the difference:

csv
customer_id,workspace_id,name
CUS-101,WS-01,Demo North Studio
CUS-102,WS-02,Demo North Studio
csv
order_id,workspace_id,customer_id,status
ORD-101,WS-01,CUS-101,Draft
ORD-102,WS-02,CUS-102,Draft

The names match, but the customers are separate records in separate workspaces. A form that searches only by name could select the wrong one. Restrict choices to the user's scope and verify the relationship at save time.

Where supported, use foreign-key constraints to prevent a relationship from pointing to a missing record. Decide whether deleting a parent should be rejected, archive it or affect related children. Automatic cascading deletion can be appropriate in some designs, but it should be an intentional rule rather than a surprise.

Define validity beyond the field type

A field being numeric does not make every number meaningful. An order item quantity may need to be a positive integer. A required status should come from a controlled set. A customer reference should belong to the same workspace as the order.

Field or relationship Illustrative rule Failure behavior
Order identifier Unique and required Reject duplicate
Customer reference Existing customer in the order's workspace Reject mismatched relationship
Quantity Positive integer Show field error
Price Valid representation for the chosen currency Reject malformed amount
Status Draft, Confirmed or Cancelled Reject unknown value

Document which layer enforces each rule. A required form field improves usability. A database constraint or service validation protects saved data when records arrive through imports, direct requests or another interface.

If you store money, choose a representation and currency policy explicitly. For a simple USD demo, integer cents can avoid ambiguous display values. Do not silently reuse a two-decimal convention for every currency. Keep display formatting separate from the stored representation.

Import parents before their children

Load customers and products before orders, then load order items. This sequence lets the importer resolve referenced identifiers. Preview missing parents and mismatched workspace relationships before committing the file.

For each row, retain the source file and row number in the import receipt. If ORD-103 references CUS-999, the error should identify that reference and its source row. A generic “import failed” message leaves the operator guessing which record to correct.

Decide how repeated imports work. A first version can reject existing identifiers. A more advanced importer might update specified fields, but it should distinguish an update from a new record and detect conflicts. Uploading the same file twice should not unexpectedly double the order count.

Choose whether a batch is all-or-nothing or can save valid rows while rejecting invalid ones. Both are possible designs. The receipt must match the chosen behavior, including counts and identifiers of what actually persisted.

Apply access rules to every route

In a shared application, a user may belong to one workspace and have a particular role. The record's workspace and the user's membership should jointly determine access. Do not rely on an interface filter as the only protection.

Supabase's row-level security documentation describes database-level policies for restricting rows. If your platform offers a different mechanism, check its equivalent boundary and execution conditions. No-code does not mean access rules are optional.

Test list views, direct record requests, search, exports and updates. A user who sees only their own rows in the main table may still retrieve another workspace through an unprotected endpoint. Administrative credentials can also conceal permission errors during testing, so use ordinary test identities.

Separate read and write authority. A manager may be able to inspect orders without being allowed to change prices. A customer may see its order without being allowed to mark it Confirmed. The permission model should describe actions, not only whether a page is visible.

Build a relationship-first application with Atoms

Atoms helps build and iterate on a web application from a written brief. Use it to make the record model visible through forms and tables. Begin with synthetic fixtures, then inspect and test how the generated application saves and authorizes records.

text
Build a synthetic order management app. Create Customers,
Products, Orders and Order items with stable identifiers.
Each record belongs to a workspace. Orders reference a
customer in the same workspace; items reference an order
and product. Validate positive integer quantities and a
controlled status list. Add CSV preview with missing-parent
and duplicate-ID errors. Provide ordinary user and manager
views. Verify saved relationships and server-side access.

Start with the AI app builder guide. For a sales-oriented version of the model, the no-code CRM guide applies linked accounts, contacts and deals.

Test one complete flow: create a customer, add an order and item, reload, then inspect the linked identifiers. Attempt to change the order to another workspace's customer. The expected rejection is as useful as the successful path because it checks whether the relationship rule is enforced.

Reconcile the screens with stored records

Use a small fixture with known counts and totals. If the sample has two orders, confirm that the list, filtered summary and export use the same definition. A joined query can duplicate an order once per item, which may inflate a count unless the summary counts distinct order identifiers.

When the schema changes, test existing records as well as new ones. Adding a required field may need a migration or a clear incomplete state for older data. Preserve a backup or export appropriate to the platform before changing real records.

Use the sample brief to start a order management app in Atoms.

Build my order management app

Conclusion

A reliable no-code database starts with distinct records, stable links, explicit validation and enforceable access. Import in dependency order and test both valid relationships and rejected ones. Build the first interface in Atoms, then reconcile its screens with the records actually stored.

Create a first version with synthetic data and review the results.

Start with Atoms

FAQs

Q1: Is a no-code database just a spreadsheet with forms?

Some products present records in a spreadsheet-like interface, but the useful distinction is their support for relationships, constraints, access and application behavior. A flat sheet can work for a simple list. A shared order workflow may need stable customer references, controlled statuses and permission checks across multiple routes. Evaluate the platform against those requirements rather than its visual resemblance to a spreadsheet. Check what happens on an invalid import and a direct unauthorized request. The interface is only one part of whether the database supports your workflow reliably.

Names can change or repeat, while a stable identifier can continue to refer to the same record. In a shared application, two workspaces might contain customers with identical names. Linking by name risks combining them or selecting the wrong one. Store the identifier in the relationship and display the friendly name for users. Validate that the referenced record exists and belongs to the permitted scope. If you need a historical name or address, keep it as an explicitly labeled snapshot rather than treating copied text as the live relationship.

Q3: How do I test a database before using real records?

Create a small synthetic fixture with known identifiers, relationships and expected totals. Test a valid import, a duplicate identifier, a missing parent and a cross-workspace relationship. Use ordinary users to check list, direct access, export and update behavior. After successful changes, reload and inspect the stored records instead of trusting only the interface's message. Repeat the relevant fixtures when the schema or permissions change. These checks establish the behavior of the candidate you tested; they do not automatically prove every future integration or larger data set will behave identically.

Share this article
Made with Atoms

Your next idea starts here.

Turn what you learned into a working app or website.

Start building for free