Zingy Docs
Visit our websiteTry a DemoPricingContact
  • Introduction
  • 🎛️Dashboard
    • Overview
    • Apps
    • Account Profile
    • Billing - View Invoices
    • Billing - Payment Methods
    • Billing - Subscription
  • 💻App Editor
    • App Components
    • App Editor Tour
    • App Settings
    • App Users
    • App User Groups
    • Publishing your App
    • Pages and Forms
      • Create a Page
      • Create a Structured Page
      • What is a Structured Page ?
      • Create a Form
      • Page Editor
      • Working with Forms
    • Page Editor
      • Page Editor Tour
      • Adding Page Content
      • Adding Content to Structured Pages
      • Working with Page Elements
      • Page Element Settings
      • Responsive Design
      • Padding and Margin
      • Editing Text
      • Using AI Wiz in the Page Editor
      • Built-in elements
        • Link
        • Image
        • Spacer
        • Flexible Area
        • Layout Container
        • Layout Row
        • Layout Column
        • 1 Column
        • 2 Columns
        • 3 Columns
        • Add Column
        • Table
        • Table Row
        • Table Column Cell
        • Table Heading Cell
        • Table (3 cols)
        • Table (4 cols)
        • Input
        • Checkbox
        • Toggle Switch
        • Dropdown
        • Multi-line
        • Label
        • Button
        • Button Group
        • Input Group
        • Button Toolbar
        • Menubar Holder
        • Menubar Collapsible
        • Menubar
        • Menubar Item
        • Menubar Item Link
        • Menubar Style1
        • Menubar Style2
        • Menu Item
        • Popup Menu
        • Popup Menu Item
        • Menubar Popup Menu
        • Popup Menu Style1
        • Popup Menu Style2
        • Popup Menu Separator
        • Card
        • Card Group
        • Card Style1
        • Card Style2
        • Card Style3
        • Alert
        • Badged Text
        • Collapsible Area
        • Data Table
        • Stripe Payment
        • Form
        • Menubar Login Info
        • Data Design
      • Working with Forms
      • Using Forms
      • Page Preview
    • Page Settings
    • Page Flow
      • Block Anatomy
      • Toolbox Blocks
        • Set Content
        • Get Content
        • Badged Text
        • Alert Text
        • Status Animation
        • Set Style
        • Set CSS
        • Set Input Value
        • Get Input Value
        • Set Toggle Switch State
        • Get Toggle Switch State
        • Set Input Feedback
        • Enable/Disable Element
        • Set Element Attribute
        • Get Element Attribute
        • Get Element by Name
        • Element
        • URL Parameter Value
        • Navigate Page
        • Timer
        • Timer Repeat
        • Show Popup Form
        • Show Information Popup
        • Show Confirmation Popup
        • Popup Form Data
        • Collapsible Area Action
        • Mouse/Keyboard Action
        • Event Action
        • Action/Event Info
        • Show Menu
        • Menu Text
        • Menu Index
        • Write Log Message
        • Log Category
        • Data Table Action Menu Customize
        • Data Table Attach Form
        • Data Table Add Action
        • Data Table Load Next Page
        • Data Table Load Prev Page
        • Data Table Refresh
        • Data Table Custom Query
        • Data Table : Table Name
        • Data Table : Data
        • Content from Data Design
        • Set Content in Data Design
        • Get Content in Data Design
        • Get Element Attribute in Data Design
        • Set Element Attribute in Data Design
        • Set Style in Data Design
        • Set CSS in Data Design
        • Set Input Value in Data Design
        • Get Input Value in Data Design
        • Get Toggle Switch State in Data Design
        • Set Toggle Switch State in Data Design
        • Set Input Feedback in Data Design
        • Enable/Disable Element in Data Design
        • Initialize Toggle Switch in Data Design
        • Event Action in Data Design
        • Collapsible Area Action in Data Design
        • Data Record Count
        • Data Record at Index
        • Data Record Loop
        • Data Record Info
        • Data Record Loop Index
        • Data Record ID
        • Data Table Name
        • Data Query Name
        • Data Read
        • Data Read Next
        • Data Read Previous
        • Data Lookup
        • Data Lookup with ID
        • Data Status
        • Data Add Record
        • Data Update Record with ID
        • Data Delete Record with ID
        • Data Input Popup
        • Lock/Unlock Form
        • Save Form with Data
        • Reset Form
        • Set Form Event Status
        • Set Form Event Status Message
        • Form Submit Complete
        • Set Field Input Value
        • Get Field Input Value
        • Form Data
        • Form in Edit Mode
        • Form Events
        • Execute Connection Command
        • Execute API Call
        • Connection Data
        • Connection Error
        • API Call Connection
        • Connection
        • Connection Command
        • Cloud Flow Invoke Hook
        • Cloud Flow : URL of Web Hook
        • HTTP Post
        • HTTP Get
        • HTTP Data
        • HTTP Error
        • Date
        • Custom Code
        • Date from Text
        • Get Object Property
      • Coding in Page Flow
      • Zingy API For Page Flow
      • References
        • Value Types
        • Popup Customization
        • Prerequisite for Dynamic Content block examples
        • Prerequisite for Data examples
    • Dynamic Content
    • Data
      • Database Tables
      • Database Queries
      • Data Tool
    • Cloud Flow
      • Cloud Flow Editor
      • Block Anatomy
      • Toolbox Blocks
        • Data Update Records
        • Data Delete Records
      • Coding in Cloud Flow
      • SDK/Library Integration
    • Media
    • Connections
      • Services
        • Stripe
        • Sendgrid
        • Twilio
        • API Call
        • API Key
