Forum Academy Marketplace Showcase Pricing Features

Very basic question - Newbie

I need help on this newbie things.

I know how to build a database when you need lot of rows. (Eg. Movies. You will have tons of rows with different moves. So, you create these columns: Movie name, Director name, Rating, etc).

BUT, when in you app you need for like Data with only one row, how is the best approach to build the database?

The idea is I will create a page to input those app default values, and changes time to time. After that call it on different forecast scenarios when input fields has as Initial Value, the value inserted on that table.

Example, I need a central database with options, usually numbers: “Email revenue per year”, “% of unsubscribes”, etc

  1. Do you create the database named “Values”:

Field 1: “Email revenue per year” (type number)
Field 2: “% of unsubscribers” (type number)
Field 3: “Email % open rate”

or…

Field 1: “Name of the value” (text)
Field 2: “Value number” (Number)

… and I create each row with the name of the option I need and his value.

What of both is the well done or better approach?

Thanks in advance"

Have a look into option sets for this.

Thanks for the reply,

How exactly use Options of that? Options is not a list of things, example:

Colors (Blue, Red Green)
or…
Categories (Drama, Horror, Action)

And option also can not only be changed in the backend? For that I believed that I can’t use Options, and has to use Database.

@trainingforcomics

Either way the item that holds the value will have to be found

I would go with option 1 as I would know that I have only one of those in the dB and that it’s fields hold key data.

I would place a group in a popup that I never open, place a group of type of that thing, name in a way that I can find it easy in the expressions, do a search for the first item (as I know that only one exists of its kind in the dB).

This way I only do one search on the page to have it and to obtain the key data that it holds in an easy way in expressions

By the way …welcome to the community! :grinning:

2 Likes

Thanks! Like the idea!

1 Like

Like @cmarchan has said, use the :firstitem function. I do this A LOT!!

I created a dashboard of static data, that I may want to change like an admin email that is used in multiple place.

So I Do A Search Fro Admin Panel ----- :firstitem — value ---- admin email

Hey @trainingforcomics!

Some awesome answers and I’m happy your question was answered!

I highly recommend checking out Bubble Best Practices for Databases by AirDev! It’s a free resource that offers best practices for design, security, databases and more!

Also if you are a Bubble newbie I definitely recommend checking out our Bubble framework Canvas! We have a free Bubble Template & Chrome Extension to make building fast, responsive, and aesthetic!

Hope the Bubble Best Practices helps & if you end up trying out Canvas let us know how you like it! :smiley: