loopbackio / loopback-next

LoopBack makes it easy to build modern API applications that require complex integrations.
https://loopback.io
Other
4.95k stars 1.07k forks source link

Docs: what relation types will work well with my database? #2341

Closed bajtos closed 3 years ago

bajtos commented 5 years ago

Create a new section (or even a new page) in our docs for relations and explain users what relation type to choose depending on which database they use.·

We should verify that our recommended solution is actually a good one that works well for the target database. This will most likely require research on our side, as we don't have deep knowledge of different NoSQL databases. Such research is out of scope of this story, there will be follow-up spike stories. While creating the first version of the guide, we should simply label the entries that we are not confident about.

An example for illustration:

SQL databases

Relation type LoopBack flavor
1-N HasMany
N-1 BelongsTo
1-1 HasOne

MongoDB

Relation type LoopBack flavor
1-N EmbedsMany
N-1 n/a
1-1 EmbedsOne

The suggestions above are an initial proposal. See the spike story #2342 for discussion about which LoopBack relations work best for MongoDB.

Cloudant & CouchDB

Relation type LoopBack flavor
1-N ReferencesMany
N-1 n/a
1-1 ReferencesOne

The suggestions above are an initial proposal. See the spike story #2343 for discussion about which LoopBack relations work best for MongoDB.

(etc. for other databases that have an LoopBack official connector)

See the discussion in #2127 to better understand the wider context and also #2340 for related work.

Acceptance criteria

stale[bot] commented 3 years ago

This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository. This issue will be closed within 30 days of being stale.

stale[bot] commented 3 years ago

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.