Skip to content
Init is coming / May 19 - 23
Back

Is there a benefit to App Relations over unique id strings?

  • 0
  • Flutter
  • Web
  • Cloud
  • React Native
  • Self Hosted
Cale McCollough
10 Mar, 2025, 15:25

I'm trying to get my first Appwrite site together and I need to either use the Relations or do the manual method using UUID strings. The problem I'm finding is that when I need to reference the relation in my TypeScript code, I have a problem where I have to define the interface first and sometimes there are 2-way references. I'm failing to see the benefit of relations. How is it any different than storing an array of strings? Isn't TypeScript going to give me back an array of either UUID strings or JS Objects. Seems to me like the old method of just storing the count as a column/attribute and an array of strings makes more sense because you can select the count and/or the UUID string array. Do you know of any benefits to the Relations?

TL;DR
Developers are debating between using relations or unique id strings in Appwrite. Using relations can be beneficial for better organization, data integrity, and more efficient queries. Another advantage is the ability to create bidirectional relations. While the manual approach with UUID strings may seem simpler, relations offer more robust data management capabilities. Trust the Appwrite system and embrace relations for a more structured and scalable database design.
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