Merise Method - Transforming MCD to MLD


As we saw in the previous post about Merise, MCD is the Conceptual Data Model which represents the structure of the information, from the point of view of the data, and MLD is  the Logical Model of Data which contains the contents of the MCD but specifies the structure and organization more clearly so it can be implemented. The MCD is used in conception level, while as a MLD is upgrading it to the organizational level. 

What makes up the MCD?


1. Entity
An entity is a major general point like Airplane or flight, enclosed in a rectangle.

2. Identifier
The identifier is exactly what it seems like. It is the identification of a specific entity. An entity is the general thing, while as the identifier specifies it. For example, a flight is the general point, while as the identifier is that flight number.

3. Information
This is just any complementary information that is needed. Ex. Flight_D (Destination), Flight_A (Arrival), date, etc.

4. Occurrence/Event
Occurrence are the values that we put. This can also be linked to cardinalities. Cardinalities are the number of sets in a group represented by (1,N), (0,N), (0,1), and (1,1). The first number indicates the minimum possibilities while as the second number is the maximum. Example, a flight needs a minimum of 1 plane and a maximum 1 plane, since one specific flight can only use one plane for its flight. The cardinalities are defined on both sides of the relationship. The other way around for this is that a plane can either take no flights (0), or many flights (N) just not at the same time.

5. Relationships
The relationships are typically represented by a verb and connect two points together. In the example above, there is the relationship 'use', as a flight uses an airplane and an airplanes is used for a flight. 


Rules for transforming MCD to MLD

  1. Entities become tables 
  2. The degrees of association (1,1), (1,N) etc. become relations between the tables 
  3. Degrees of associations n:n become associative tables


Transforming MCD to MLD


So, those are the three basic rules, but here is how I see it: Each entity has a Primary Key, which is usually denoted with an underline, and it is that primary key that will eventually turn into a foreign key in the connecting entity. However, to understand which primary key is copied where, we have to understand which way to point the arrow. So, I'm 100% sure there is a much better more technical way to explain this, but this is how I see it so far. The arrow replaces the relationship, and the cardinalities determine the direction of the arrow. If there is an N whether it be (1,N) or (0,N) the arrow is typically pointing to the entity closest to with the N. 
Once you have figured out which direction the arrow is going in you take the primary key of the entity that the arrow is point to and copy it to the other entity that the arrow is coming from. That will make it a foreign key in your other entity. Now if you look at your model again, you should notice that the entity that contains the foreign key, is pointing towards the entity with the original primary key, thus explaining the relationship between the two entities and where that foreign key appeared from.



That my friends is a very basic explanation of transforming MCD to MLD in the Merise method. Of course there are a few things I am missing such as capitalizing all of the words in MLD to make it a table (according to one site), and adding a second column to the MLD tables defining each ID as an integer or char, or even defining whether it is not null or null. However, I did not add any of those things to yet as I did not learn today in class. When, I do learn it I will post an updated version as you are following what I learn in school!

Sources:
http://mrproof.blogspot.fr/2010/11/regles-de-transformation-du-mcd-au-mld.html
http://lgl.isnetne.ch/modelisation-2005/chapitre_170/trsf_mcd_mld_prescplt.pdf
http://tellora.fr/tl_files/pdf/Documents/MERISE_Light.pdf



Comments

Post a Comment

Popular Posts