The requirement now is that each user has some itemsprojects
, the project has a classificationtags
.
According to mysql, the method should be to build 3 tables, a user table, an item table, a classification table, and then foreign keys or something.
If it is mongo, is a watch enough?
{
username: '',
u_id: '132342131',
projects: [
{
tags: 'editor',
p_id: ['12312334','123345213','2352321313']
},
{
tags: 'blogs',
p_id: ['12312334','123345213','2352321313']
}
]
}
Beginners mongo, don’t hesitate to comment.
I think one table is enough for your situation.
mongodb
After all, it is a document database, and the stored data has high expansibility. Of course, you can leave if you want. For reference only