Powered by GitBook
On this page
  • Overview
  • Table Fields
  • Field Types
  • Unique Fields
  • ID Field
  • Table Records
  • Creating a Database Table
  • Modifying a Table
  • Deleting a Table
  • Access (Security) Rules
  1. App Editor
  2. Data

Database Tables

PreviousDataNextDatabase Queries

Last updated 1 year ago

Overview

The App Database stores data in Tables. A Database Table is like a spreadsheet. It's a collection of data about a specific topic, such as Customers, Products, etc.


Table Fields

A Database Table is made up of smaller categories of data called fields (also known as a Column or Attribute).

e.g. A Database Table about customers might have fields such as: CustomerID, First Name, Last Name, Phone Number, Email Address and Notes.

Field Types

Fields are defined by specifying it's name and the type of data you want it to contain. The table below lists the supported field types:

Type
Sub-Type
Description

Text

Allow any text

Simple text

Multi-line

Simple text spanning multiple lines

Multi-line HTML

Formatted text spanning multiple lines

Email

Email addresses

Phone

Phone Numbers

Password

Passwords with encryption

List of Values

Allows only a Pre-defined set of simple text

Files

Used for uploading and associating files. This field will store information about the files.

Numeric

-

Integer numbers within the approx. range -2 million to +2 million (32-bit signed)

Numeric (decimals)

-

Real numbers within the range (64-bit double precision)

Date/Time

-

A timestamp containing the date and time.

Yes/No

-

Boolean values like true or false, yes or no, on or off, etc

Large Numeric

-

Integer numbers (64-bit signed)

Unique Fields

A Database Table can have a single or a group of fields marked as unique.

In the case of a single field being marked as unique, no two rows can have the same value for this field.

In case of a group of fields, the combination of values across these fields must be unique for each record in the table.


ID Field

Every Database Table in Zingy gets an automatically assigned ID field. The value of this ID field is automatically generated and is guaranteed to be unique across all the records in the specific table.


Table Records

Database Tables store data in the form of records. A record (also called a Row or Tuple) is an individual entry in the table.

For example, in the Database Table about customers, each record would contain specific information about one customer which is the data of the fields: CustomerID, First Name, Last Name, Phone Number, Email Address and Notes .

The above image shows a record selected in the Customers Database Table. The record is for the customer named Max Mustermann.


Creating a Database Table

In the screen that follows, you simply provide the name of the table (unique to your app) and add one or more fields by using the Add Field button.

The image below shows the information required for adding a field to the table.

Field Title

The general name for the field e.g. Address Line 1.

Type and Sub-Type

Field ID

The Field ID gets automatically derived from the Field Title and is used internally to refer to the field.

Unique

Description

Optional text describing the field.

Values

For the List of Values sub-type for Text type fields, this contains a comma-separated text for the allowed values.

The the fields you want have been added click the Save Table button to create the table.


Modifying a Table

Altering the structure of a table is irreversible and can be time-consuming, especially if the table already contains data.

We advise against making such changes unless absolutely necessary.

If you need to modify a table's structure e.g. to add new fields or remove fields, click on the table and select the Edit option from the popup menu.

The image below shows an annotated example of the screen that shows for editing a Database Table.

The table below explains the annotations in the image above.

Edit a field's title, type, sub-type, etc. If the table contains data, any field type changes will result in the existing data being converted to the new field type. This maybe a lengthy process depending on the amount of records in the table.

Delete a field from the table. If the table contains data, this will result in the field being removed from all exiting records.This maybe a lengthy process depending on the amount of records in the table.

Add a new field to the table. If the table contains data, this will result in the new field being added to all existing records and initialized with a default value depending on the type of the field. This maybe a lengthy process depending on the amount of records in the table.

Save the changes and start the conversion process.


Deleting a Table

Database Table delete is permanent and not reversible.

To delete a Database Table and it's data, click on the table and select the Delete option from the popup menu.


Access (Security) Rules

To configure role based access for a Database Table, click on the table and select the Access (Security) option from the popup menu.

Access rules can be configured for 4 types of operations (View, Add, Modify and Delete) as shown below:

Operation
Description

View

Listing records, looking up records, etc

Add

Creating or adding new records

Modify

Editing records (NOTE: this also requires View permission)

Delete

Deleting records

  • To grant public access to an operation, select the "Public" group.

  • To remove a group click on the 'x' icon (4). Note: The "Admin" group cannot be removed.

In the App Editor, go to the Data tab and use the New Table icon to add a new Database Table to your App.

The type of data for the field. See for more details.

Enable if no two rows can have the same value for this field. See for more details.

By default all registered of the app and members of the Admin are allowed on the four operations (View/Add/Modify/Delete). You can change this by clicking on any of the Edit buttons highlighted in the image above.

To allow a , select it (1), choose the minimum role level (2) and click on the Add button (3).

💻
➕
Users
group
group
here
here
Video: Database Features
Example Database Table about Customers
Example records for the Customers table
New Table icon
Table Name when creating a table
Add Field button
Information required for each Field
Table menu: Edit option
Database Table edit screen showing the field edit button (1), field delete button (2), add field button (3) and the Save table button (4).
Table menu: Delete option
Table menu: Access (Security) option
Table operation Access rules edit button
Access Rules modification showing group selection (1), role selection (2), group add button (3) and the group delete icon (4).