Dittofi
  • Tutorials
    • Tutorial Index
    • Quick Start
    • Dittofi Essentials
      • Part 1: Frontend terms and concepts
      • Part 2: Backend terms and concepts
      • Part 3: Connecting frontend and backend
      • Part 4: Dittofi app structure
    • Dittofi App Design
      • 🏗️App architecture 101
      • ◼️Backend app development 101
      • 🟪Frontend app development 101
      • 🔰(optional) Web developer beginner series
  • Learn Frontend
    • 👨‍💻Getting Started
      • Welcome to Dittofi
      • Intro to the Dittofi Design Studio (Frontend)
    • 🟩Pages
    • 🟪Elements
      • Types
        • Button Element
        • Div Block Element
        • Form Block Element
        • Link Block Element
        • List Element
        • Modal Box Element
        • Tabs Element
        • Columns Element
        • Image Element
      • Partials
      • Prefabs
      • Custom
    • 🟧Variables
      • Array
      • Checkbox
      • Collection
      • Collection (Custom Model)
      • Collection (System Custom Model)
      • Custom Model
      • Date
      • Datetime
      • File
      • Json
      • Number
      • Number with decimal
      • Model
      • System Custom Model
      • Text
      • UUID
    • 🟨Events
      • 🟨External
        • HTTP Request
        • Run Endpoint
      • 🟨Flow Control
        • Condition
        • Run Action
        • Loop
        • Sleep
      • 🟨Maths
        • Add
        • Divide
        • Modulus
        • Multiply
        • Subtract
      • 🟨Navigation
        • Open Page
      • 🟨Notifications
        • Alert
        • Confirm
      • 🟨Other
        • Copy To Clipboard
        • Run Custom
      • 🟨Text
        • Concat
        • Contains
        • Ends With
        • I Contains
        • I Ends With
        • I Starts With
        • LTrim
        • RTrim
        • Text To Upper
        • Text To Lower
        • Trim
        • Starts With
      • 🟨Variables
        • Set Field
        • Remove Field
      • Validate
    • 🟦CSS Layouts
      • Holy Grail Layout
      • Side Bar Layout
      • Sticky Footer Layout
      • Sticky Header Layout
      • CSS Frameworks
    • 🔲CSS Frameworks
    • Component Libraries
    • Meta Attributes
  • Learn Backend
    • 🖥️Getting Started
      • Intro to Data
      • Intro to APIs
      • Build your first custom API
      • Actions & Events
    • 🟫Back-End Actions
    • 🟩Custom Models
      • 🟩Attributes
        • Array
        • Checkbox
        • Custom Model
        • Collection (Custom Model)
        • Collection (System Custom Model)
        • Date
        • Datetime
        • File
        • Number
        • Number With Decimal
        • Json
        • Text
    • ◼️Data Models
      • Database Fundamentals
        • Database relationships
      • ◼️Columns
        • Attachment
        • Auto Increment
        • Checkbox
        • Date
        • Datetime
        • Duration
        • Email
        • Long text
        • Link to another record field
        • Number
        • Number with decimal
        • Password
        • Phone number
        • Percent
        • Price
        • Rating
        • Single select
        • Single line text
        • URL
    • 🟥Events
      • 🟦Arrays
        • Append
        • Array Pop
        • At
        • Length
        • Prepend
        • Range
      • 🟦Conversions
        • Base64 Encode
        • Base64 Decode
        • Json Decode
        • Json Encode
        • Path Escape
        • Path Unescape
        • Query Escape
        • Query String Parse
        • Query Unescape
        • To Bool
        • To Float
        • To Int
        • To Str
        • Yaml Encode
        • Yaml Decode
      • 🟦Database Requests
        • Create
        • Create Or Update
        • Delete
        • Has Record
        • Read Event
        • Update
      • 🟦External
        • HTTP Request
        • SFTP Download
        • SFTP Upload
      • 🟦Files
        • CSV Reader Event
        • CSV Writer Event
        • File Read
        • File Save
        • File Size
        • File Type
        • JSON Reader
        • PDF Generator
      • 🟦Flow Control
        • Condition
        • Loop
        • Return
        • Run Action
        • Sleep
      • 🟦Notifications
        • Send Mail
        • Connect Websocket
        • Message Websocket
      • 🟦Maths
        • Add
        • Acos
        • Acosh
        • Asin
        • Asinh
        • Atan
        • Atanh
        • Cbrt
        • Ceil
        • Divide
        • Modulus
        • Multiply
        • Subtract
      • 🟦Security
        • Compare Password
        • JWT Decode
        • JWT Encode
        • Login
        • Logout Web User
        • Password Generator
        • Random Number
      • 🟦Time
        • Add Time
        • Day
        • Format Time
        • Minute
        • Nanosecond
        • Parse Time
        • Second
        • Time In
        • Year
        • Year Day
      • 🟦Text
        • Concat
        • Contains
        • Ends With
        • Execute Template
        • I Contains
        • I Ends With
        • I Starts With
        • Starts With
        • LTrim
        • RTrim
        • Replace
        • Regex Find All String
        • Regex Find String
        • Regex Match String
        • Trim
        • Text To Lower
        • Text To Upper
        • Text To Title
        • Url Getarg
      • 🟦Other
        • Assign
        • Run Custom
        • Redirect Web Page Event
        • Render Web Template Event
    • 🟧Variables
      • Array
      • Checkbox
      • Collection
      • Collection (Custom Model)
      • Collection (System Custom Model)
      • Custom Model
      • Date
      • Datetime
      • File
      • Json
      • Number
      • Number with decimal
      • Model
      • System Custom Model
      • Text
      • UUID
    • 🟪Webservices
  • Templates
    • Two sided marketplace template
      • Introduction
        • Part I: Installing and setting up the marketplace template
        • Part II: Understanding what features are included in the marketplace template
        • Part III: Customizing your marketplace frontend without coding
        • Exploring Dittofi's marketplace API
      • Listings
        • How to create a marketplace listing
    • How to build a CRUD app
  • Third Party APIs
    • OAuth 2.0 APIs
      • Introduction To OAuth 2.0
      • Google OAuth 2.0 - PART I
      • Google OAuth 2.0 - PART II
  • Dittofi Admin
    • Your Account
      • Workspace Admin
      • Manage Billing
      • Connect a custom domain
      • How to use a discount code to Dittofi Pro
  • FAQ
    • API Generator
    • How to write custom SQL?
    • Why does my image not display?
    • How can I set up Google Analytics?
    • Exporting and deploying my frontend code
    • What is a partial and what is a prefab?
    • How to set up a basic mulit tenant app on Dittofi
    • How to write a custom endpoint in Dittofi
    • How to integrate Font Awesome into Dittofi
    • How can I set up Dittofi to run on my own private server?
    • How to add roles such as Super Admin, Admin, Manager & User
    • How to prevent duplicate records being added to the database
    • What to do when relation cannot be created because their is violating data in the referenced table
  • Change Logs
    • Dittofi Change Logs
