1

My question might sound very stupid. But, can anyone please tell me what exactly a metamodel is. I know the technical definition and I have read a lot of papers on metamodels, but I dont seem to get the hang of it.

Suppose I have two classes like this:

class A{
    int m_a;
public:
    A(int a);
    void foo();
}; 

class B{
    int m_b;
public:
    B(int b);
    void bar();
}; 

Can anyone please tell me what information my metamodel will contain.

Thanks a lot

SomeWittyUsername
  • 18,025
  • 3
  • 42
  • 85
sjaymj62
  • 386
  • 2
  • 18

2 Answers2

1

A metamodel describes the model you are using.

Normally you would look at your example and see that there are two entities here : [A] and [B]. There is no relationship between them so you wouldn't draw a line. You could also describe its methods and parameters.

A Meta-model would look at the elements which make up your model. And in this case you could list these things : [class], [method], [constructor], [field]. You could draw a line between class and method (1-to-many), as a class can have many methods (in general). You could also do the same to constructor and to field.

Have a look on google for the UML Metamodel - it describes the relationship between all these things like classes/types/methods/behaviour etc. It can get pretty deep pretty quickly, so have fun diving :)

Oliver Watkins
  • 12,575
  • 33
  • 119
  • 225
0

UML metamodel to UML model is like

1 the T-SQL database tables (hidden inside the master database) that contain the data about T-SQL tables to the instances of the T-SQL tables

It is the place where answers to How do I get list of all tables in a database using TSQL? come from

(Same concept can be observed in Oracle, FireBird, MySQL and other database engines)

2 Or it is like the hidden metadata stuff that enables you to use MSDN - Reflection (C# and Visual Basic)

Community
  • 1
  • 1
xmojmr
  • 8,073
  • 5
  • 31
  • 54