MongoDB study notes (four) use MongoDB’s document structure to describe data relationships

A collection of MongoDB can be regarded as a table of a relational database, and a document object (document) can be regarded as a record of a relational database. But the two are not exactly equivalent. The structure of the table is fixed, and the MongoDB collection does not have this constraint; in addition, the document objects stored in the collection can even embed sub-documents, or “sub-collections”. They can all be described in a format similar to BJSON in the end. Let’s analyze the unique data management method brought by this feature of MongoDB today. Let’s take the samus driver as an example to analyze. The samus driver supports two ways to access the database, the basic way and the linq way. The basic way was introduced in the previous article. I don’t want to explain the application examples separately for the linq way. I will use two ways in this article. Ways to compare presentations. 1. Collection operations containing sub-documents There is such an application scenario. A website provides the function of member login. Users need to register an account to enjoy membership services. However, registrants may give up filling in the user information form because the input items…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索