Back

Best way to simulate relations

  • 0
  • Databases
  • Functions
MikeAmir
9 Jun, 2024, 23:32

Hello πŸ‘‹

If I'm not going to use the built-in relations feature because it's still in experimental mode, then what are the best practices for linking documents together? Should I store the IDs in the document fields? And if I have a one-to-many relationship, then should I store the multiple IDs in an array? And create a separate dedicated table for the many-to-many relationships? And simulate the document deletion operations using cloud functions?

TL;DR
To simulate relations without using the experimental feature, developers can store IDs in document fields, use arrays for one-to-many relationships, create a separate table for many-to-many relationships, and simulate document deletion operations using cloud functions.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more