Online marketplace using Bubble.io: create database

In this article we will continue to describe you how to create small online marketplace without writing a code using Bubble. Our demo marketplace is intended for software publishers, who can promote and sell their software products. For this purpose we are using great platform – Bubble.io This platform allows to build complex web applications without writing any line of code. It is good for creating full functional and MVP versions of on-line businesses and fits for people who are not tech savvy. Everyone, who is not software developer can create own online marketplace within reasonable time. Let us to show you how to do this. You can create free account at Bubble . Current article is second part of our full guide. You can read our first part where we explained how to setup different user roles of online marketplace. Also, you can read this article where we introduced our application in general manner and we listed project’s requirements. Subject of current article is: how to create database for our marketplace.

Database structure

Most web applications require a database – the data that you or your users have entered. Our application is going to store information about software products. Each product has its attributes like: title, price, description etc. So we want to collect them in the database and display them when it is needed. Before we will be able to store such information about our products, we need to declare its structure. Bubble.io has powerful tools for describing data structure. Most important of them are: data types and fields. Data type is a tool that allows us to describe in database any things, processes or phenomenons from the real world. For example in our application we want to store information about: software products, clients and sellers. So we need to create appropriate data types: product type for products and user type for clients and sellers. Bubble already has User datatype by default. But we need to create custom Product type. Each data type in Bubble can have fields added to them. Fields are simply a spot reserved to save a specific kind of data that Bubble can recognize in the database. For example our product type can have such fields: title,price, description and others. We can create new custom data types in the Data tab. When we click it then we can see that Bubble.io has built in datatype: User. When we click on it then we can see all fields that belong to User type:User Role, email, Modified Date, Created Date, Slug. We can add new fields if we need it. Also we can create our own custom types. In our case let’s create a ‘Software product’ type.

Setup product type in database

Before we create a page for adding or editing products we need to create a new content type in our database. Each software product will have such attributes:

  • title
  • description
  • Featured image
  • url of page software product on vendor’s website
  • price lets use dollar currency for simplification
  • price type This attribute can have two possible values: one-off payment or recurring payment. First means that the buyer needs to pay for the product only once, when he purchases. Second means that buyers should make periodic payments.
  • recurrent payment period This attribute is related to the previous one and means how frequently buyers should make recurring payments: monthly, annually. Apparently it makes sense when the value of the price type is recurring payment.
  • free options This attribute shows if a software product has free version or provides free trial period, or free online demo
  • deployment means operation systems are supported by software products. Available options: SaaS, iPad, iPhone, Android, Windows, Mac, Linux.
    We will create the possibility for buyers to filter software based on such attributes: price, price type, recurring payment period, free options and deployment. This is why we need to create a search filter in the search page.
  • published if it equals yes, then product is published in catalog, no – then is not published. We can select yes/no type for this field.
  • Creator this attribute indicates seller who added software product
  • Created Date

Now lets create a new Data type: Software product .

Step 1. Goto Data tab and create a new type.We call it ‘Software product’ . By default Bubble automatically creates such fields : Creator, Modified Date, Created Date.


create new software product type

Step 2. Let’s add other needed fields: title, description,Featured image etc. For this click the ‘Create new field’ button and add one by one each field.

Field name

Field type

deployment

text

description

text

Featured image

image

free options

text

price

number

price type

text

recurrent payment period

text

title

text

url of product page

text

published

yes/no

Creator

User

Modified Date

date

Created Date

date

Slug

text


create new field of product type

When we finish to add new fields from table we will see screen that is similar to below picture


create  product type

Testing and populating the database


populate database

After we created Software product type, lets try to populate our database. Please not that in future we will create ability for sellers of our marketplace to create their own products. By now lets do it by ourselves for testing purposes. First lets open our database. Click on ‘App Data’ tab on the top of screen. On this tab we an add new product by clicking ‘New Entry’ button. New ‘Create a new database entry’ window opens. You can fill all necessary fields and click ‘Create’ button.


create new entry window

We finished to prepare database for our software products online marketplace. In next article we will show you how to create Seller dashboard .

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top