Database for a Noob

I need some help setting up a database. I am new to Bubble and databases and want to get started on the right foot with my website. The idea is this…

A site where people can post advice and information about themselves. These would include:
Health Tips = Examples would be supplements, exercises, routines
Tech Hacks = Example could be how to record your screen using an iphone
Favorite Purchase from Amazon = Link to Amazon site with product
Parenting Advice = Self-explanatory

Should I set these up as different tables or all under “User”?

Before I start any new project I always try and think logical about what I am trying to achieve without hurting my head (too much). So in your case, what are you trying to achieve… from what I can gather, you want to enable users to post information about X… Since X can be a number of things, you need to split X into tangible things. I see the user table being overworked a lot in Bubble so my advise to you would be to keep things lean. Remember once X has been set, you can link back to user without burning it out.

I’ve been leaning in that direction. An example could be a “Vacation” table with two field types , description, and location. For health tip data type, the only field type I can think of is a description. Does that sound right? Thank you for your input.

Thank you Boston. I saw this same post yesterday and I went to Vertabelo to find some answers. The examples they gave didn’t really fit what I am trying to do, but it seems like a very useful site.

It is not really about finding an exact model and using it. It is more about reading through how databases work and getting an overview to assist with creating your own.

In your case I could see things getting overly complicated.

Are you expecting users to search for health tips and would need a way to filter between health tips that are about supplements, exercises, routines or any other types of health tips you decide to include?

Are you expecting to have a user with a profile that lists all their health tips for other users to read from their profile page?

Are you thinking that the health tips would have a category such as supplements with more information such as a description, or even suggested brands and maybe even links to supplements for purchase?

There are a lot of questions that you need to answer before you dive into structuring your database. Like @nomorecode said about think about the logic of what you are trying to achieve.

Because there are so many different possibilities of how an app would function and the user experience it aims to deliver, it is not possible to take some categories and recommend a standard database structure.

This sounds like you are aiming to provide your users with an ability to create a profile with their advice posted to their profile, or perhaps they would be adding advice to some kind of forum where users enter a forum for vacation advice and they would see posts from other users with their advice.

I’d really take some time to map out your app and its purpose. From that you should get greater insight into how to structure the database.

Yes that would be fine, you may find overtime that the vacation data-type needs additional fields like nearby, distance from X even a map field. Same applies to health-tips, you may find that your users want recipes, workouts or anything ‘health’ related. By separating your data out, your giving yourself the best possible start.

@boston85719 beat me to it whilst I was typpppppppppping

1 Like

Thanks again. Your responses make 100% sense. I have much to learn before diving in to databases and development. Are there any other sites or books you would recommend to help get me up to speed? Looks like I have to sharpen my axe some more before using it. Lol

@nomorecode Thank you!

I don’t have any recommendations. I personally never read a book on it. I just google searched and read through various blogs and reviewed lots of database schematics as well as forums such as github on the topic.

You also need to keep in mind that bubble makes it pretty easy to add to your database as you go. I have gone through and changed things in mine in the past and although it sets you back a bit, it is not the end of the world.

Most important though is to think about what you want a page to look like, how you want users to interact with it…once you know that, you can make better decisions on how to structure the database.

Also read through this forum on the topic of performance, page load speed and the like…there are a lot of discussions on those issues which are affected by your database structure.

As usual @boston85719 adds some good validity here. He raises a very good point on DB structure and design… the meat and bones of any bubble app.

Based on my own exp, both your DB and design will change from your initial concept (this is normal). Don’t be afraid of trying something, you can always revert back if something snaps… but make a very good breadcrumb trail as apps become very complicated fast! especially when your knowledge and skills improve… confidence can hinder.

If in doubt, start lean (app_1) > then create a few versions of your original app (app_2, app_3 etc…) > try new things > if these break > revert back to your original app (app_1) > and try again.

You can binge watch vids, read thousands of posts but the only way to really engrain logic is to get your hands dirty and build, rinse and repeat!!!

Great advice gentlemen! Thanks again for the time.