# Help! connecting Database

**URL:** <https://forum.bubble.io/t/help-connecting-database/137363>\
**Category:** Database\
**Created:** [February 21, 2021, 1:30pm UTC](https://forum.bubble.io/t/help-connecting-database/137363 "2021-02-21T13:30:51Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![aneejego](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/aneejego/32/85134_2.png) [@aneejego](https://forum.bubble.io/u/aneejego)\
**Post date:** [February 21, 2021, 1:30pm UTC](https://forum.bubble.io/t/help-connecting-database/137363/1 "2021-02-21T13:30:51Z")

</div>

Hello!

Will really appreciate the help as I can’t move forward at the moment (can’t move forward without sorting this out first) 😔

I rebuilt the question and similar database structure in a new app to be able to share it, here it is  
(you are able to edit)

> **[Bubble - Visual Programming](https://databasehelp.bubbleapps.io/version-test?debug_mode=true)**
>
> Build stuff without code and launch a startup without a tech-cofounder! Bubble is a visual programing language. Instead of typing code, use a visual editor to build applications.

So question is, I want users to be able to pick who the want to register as (so I did a dropdown with 3 options - business, charity or volunteer)

![q1](https://us1.discourse-cdn.com/bubble/original/3X/7/7/77dc2f8dcb314317730c344898df5ea8eefa831c.png)

Then I do a workflow, looks like this _/attaching screenshots as well for a quick peak_

 ![q2](https://us1.discourse-cdn.com/bubble/original/3X/6/c/6ccdedb52e17fea0a60ad73369618cf54759f302.png)  
 ![q3](https://us1.discourse-cdn.com/bubble/original/3X/1/8/1853afb0e9e70297233d12fef4c3021b8ea40805.png)

Is it incorrect?

 ![qa6](https://us1.discourse-cdn.com/bubble/original/3X/f/2/f2583a3d843d82d4045c54bfe563d534b174931d.png) ![qa5](https://us1.discourse-cdn.com/bubble/original/3X/7/7/77df368eae80803abf244b05c995dc1490a32202.png)

It does populate fields. Question is - am I doing it the right way?  
It would really ruin my app if I do it wrong so will really appreciate the help

 ![qqq](https://us1.discourse-cdn.com/bubble/original/3X/8/4/84d4422ae8c23a9c1eba4b4b7fdc7f29dfa14e33.png)

I will need to have Volunteering Listings and have Charity and User attached to it?

\*\*So how would I link them all up later (providing that so far it is set up right)? \*\*  
**What does and doesn’t need linking?**

Questions  
**How would I attach volunteering listing to a charity, not user? Or do I need to do both?**  
**What’s the best way?**

 ![HOW](https://us1.discourse-cdn.com/bubble/original/3X/3/e/3e859e3ca959c5e1d67c7053a6fc00416e093109.png)

Please point me in the right direction

---

<div class="post-metadata">

**Author:** ![aneejego](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/aneejego/32/85134_2.png) [@aneejego](https://forum.bubble.io/u/aneejego)\
**Post date:** [February 21, 2021, 1:31pm UTC](https://forum.bubble.io/t/help-connecting-database/137363/2 "2021-02-21T13:31:58Z")

</div>

Like, for a listing, who will be the creator? is just user enough? or I need both

---

<div class="post-metadata">

**Author:** ![aneejego](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/aneejego/32/85134_2.png) [@aneejego](https://forum.bubble.io/u/aneejego)\
**Post date:** [February 21, 2021, 2:10pm UTC](https://forum.bubble.io/t/help-connecting-database/137363/3 "2021-02-21T14:10:06Z")

</div>

ok it seems like i made it work… but is it correct? lol

 ![uuu](https://us1.discourse-cdn.com/bubble/original/3X/e/b/ebc60b7b9c26c4a6765ef67d677b686130f8efcf.png)

---

<div class="post-metadata">

**Author:** ![J805](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/j805/32/41267_2.png) [@J805](https://forum.bubble.io/u/J805)\
**Post date:** [February 21, 2021, 4:14pm UTC](https://forum.bubble.io/t/help-connecting-database/137363/4 "2021-02-21T16:14:06Z")

</div>

Hey @aneejego 👋,

Databases can be confusing at first. You aren’t alone. 😊 I am not sure of what your ultimate goal is. It would help to understand what you want your end result to be, but I will try my best to help.

This is my best guess about how you might want to set up your database. Again, without discussing in more detail, it’s just my best guess.

Assuming that you want to display a list of all of these entities together at some point, here is my suggestion. There are other ways to do it too, but this is just one way.

Database Structure:

**Entity**

- entityType = (business, charity) as an option set.
- entityName = text
- about = text
- logo = image

**User**

- parentEntity = entity
- firstName = text
- lastName = text
- email = text
- volunteer = yes/no (maybe?)

That way you are only creating one thing and then attaching it to the user on sign up.

Does that make sense?

I am still not sure what you want to do with the volunteer list though. Maybe you can explain what your goal is, then we can try to help more.

Hope that helps! 😊

@j805 [www.NoCodeMinute.com](http://www.nocodeminute.com/)

For All Your No-Code Education Needs:

- One-on-One Tutoring
- eLearning Hub
- Video Tutorials

---

<div class="post-metadata">

**Author:** ![aneejego](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/aneejego/32/85134_2.png) [@aneejego](https://forum.bubble.io/u/aneejego)\
**Post date:** [February 21, 2021, 5:47pm UTC](https://forum.bubble.io/t/help-connecting-database/137363/5 "2021-02-21T17:47:32Z")

</div>

thank you! it all seems to be working for now, but if i run into an issue again is it ok to pop you a message?

thank you so much!

---

<div class="post-metadata">

**Author:** ![J805](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/j805/32/41267_2.png) [@J805](https://forum.bubble.io/u/J805)\
**Post date:** [February 21, 2021, 5:59pm UTC](https://forum.bubble.io/t/help-connecting-database/137363/6 "2021-02-21T17:59:09Z")

</div>

Sure, sounds good. 😊

---

<div class="post-metadata">

**Author:** ![hiwasim](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/hiwasim/32/87531_2.png) [@hiwasim](https://forum.bubble.io/u/hiwasim)\
**Post date:** [March 7, 2021, 6:30pm UTC](https://forum.bubble.io/t/help-connecting-database/137363/7 "2021-03-07T18:30:52Z")

</div>

Hello kind folks. I’ve run into what seems like a very petty issue and I’m probably missing something very basic, but I’m unable to move forward.

So I’ve got two data types - Users and Articles.

Everything is great with users. My users can change, modify,update, delete whatever when they store their info. Everything remains private, no users see anything that belongs to other users.

The problem is with the common articles data type. So this is the data to which users can contribute to a common pool. They enter the data in 5 fields, click ADD and the workflow adds a new article to the database. This is visible via RG to the others. All good.

But if users need to modify the article - how to do it? What is the workflow to retrieve a particular article from the database and update its image or name? I’ve created a modify articles page, but unable to retrieve a particular article from the database to update. There are no privacy issues, so everyone can modify or update any of the articles, immaterial of who submitted it.

What am I missing?

Thanks a ton.

---

<div class="post-metadata">

**Author:** ![aneejego](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/aneejego/32/85134_2.png) [@aneejego](https://forum.bubble.io/u/aneejego)\
**Post date:** [March 7, 2021, 7:11pm UTC](https://forum.bubble.io/t/help-connecting-database/137363/8 "2021-03-07T19:11:18Z")

</div>

did you do a do a search for with constraints?

---

<div class="post-metadata">

**Author:** ![hiwasim](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/hiwasim/32/87531_2.png) [@hiwasim](https://forum.bubble.io/u/hiwasim)\
**Post date:** [March 7, 2021, 9:05pm UTC](https://forum.bubble.io/t/help-connecting-database/137363/9 "2021-03-07T21:05:58Z")

</div>

Hey @aneejego , I did, yes. After I add the constraints to match the article number to the number that is chosen in the dropdown, the THING TO CHANGE is still red with Search for Articles and it wants me to add something to it. It only seems happy if I add the first item or last item or random item.

Any ideas?

---

<div class="post-metadata">

**Author:** ![aneejego](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/aneejego/32/85134_2.png) [@aneejego](https://forum.bubble.io/u/aneejego)\
**Post date:** [March 8, 2021, 3:01pm UTC](https://forum.bubble.io/t/help-connecting-database/137363/10 "2021-03-08T15:01:05Z")

</div>

can you show screenshot or share app

---

<div class="post-metadata">

**Author:** ![adamhholmes](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/adamhholmes/32/100510_2.png) [@adamhholmes](https://forum.bubble.io/u/adamhholmes)\
**Post date:** [March 8, 2021, 3:06pm UTC](https://forum.bubble.io/t/help-connecting-database/137363/11 "2021-03-08T15:06:00Z")

</div>

When you do a search you’ll get a list of items from the database (even if there’s only 1 item on that list).

So you need to add `:first item` to turn the list into a single item that you can use as your data source for your article page or group etc.

---

<div class="post-metadata">

**Author:** ![hiwasim](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/hiwasim/32/87531_2.png) [@hiwasim](https://forum.bubble.io/u/hiwasim)\
**Post date:** [March 8, 2021, 8:23pm UTC](https://forum.bubble.io/t/help-connecting-database/137363/12 "2021-03-08T20:23:40Z")

</div>

Here goes.

 ![Screenshot 2021-03-09 at 1.52.59 AM](https://us1.discourse-cdn.com/bubble/original/3X/1/5/15823c03bd8f6cba8f006047cc76e917f4b61b9c.png)

Thanks.

---

<div class="post-metadata">

**Author:** ![hiwasim](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/hiwasim/32/87531_2.png) [@hiwasim](https://forum.bubble.io/u/hiwasim)\
**Post date:** [March 8, 2021, 8:32pm UTC](https://forum.bubble.io/t/help-connecting-database/137363/13 "2021-03-08T20:32:29Z")

</div>

Hey, thanks a ton. This solved it. I kept presuming that :first item will modify the first item of the database. After adding a constraint, it updated correctly. Thanks a bunch.
