MongoDB – Covered Queries In this chapter, we will learn about covered queries. What is a Covered Query? As per the official MongoDB documentation, a covered query is a query in which − All the fields in the query are part of an index. All the fields returned in the query are in the same […]
MongoDB – Relationships Relationships in MongoDB represent how various documents are logically related to each other. Relationships can be modeled via Embedded and Referenced approaches. Such relationships can be either 1:1, 1:N, N:1 or N:N. Let us consider the case of storing addresses for users. So, one user can have multiple addresses making this a […]
MongoDB – Database References As seen in the last chapter of MongoDB relationships, to implement a normalized database structure in MongoDB, we use the concept of Referenced Relationships also referred to as Manual References in which we manually store the referenced document”s id inside other document. However, in cases where a document contains references from […]