Back

Relationship

  • 1
  • Web
Sanmay
16 Jul, 2024, 15:06

Hi everyone. I am new in Appwrite. i want to store Dishes Menu inside Each Restaurant item. Please Guide me πŸ’•

TL;DR
Developers are discussing two main approaches for creating relationships in Appwrite. The first method involves using experimental features like relationships. The second method is storing document IDs in a string array for better performance. For storing Dishes Menu inside Each Restaurant item, developers can refer to this link: https://appwrite.io/docs/products/databases/relationships
Ryan
16 Jul, 2024, 15:12

There are two main approaches here. The first way you could do this is using relationships (although they are an experimental feature). This link should walk you through understanding and using relationships in your projects https://appwrite.io/docs/products/databases/relationships

The second method, and my preferred way of doing it at the moment, is to simply store the IDs of the documents in a string array and then fetch the documents separately. I have found this to have better performance when dealing with a large amount of data than using relationships.

Sanmay
16 Jul, 2024, 15:16

@Ryan thanks. Can you Send me an example of the Second Approach ?

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