# Many-to-many relation with additional data

**URL:** <https://community.parseplatform.org/t/many-to-many-relation-with-additional-data/1347>\
**Category:** Parse Server 📡\
**Created:** [February 21, 2021, 10:40am UTC](https://community.parseplatform.org/t/many-to-many-relation-with-additional-data/1347 "2021-02-21T10:40:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cperrin](https://community.parseplatform.org/user_avatar/community.parseplatform.org/cperrin/32/479_2.png) [@cperrin](https://community.parseplatform.org/u/cperrin)\
**Post date:** [February 21, 2021, 10:40am UTC](https://community.parseplatform.org/t/many-to-many-relation-with-additional-data/1347/1 "2021-02-21T10:40:06Z")

</div>

I am new to Parse and the NoSQL world and I would like some input on how to implement a many-to-many relation with additional data on the relation. Something like relation between a shopping cart and a product with an added quantity on that product.

In the SQL world I would just use a table that stores the IDs of both and a column for Quantity.

I could do that in Parse too but I’m not sure if that is a good idea. Another Idea I had was to use an array and save an the relation manually. Not sure of that either.

---

<div class="post-metadata">

**Author:** ![davimacedo](https://community.parseplatform.org/user_avatar/community.parseplatform.org/davimacedo/32/316_2.png) [@davimacedo](https://community.parseplatform.org/u/davimacedo)\
**Post date:** [February 22, 2021, 7:37am UTC](https://community.parseplatform.org/t/many-to-many-relation-with-additional-data/1347/2 "2021-02-22T07:37:18Z")

</div>

I believe that a joint class would be the best approach: [JavaScript Developers Guide | Parse](https://docs.parseplatform.org/js/guide/#using-join-tables)

Basically for your example you will create a class called ShopingCartProduct with a pointer to ShoopingCart a pointer to Product and a number field to store the quantity.
