Share via

"M" Coding Conventions

[This content is no longer valid. For the latest information on "M", "Quadrant", SQL Server Modeling Services, and the Repository, see the Model Citizen blog.]

The topics in this section describe coding conventions, idioms, patterns, and other best practices for modeling in the Microsoft code name “M” modeling language.

The guidelines are organized as simple recommendations that use the words “Do”, “Consider”, “Avoid”, and “Do not.” These words indicate the strength of the recommendation as shown in the following table.

Recommendation type Description


A guideline that you should always follow.


A guideline that you should generally follow. Exceptions are acceptable when you understand the original guideline and have a reason not to follow it.


A practice that you should generally avoid. There might be scenarios where the practice makes sense.

“Do not”

A practice that you should always avoid.


Note that even with the “Do” and “Do not” guidelines, there might be justifiable scenarios for breaking these rules. However, these scenarios are extremely rare, and you should carefully consider the consequences and possible alternatives.

In This Section

  • Source File Content
    Provides general guidelines for organizing the content of an “M” source file.
  • Braces
    Provides recommendations for using braces in “M” code.
  • Comments
    Provides recommendations for adding comments to “M” source files.
  • Naming
    Provides naming conventions for “M” code.
  • Extents and Types
    Provides best practices for using extents and types in “M” code.


Technical Reference ("M" Reference)

Getting Started in "M"

"M" Programming Guide

"M" Tools