Connect to external database or maintain database within bubble?

New bubble user here. I am just starting to work on my first big app which will be released for MVP production, and I’m trying to determine whether to use Bubble’s built-in database, or use an external cloud database such as AWS RDS (or other similar). Right now I’m not totally sure what is possible or makes sense, just looking for more experienced recommendations.

The main feature of this app is a voting feature. A manager/moderator will open voting on a particular set of items. Once voting is “opened,” a group of users will submit rankings (1-n) on that set of items. Once all users have voted, the voting is “closed.” Scores are calculated using the user’s rankings and compiled. The scores will be normalized since there will be a different number of items in each set. This way, scores across multiple sets can be compared across time.

So, here are my considerations:

  1. The app needs to perform calculations across multiple tables and needs to be able to allow a strong statistical analysis. The basic ranking calculation is not necessarily difficult, but I want to be able to extract lots of different types of data in the future.

  2. I want to have access to the data in the future, whether or not it remains on bubble. I understand bubble can export to CSV, but I think there may be an advantage to having the calculations performed externally, instead of buried within the bubble workflow.

  3. I also do not know exactly what future calculations/statistics will be needed, so having easy access to the data in a way that makes it easier to perform other future calculations would be preferred.

One of my initial thoughts was to just use bubble for the front end (and probably also account management). Send everything to a separate external database, and perform all the calculations there. Send the results back to bubble to display to the users.

I don’t know what makes the most sense, and I only have a vague sense of what is possible. I’m not a programmer or very experienced with databases. Right now I am running a similar system with a lot of manual data entry in excel, and I know it is better suited for a database. Any recommendations would be appreciated.

1 Like

If it’s an MVP just start with the bubble db and get a working version. I don’t have experience with bubble to comment on the db fitting your needs… but do have experience launching products and this looks like something you’ll get bogged down in without getting a chance to see it in action and getting valuable input.

Using an external DB with Bubble results in slower development, for sure, although there are some scenarios where it results in a more performant application.

Certain calculations are hard to do in Bubble and/or are slow. When we’re doing complex math, we send data from Bubble through an API to an endpoint we host on Amazon Lambda, which has custom code to run the math, and then it sends back the data to Bubble so that it’s stored in Bubble’s DB. We send multiple tables of data at once, use advanced statistics, etc. So, similar to your requirements I believe.

An alternative that we don’t use much, but can also make a lot of sense, is to store the underlying data in Bubble and then on the UI, have the data sent through an API to run some calculations on it and return the value to the UI. This way, you don’t have to bother to store the calculated data in Bubble.

Both these solutions work well so long as the math that’s done doesn’t require thousands of data points for each calculation. If you need thousands of records then the transmission speed of that much data becomes a major consideration, and storing either a copy or all of the data separately starts to make more sense.

Hope this helps.