I am try to build a simple CRUD todo application using appwrite.I have a use case where where a user assign multiple tags to a given todo.I was hoping to have the type of tag as an array of strings (similar to Firestore) But appwrite does not seem to support raray of values as valid collection attribute type.How can i model this situation now?
Should i have another tags collection and userId as on one of the attribute of the tags collection? Do we have concept of foreign keys similar to mySQL?
What if i want to field is be one among give set of values (something like an enum ?)
Do i need to create index?primary keys?
I have exposure to relational database and often think in terms of relations and foreign key. I am front-end developer and my db skills are not that great. Any suggestion would be for great help.
Have you try to create a String type and mark it as array?
@Binyamin Thanks. Is it possible to nest collections as well? or have values as object?
You can't nest collection, AppWrite approach is to be fast as NoSql by providing NoSql-like syntax but eventually it's MariaDB (Relational) For the second question, there isn't any type for object, the only thing you can do is to create big string and put inside a serialized json.
I the next version we're going to experiment with allowing relationships. You can wait for that to happen 😉
nice thanks👍
Recommended threads
- Auth not working on expo react native
I'm trying to launch a development server with expo go and appwrite as a backend. On my windows pc, I've got a local docker instance of appwrite running as my b...
- Bulk delete failed with 401
- I created a transaction to bulk delete rows in a table has `done` equal `true` follow documentation. But when run, it returns 401 unauthorized error as screen...
- In which format should i pass the date?
I have a column with the type `datetime`. So i want to know which format is suitable for passing the date