# Noob - thing inside a thing?

**URL:** <https://forum.bubble.io/t/noob-thing-inside-a-thing/22567>\
**Category:** Database\
**Created:** [January 6, 2018, 12:52am UTC](https://forum.bubble.io/t/noob-thing-inside-a-thing/22567 "2018-01-06T00:52:35Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![petter](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/petter/32/98626_2.png) [@petter](https://forum.bubble.io/u/petter)\
**Post date:** [January 6, 2018, 10:05am UTC](https://forum.bubble.io/t/noob-thing-inside-a-thing/22567/2 "2018-01-06T10:05:01Z")

</div>

Hi @qooqu, welcome!

In classical database terms, this would be a one-to-many relationship (one country can have mane cities, but a city can only belong to one country). In Bubble, the definition is a bit different, but the mechanics are the same.

1. Create data tyoe country  
You already have a data type called **City** , and you can now add another one called **Country** , with a name field (and vote, if you want to vote for countries as well)

2. Add **Country** to **City**  
Go into the City data type, and add a new field. In the list of field types, you pick **Country**. When this is added, you can add a Country to the City, meaning you have specificed which Country the City belongs to.

3. Add **Cities** to **Countries**  
Now you need to repeat this action, but with a small twist. You do the vice versa of the above, and add **City** to the **Country** data type instead, but this time check the box _This field is a list_. By doing this, you can add not just one, but several cities. In other words, the country will include a _list_ of the cities that belong to it.

When this is done, you can access the data both ways: you can look up a city and see which city it belongs to, and you can look up a country and see a list of cities that belong to it.

---

_[View the full topic](https://forum.bubble.io/t/noob-thing-inside-a-thing/22567)._
