close

Let's take a look at what some of Datavail's clients and DBAs think are best practices for operating MongoDB.

1. Assigning Roles and Responsibilities

Roles are assigned based on the expectations for the new configuration. End users of reports are often immersed in configuration discussions, along with system administrators, data architects, and, of course, DBAs.

2. Preparing for a MongoDB Deployment                                                               

Storage engine solutions

  • MongoDB can be used with a variety of storage solutions — on premises, in the cloud, or hybrid.
  • The A variety of pluggable storage engines can be configured to work with MongoDB. The default package includes WiredTiger and MMAPv1.
  • MongoDB Enterprise Advanced edition includes support for encrypted storage engine and in-memory storage.

Schema design

NoSQL databases do not impose a schema, which is one of their great strengths. They can easily merge data in a wide variety of different formats. But the format they get merged into becomes a schema and its design should be carefully considered.

Database architects and schema designers need to consider the kind and number of documents to be stored, how they are grouped into collections, how they will be indexed and validated. With MongoDB Compass, these rules can be turned into a visual schema that makes it easier and faster to run database queries.

Data lifescycle management

Using MongoDB Zones, DBAs can build tiered storage solutions that support the data lifecycle, with frequently-used data stored in memory, less-used data stored on the server, and archived data taken offline at the proper time.

Managing indexes

Indexes are an important part of optimizing a database system. They can also take up a lot of space and need to be removed when no longer needed. Here are some of the best practices for modeling data as documents, below. The right approach depends on the objectives of your application.

  • Store data as a single document. The entire database can then be retrieved for a single query. This is efficient, but there are size limitations.
  • Avoid creating large documents. The maximum document size for MongoDB is 16MB. For files that are larger than 16MB, such as photos or videos, you need tools such as GridFS to break larger files into a series of smaller files. If the space allocated for a document is more than half the space available, it can’t be replicated in memory while an update is made. You need to monitor document growth and relocate documents when they get too large.
  • Avoid long field names. Long field names increase the minimum amount of space a database requires. The limit for field names is 125 characters. For a similar reason, avoid queries involving low-cardinal fields, because they can result in reports of enormous size.
  • Use MongoDB's new tools to manage Indexes.  The WiredTiger storage engine automatically compresses indexes. MongoDB Compass helps visibleize a database so that opportunities to eliminate infrequently used indexes are easy to spot.

USEFUL RESOURCES:

 

Mongodb training in chennai

 

Mongodb official

arrow
arrow
    文章標籤
    Mongodb Chennai Training
    全站熱搜

    saravanagumar 發表在 痞客邦 留言(0) 人氣()