Powered by GitBook
On this page

Was this helpful?

  1. Learn Backend

Data Models

PreviousTextNextDatabase Fundamentals

Last updated 2 years ago

Was this helpful?

Data Models are places where your application data is stored e.g. users, products, drivers etc. The data is represented in a grid format, similar to a spreadsheet.

Unlike a spreadsheet however, each of the columns (or fields) has specific "types" that allow you to store rich content inside each field. For example, a field can contain rows (or records) with attachments, rich text, checkboxes and links to records in another table.

In this article we are give a reference guide to all the different types of fields that are available inside Dittofi.

Field Type Reference

All available fields are listed below in the order that they appear within the Dittofi platform. For more information, read the corresponding support articles.

Field Type Name
Data Type
Description

Attachment

array

An attachment field that allows you to attach one or more files directly to your Dittofi records.

Auto Increment

integer

An auto increment field type automatically creates a unique auto incremented number for each record that is entered into your data model. Unique identifiers are useful when you are looking to perform an action on one single record in your data model e.g. deleting or editing a record.

Checkbox

boolean

A checkbox allows you to give a true or false value to a record in your data model.

Date

date

A date field allows you to easily enter a formatted date. You can choose between the different formats you give to a date for example, local, friendly, US, European or ISO.

Date time

datetime

A date time field allows you to easily enter a formatted date and optionally a time. You can choose bewteen different formats for your date time for example, local, friendly, US, European or ISO and 12 or 24 time formats.

Email

string

An email field allows you to store your users email addresses.

Number

integer

The number field allows you to store whole numbers (integers). It is intended as a general purpose field for numerical values for example, the number of products in a store or the age of different people in years.

Number with decimal

float

The number with decimal field allows you to store numbers with a decimal place (floating point). The field can be used as a general purpose field for numerical values for example, the distance between to locations in miles or kilometers or the weight of different products.

Password

encrypted string

The password field allows you to store private information as text e.g. passwords. The data stored in this field type is salted, hashed and encrypted and is represented as dots within the data models tab to further protect sensitive information.

Phone number

string

The phone number field allows you to store phone numbers in formats such as (XXX) XXX- XXXX.

Percent

float

The percentage field type is designed to hold numerical values formatted as percentages. You can choose the level of precision for your percentage as well as choosing to allow negative numbers.

Price

float

The price field type allows you to store any type of price data for example, dollars, pounds, yen, bitcoin etc. You can choose the precision of the price data and if you would like to allow negative numbers.

Rating

integer

The rating field type allows you to store rating data that can be used to identify rankings or quality assessments.

Single select

string

The single select field type allows you to create a dropdown of custom options that can be displayed for an individual record.

Long text

JSON Object

The long text field type is a rich text field. You can add formatted and styled text with images, structured into titles, subtitles and paragraphs.

Single line text

string

The single line text is a general purpose text field that can be used to store single line text of any type, for example names, short descriptions, price symbols etc.

Duration

integer

The duration field type is a numeric field type that can be used to store short time durations such as hours, minutes, seconds, or milliseconds. (To store longer time durations such as days, weeks, or other larger units, you should use a regular number field.)

URL

string

The URL field lets you store clickable links such as www.myclickablelink.com. Links can be clicked on from within your table or gallery views.

Link to another record

Dittofi custom

The link to another record is a special field that allows you to link records in one table to another table as either a one to one, one to many or many to many relationships. (For more advanced joins, you should can use the object relational diagram.)

Please note that all fields are set to "Allow null fields by default". Dittofi does this to prevent confusion however, you can change this setting at any point.

◼️