Android Firebase数据库设计:日历应用程序

Android Firebase数据库设计:日历应用程序,android,firebase,firebase-realtime-database,Android,Firebase,Firebase Realtime Database,我不熟悉firebase数据库(通常是NoSQL)。我正在设计一个类似谷歌日历的应用程序。用户可以创建事件并邀请其他用户。其他用户可以通过去、不去、可能去来响应此事件 这是我设计的(根据我的MySQL经验): 用户可以更新事件(添加或修改受邀用户、更改任何数据)或删除事件(这将删除对受邀用户的所有邀请) 这个数据库设计足够好吗? 非常感谢您的帮助。您也可以这样做 public class User { String email; String name;

我不熟悉firebase数据库(通常是NoSQL)。我正在设计一个类似谷歌日历的应用程序。用户可以创建事件并邀请其他用户。其他用户可以通过去、不去、可能去来响应此事件

这是我设计的(根据我的MySQL经验):

用户可以更新事件(添加或修改受邀用户、更改任何数据)或删除事件(这将删除对受邀用户的所有邀请)

这个数据库设计足够好吗?
非常感谢您的帮助。

您也可以这样做

public class User {
       String email;
       String name;
       List<HashMap<String ,String>> invitation; // the key is eventId, the value is the status
    }


    public class Event {
        int id;
        String name;
        String topic;
        //other fields
    }
公共类用户{
字符串电子邮件;
字符串名;
列表邀请;//键为eventId,值为状态
}
公开课活动{
int-id;
字符串名;
字符串主题;
//其他领域
}

它也可以是这样的

public class User {
       String email;
       String name;
       List<HashMap<String ,String>> invitation; // the key is eventId, the value is the status
    }


    public class Event {
        int id;
        String name;
        String topic;
        //other fields
    }
公共类用户{
字符串电子邮件;
字符串名;
列表邀请;//键为eventId,值为状态
}
公开课活动{
int-id;
字符串名;
字符串主题;
//其他领域
}

@TimBiegeleisen感谢您的评论。我们能有其他更好的模式吗?我猜错了,没有意识到Firebase不是SQL。更了解Firebase的人应该发表评论。在SQL中,您的模式在我看来还可以。@TimBiegeleisen感谢您的评论。我们能有其他更好的模式吗?我猜错了,没有意识到Firebase不是SQL。更了解Firebase的人应该发表评论。在SQL中,我认为您的模式是正常的。