Extents -> Tables (M to SQL Mapping)
[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.]
Microsoft code name “M” modeling language extents are storage specifiers. For example, MyInts : Integer32*
means "MyInts is a place where I can hold a bunch of integers". “M”->SQL compilation translates extents into tables with the same name.
“M”->SQL compilation supports extents with four different types of extents: Scalar, collection of Scalar, Entity and collection of Entity. All supported extents are converted to SQL tables. The translation of “M” scalar types to SQL scalar types is covered in Basic Types (M to SQL Mapping).
Examples
SQL tables for entities have columns of the same name as the entity fields, as shown in the following table.
“M” Example | SQL Example | |
---|---|---|
Entity* |
|
|
Entity |
|
|
SQL tables for scalars have one column named Item
.
“M” Example | SQL Example | |
---|---|---|
Entity* |
|
|
Entity |
|
|
As shown in the preceding Scalar and Entity examples, tables created to hold exactly one value look the same as tables that hold many values. “M” assumes you always have exactly one row in such tables. Currently it does not create constraints to enforce this.
“M”->SQL does not support collections of collections, such as GroupsOfPeople : (Person*)*
.