我是非关系数据库的新手,因此我想知道如何为我的数据建模。我的项目是一个简单的待办事项应用程序,其中包含项目和任务。请参阅下文了解我目前的做法,并让我知道它是否正确或我可以做得更好:
projects: [{
_id: 23423423423,
name: projectName1,
tasks: [{
_id: 3423423423423324,
title: "do something",
isCompleted: "false"
},
{
_id: 23223423423324,
title: "do something else now",
isCompleted: "false"
},
{
_id: 232234233423423,
title: "i have completed this",
isCompleted: "true"
}]
},
{
_id: 2342123123,
name: projectName2,
tasks: [{
_id: 3423423423422314,
title: "build this",
isCompleted: "false"
},
{
_id: 2322342342234234,
title: "build something else now",
isCompleted: "false"
},
{
_id: 2322342323423423,
title: "i have completed building this",
isCompleted: "true"
}]
}