Beginners Guide to Bubble.io Database
In this Bubble tutorial, Planet No Code introduces the beginner's guide to the Bubble database. Learn how to structure your data, create data types, and establish relationships between them. Discover the importance of privacy rules and how to ensure data security. With hundreds of Bubble tutorial videos available, Planet No Code has you covered for all your no-code app development needs.
Master Bubble's database: Unlock the power of data types, fields, and relationships in this beginner's guide to building no-code web apps.
Create, link, and secure: Learn to set up data types, establish relationships, and implement crucial privacy rules for your Bubble database.
Dive into Bubble's database structure: Discover how to organize your app's data like spreadsheets and leverage the power of unique IDs and primary fields.
Welcome to Planet No Code
If you're just starting out building a Bubble app then welcome to our channel. We are Planet No Code. We've got hundreds of Bubble tutorial videos for people just like you from beginners all the way through to advanced and you can find them all on our website planetnocode.com. You can find videos there that you can't even find on YouTube, but this is my Beginner's guide to the Bubble database.
Introduction to Bubble
Bubble is a fantastic no code web app creation tool. It really excels at building web apps and I'm going to explain to you some of the key points of understanding how the database works.
Bubble's Interface
In Bubble you've got these tabs down at the left hand side. You've got design, that's where you design your UI, workflows where you create your workflows, and we're going to be focusing in this video on data.
Understanding Data Types
Your data can help to think of this like a series of sheets in Excel or if you are a bit more modern maybe Google sheets. All of my data types represent a sheet. I've got a lot of data types in here because this is an app I keep coming back to and using throughout all of our video demos. If you see anything that you like here do a search on our website because you'll find content all about it such as how to generate AI images.
Creating a Data Type
Creating a data type. Let's do one for this video. I'm going to say let's create a type called book and Bubble supplies some built-in fields such as who created it, when it was created, when it was modified and a slug. The slug is part of the URL if you were to link to a page all about this particular book. The keyword there to look up in our library is type of content. Then you can set the slug or like the slash Harry Potter would be one way of setting the slug for a Harry Potter book.
Adding Fields to Data Types
We can then go ahead and add in extra fields. A book is definitely going to have a title and the title I'm going to set as Text. A book is also going to have an author and so I might want to have an author Data type in my database. That way I find it really easy to display books by Author so let me add in an author data type and the author is going to have a name.
Creating Relationships Between Data Types
Now I want a way of saving author into a book. So I go back to my book and I create a field and I can create a field called author. Some books have got more than one author. So actually I can say this field is a list and that allows me to list more than one author into the book's author field.
Adding Data to the Database
Let's put some data in that and give it a go. So I'm going to go into books and let's create a book here. I got to think of a book off the top of my head. Okay, we will just go with Harry Potter. We create a book and that adds an entry into our database.
Understanding Development vs Live Versions
It's important to recognize that this has a live effect on my Preview or my development app. Your Bubble app has at least two separate databases: your dev version, this is where I'm making all these edits creating all of these extra data types, and your live version. They are completely separate. This has created an entry in my books Database for Harry Potter, but it's not going to appear in my live app's database.
Setting Up Primary Fields
Now I want to set an author for Harry Potter. So I go into authors and I can add in JK Rowling. I think I've spelled that right. Then I can go back into books and Edit and I want to add in JK Rowling but I'm not seeing JK Rowling in this selection and that's because I need to set the field for me as a human to view the readable data. What I mean is that every entry in your Bubble database has a unique ID just like this. But how do I know which unique ID that represents? Well, I need to tell Bubble to put a text label there instead and I can do that with primary fields.
Understanding Database Relationships
So I find author and I say use the name field. Now if I go back in I can go JK Rowling and I get JK Rowling and I have to click add. This is because it's a list and I can click save. Now it has added that entry. It's created a database relationship between those two entries. If I go back onto author, the author does not have in and of itself a link back to Harry Potter. It is Harry Potter that has a link through to JK Rowling.
The Importance of Privacy Rules
One more thing because it's so important and you don't believe how easy it is to miss is privacy rules. Imagine you've created an app for your users where they've got their own personal library. But it should only be accessible to them. At the moment any book and any author is completely publicly visible. Just like a blog post in fact someone with the right tool set could basically scrape all the data from my Bubble app about all my books and all my authors.
Setting Up Privacy Rules
But what if I want to make it so that if a user creates a book only they can see it? On books I would uncheck all of these "everyone else" fields because I want it to be private. Then I can say something like current user. It doesn't matter which around you do this other thing we can say this book's creator is Current user and like 90% of the time that is the appropriate privacy Rules expression, but obviously it depends on your app. If your app has got an organization feature or a team feature, you're going to need to find the way of sharing data across multiple users, but restricting it to the particular team or organization.
Conclusion
That is my beginners guide to the Bubble database. If you've got any questions leave a comment down below. We love responding to them. We also love sharing our pre-existing videos. Like I say we've got hundreds of them so ask a question, good chance we've already got a video and we can send you a link to watch it right away.
Get the Complete Bundle for Just $99
Access 3 courses, 390+ tutorials, and a vibrant community to support every step of your app-building journey.
Start building with total confidence
No more delays. With 30+ hours of expert content, you’ll have the insights needed to build effectively.
Find every solution in one place
No more searching across platforms for tutorials. Our bundle has everything you need, with 390+ videos covering every feature and technique.
Dive deep into every detail
Get beyond the basics with comprehensive, in-depth courses & no code tutorials that empower you to create a feature-rich, professional app.
Save over 70%!
Valued at $80
Valued at $85
Valued at $30
Valued at $110
Valued at $45
Can't find what you're looking for?
Search our 300+ Bubble tutorial videos. Start learning no code today!
Have questions?
We have answers!
Find answers to common questions about our membership plans, programs, and more.
We're here to help you launch your no code SaaS. Reach out to the team and we'll double check our vast library for useful content. We'll advise you on how we'd tackle the same problem and there's a good chance we'll record the video to help the wider community.
As a Planet No Code member, you'll receive a discount on our Bubble coaching sessions. Monthly members receive a 10% discount, while Annual members receive a 17.5% discount. To redeem your discount, simply log into your account and book a coaching session through our platform.
Our 8-week intensive mentorship program is designed to provide personalized guidance and support to help you accelerate your startup journey. You'll be matched with a startup expert who will work with you one-on-one to set goals, overcome challenges, and make rapid progress.
To apply for the Mastery Program, simply click the "Request Invitation" button on our pricing page and fill out the application form. Our team will review your application and schedule a call with you to discuss your goals and determine if the program is a good fit for your needs.
We accept all major credit cards, including Visa, Mastercard, American Express, and Discover.
While we don't offer a free trial, we do provide a 14-day money-back guarantee. If you're not completely satisfied with your membership within the first 14 days, simply contact our support team, and we'll issue a full refund.