# Joining Tables into One Repeating Group

**URL:** <https://forum.bubble.io/t/joining-tables-into-one-repeating-group/165586>\
**Category:** Database\
**Created:** [August 20, 2021, 10:15pm UTC](https://forum.bubble.io/t/joining-tables-into-one-repeating-group/165586 "2021-08-20T22:15:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris43](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@chris43](https://forum.bubble.io/u/chris43)\
**Post date:** [August 20, 2021, 10:15pm UTC](https://forum.bubble.io/t/joining-tables-into-one-repeating-group/165586/1 "2021-08-20T22:15:39Z")

</div>

I am working on a Survey Assessment platform and the database has several tables to keep them from getting unnecessarily large:

Surveys - this is the aggregate results from a survey - Question Group, Number Assessors, etc.  
Survey Summary- partially aggregated results from the survey to rull up to question groups  
Survey Detail - this is the granular results from a survey that get rolled up  
Assessors - this is the list of people assessing the individual including the Subject individual  
Organizations - this is a list of organizations where the subject works and the org structure  
Questions - these are the questions and groupings of questions in the survey

I am building the dashboard with a repeating group of Data Cards and I want the Card to show:

Subject: Assessor (table) with Assessor Type Self  
SBU: Business Unit for the Subject - Organizations (table)  
Title: Job Title for the Subject - Assessor (table)  
Survey Dates: Start/End - Surveys (table)  
Survey Status: Complete, In Process - Surveys (table)  
Assessors: Total number of Assessors - Surveys (table)  
Overall Assessment Score: Surveys (table)  
Overall Assessment Score by Questions Group: Surveys (table)

The relational database design does not really lend itself to this task (see image) I think I have to put each data column I want into the final Survey Aggregate table and then run backend processes to update that. Is there a way to bring data like Job Title into the Surveys table without having to add it to the table? I should be able to connect a unique Assessor\_id from Surveys to Assessors and pull in the Job and Org data. Not sure how to connect that in a repeating group card.

 ![LeadNow360Plus Workflows - Data Tables](https://us1.discourse-cdn.com/bubble/original/3X/c/8/c87845446d676113a49139fa19de464a81b08664.png)

---

<div class="post-metadata">

**Author:** ![cmarchan](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/cmarchan/32/253062_2.png) [@cmarchan](https://forum.bubble.io/u/cmarchan)\
**Post date:** [August 21, 2021, 6:30am UTC](https://forum.bubble.io/t/joining-tables-into-one-repeating-group/165586/2 "2021-08-21T06:30:22Z")

</div>

@chris43

Data card  
Title (text)  
Assessor (user)  
Organization (organization)  
Overall score (number)  
Score by Group (number)

User  
First name (text)  
Last name (text)  
Email (email)

Organization  
Title (text)  
Assessors (users)

Survey  
Date start (date)  
Date end (date)  
Status (options set: complete, in-progress)  
Questions (questions)  
Score  
Respondent - Assessor (user)

Question  
Title (text)  
Group type (options set\> Type1, Type2, Type3)

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [August 21, 2021, 7:17am UTC](https://forum.bubble.io/t/joining-tables-into-one-repeating-group/165586/3 "2021-08-21T07:17:05Z")

</div>

> [@chris43](#):
>
> I should be able to connect a unique Assessor\_id from Surveys to Assessors

As above. Unless you are getting this data from elsewhere, then don’t use foreign keys.

---

<div class="post-metadata">

**Author:** ![chris43](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@chris43](https://forum.bubble.io/u/chris43)\
**Post date:** [August 23, 2021, 1:26pm UTC](https://forum.bubble.io/t/joining-tables-into-one-repeating-group/165586/4 "2021-08-23T13:26:08Z")

</div>

Starting to realize that foreign keys are a persistent part of my headaches with [Bubble.io](http://Bubble.io).

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [August 23, 2021, 1:28pm UTC](https://forum.bubble.io/t/joining-tables-into-one-repeating-group/165586/5 "2021-08-23T13:28:18Z")

</div>

It takes some unlearning if you are used to a relational-style database my mySQL.

On the positive side…no more left inner-outer righthand joins 😀

---

<div class="post-metadata">

**Author:** ![chris43](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@chris43](https://forum.bubble.io/u/chris43)\
**Post date:** [August 23, 2021, 1:40pm UTC](https://forum.bubble.io/t/joining-tables-into-one-repeating-group/165586/6 "2021-08-23T13:40:49Z")

</div>

LOL - "Always look on the bright side of life… " We will reconfigure the database tables to contain lists of things wherever we can. some if it is a little tricky - have our work cut out for ourselves. Thanks @NigelG and @cmarchan
