Dittofi
Search…
Introduction to data models
In this section, we will cover:
  • Data models
  • Importing your data
  • Data types
  • API generator
  • Views

Data models

Data models are essentially a collection of data that is organized into many independent or connected lists or tables. This puts data models at the heart any database, since this is where your data is stored.
Inside the Dittofi Design Studio, you can create your own data models to store different types of data from within the Data Models tab.
The data models tab inside Dittofi
The table view of your data models are windows into your database. They allow you to collect up data that is generated from within your app or to upload data that you would like to use either within your app.

Importing your data

You can import existing data sets into Dittofi from CSV files using the "Quick import" feature. To do this, (1) click on "Add or import", (2) from the dropdown select Quick import > CSV file and (3) choose either "Add data to new table" or "Add data to existing table".

Add data to new table

Choosing this option will will create a new data table using the first row of your CSV file as a column header.

Add data to existing table

Choosing this option will let you import data into an existing table.
If you are not sure where to start with building your data models, you can always import an existing set of data models for your app by picking a Dittofi app template.

Data types

You can organize your data into different fields such as text, prices, dates, attachments and so on. Each field can be given a data type which is the type of data that is expected by that field.
Data types
It is best practice to pick the field that most closely corresponds to what you're trying to accomplish. For example, if you're storing passwords you should pick the Password data type, or if you're storing dates you should pick the data type and so on.
You can also set relationships between different data models using the "Link to another record" option. This is useful for being able to
Lastly, you can control the field permissions for each data category.

API generator

The API generator can be used to automatically configure a coded backend for each of your data tables. For example, let's assume we have a users table with the following fields inside it.
Data tables example
Next, click on "API generator" located above the table.
This brings up the following popup, where you can select which backend app functionality you'd like to automatically install.
Install backend functionality
By installing these backend features, it means that your website or app now has the ability to create new records, update existing records, fetch records and delete records from a particular table.
For more information on this read "Build a Custom API Inside Dittofi".

Views

You can view each of your data models using different pre-built views inside Dittofi. Pre-built views include:
  • Grid
  • Form
  • Gallery
Let's take a look at how to use each of these individually now.

Grid view

This is the default view inside Dittofi. You can create multiple Grid views for each table. You can then customize each grid view by applying different filters and sort functionality to each of the different grid views that you create.
Setting a filter on a table
Ditto Tip: You are able to use the API Generator to fetch data for a specific view. For example, if you want to get all users who subscribed after a particular date. You could create a view that filters for all the users after a particular date and then use the API Generator for that specific view.

Form view

Forms are a way that you or one of your customers can enter data into one of your data models in Dittofi. To turn a table into a form view, simply click on the Form option for a particular table.
Creating a form view
Galleries are a good way to view your data in a tabular way. To turn a table into a Gallery view, simply click on the Gallery option for a particular table.
Last modified 21d ago