I am trying to set up a Google Firebase Realtime Database to store user data. I am really new to Java and Firebase and until now user data gets saved just under the Uid. I now want to have different categories like Users, Posts, Messages... How can I add such a structure to my Database? I will link a Screenshot of my Database. I am completely new to those things and don't even know in which file I can add such a structure.
You can structure your database something like this:
Users:
Users -> uid(With users information.)
Posts
Posts -> user_id -> post_id(with post details)
Messages:
Message -> user_id -> messages (with message and receiver id.)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.