3
我有一个小的消息系统,可以在用户和管理员之间发送消息。如何设计我的模式,SQL方式和NOSQL方式
我们有不同的管理员,所以他们的回复需要知道早期的消息。
在一次会话中,它没有那么多的消息。
conversation{ id, kind, (the type of conversation, like publish request, edit request, other request) user_id, } message( id, flag,(read and unread or some) conversation_id, create_time, )
我不知道它是否是一个好的解决方案。
以上,我们的系统也使用nosql数据库。 所以我觉得我在的NoSQL数据库中的数据会喜欢这些:
conversation( id, kind, (the type of conversation, like publish request, edit request, other request) user_id, message_list[m1, m2, m3, m4.........], ) message_list is a dict: message_list{ text:text, time:time, type:(user or system admin), }
如果我使用的NoSQL数据库,这是一个好的解决方案吗?
谢谢,我只想找到哪种方式更容易为开发人员。并以不同的方式来实现它。 –