Back

Collection vs Document

  • 0
  • Self Hosted
  • Databases
Meister der Magie | Martin
28 Nov, 2024, 14:40

I'm confused about the structure of Databases. We have Database -> Collection -> Document -> Attributes. This somehow seems to be one layer too much.

I want documents that contain additional information about users, e.g. how many products they bought, favourite product, ... How should I structure my Database? I thought of [Database] UserInfo -> [Collection] ??? -> [Document] User1 -> [Attributes] all attributes of this user. What should "collection" be? Or do I have a fundamental misunderstanding of how databases are supposed to be structured?

TL;DR
Confusion about database structure. Instead of Database-Collection-Document, consider Database-[Collective Name]-Document. For user info, use Database User Info-[Collection Name]-User1-[Attributes].
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