Devesh Kumar
Devesh Kumar

Reputation: 1019

Mongo Db design (embed vs references) in Trello

When I open https://trello.com/board/board_name/board_id.json, I can see that within a board there are Nested documents of Card, List, Actions etc. Want to know whether three main collections that Trello team talk about card, board, member are Referenced or they are embedded (nested) within board?

Upvotes: 1

Views: 348

Answers (1)

Brett
Brett

Reputation: 3538

They're referenced. The responses assembled by the API don't precisely reflect the structure of the DB. Otherwise, board documents would grow without bound, which wouldn't work out well for long-lived boards. Also, if we included Member documents in the board, we'd have to update every single board document the member was on when we updated a member's name.

Upvotes: 3

Related Questions