MongoDB - SPLessons

MongoDB Data Modelling

Chapter 10

SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

MongoDB Data Modelling

MongoDB Data Modelling

shape Description

MongoDB contains data that has an versatile pattern and conflicting to database of SQL. From there the designer has to choose and report a table’s composition before embedding information. The accumulations don’t implement record format. MongoDB Data modelling contains reports and these reports with the same accumulation don’t need the similar arrangement of structure or fields and these are the basic fields in an accumulation category that may carry out diverse sorts of information.

Properties of design schema

shape Description

The properties of design schema of MongoDB Data Modelling includes as follows:

shape Conceptual
figure

shape Examples

The below example describes the collection of different post structures in MongoDB Data Modelling.

{
   _id: POST_ID
   title: TITLE_OF_POST, 
   description: POST_DESCRIPTION,
   by: POST_BY,
   url: URL_OF_POST,
   tags: [TAG1, TAG2, TAG3],
   likes: TOTAL_LIKES, 
   comments: [	
      {
         user:'COMMENT_BY',
         message: TEXT,
         dateCreated: DATE_TIME,
         like: LIKES 
      },
      {
         user:'COMMENT_BY',
         message: TEXT,
         dateCreated: DATE_TIME,
         like: LIKES
      }
   ]
}

The above example, demonstrating the information. In which all the post has a single kind variables such as user, message, data created and like. And these post contain one or more labels which occurs in MongoDB Data Modelling process.

Summary

shape key Points

  • MongoDB Data Modelling – Contains data that has a versatile design and conflicting to database of SQL.