Please could a kind individual help me understand how I link data types in my Bubble App because I just can’t get my head around it. I’m new to Bubble and I’ve watched loads of videos and read the manuals and other forum posts about this but I’m still confused so please be patient with me…I’m used to MS Access where you have tables and set up the relationship between primary and foreign keys etc. But in Bubble it seems to be different.
Let’s say I’m responsible for the cars at work and need to create a Bubble app to track who’s using each car and when it’s due to go out and come back. What would be the best way to create my data structure to create a minimum viable app so that people can book cars for when they need them?
I already have a Data Type for “User” and I add to it fields like first name, last name, email, job title and office address. This stores info about the employees who can use the cars and who’ll log in to the app to make bookings.
I then create a second Data Type for “Cars” and create fields like Registration Number, Make, Model, Colour, Mileage, Last Serviced. This logs all the cars and lets me keep an eye on when they’re due routine maintenance.
In order to track bookings of available cars that tracks who (ie which “User”) has what Car and when they will have/had it…
Do I create a third Data Type called “Bookings” and put in fields like “UserEmail” with field type “User” (to link across to the email field which uniquely identifies each user in the “User” Data Type field), then a field for “Car Reg No” with field type “Cars” (so that it links to the Cars data via the unique “Registration Number” field) and then create Date/Time fields for Date Out, Time Out, Date Returned, Time Returned. That will store all my bookings in the “Bookings” Data Type
OR
Would I just create Fields in the “Cars” Data Type for “User” (To link to the user data in the User Data Type) and then create Date Out, Time Out, Date Returned, Time Returned fields?
If anyone could explain this to me like I’m 5, I’d really appreciate it.
Thank you so much in advance.