-- ****************************************************************************** | |
-- Copyright (c) 2006 INRIA. | |
-- All rights reserved. This program and the accompanying materials | |
-- are made available under the terms of the Eclipse Public License v2.0 | |
-- which accompanies this distribution, and is available at | |
-- http://www.eclipse.org/legal/epl-v20.html | |
-- | |
-- Contributors: | |
-- INRIA - Initial implementation | |
-- | |
-- ****************************************************************************** | |
-- @name RelationalDBContent | |
-- @version 1.0 | |
-- @domains Relational Databases | |
-- @authors Hugo Bruneliere (Hugo.Bruneliere@univ-nantes.fr | hugo.bruneliere@gmail.com) | |
-- @date 2006/10/31 | |
-- @description This metamodel describes a simple way of representing the content of a relational database by modeling the tuples stored in its different tables. | |
-- @see The "MySQL.km3" metamodel in the "MySQL to KM3" transformation (http://www.eclipse.org/gmt/atl/atlTransformations/) | |
package RelationalDBContent { | |
abstract class NamedElement { | |
attribute name : String; | |
} | |
class DataBase extends NamedElement { | |
attribute SGBDname: String; -- Oracle, MySQL, etc | |
reference tables[*] container : Table oppositeOf database; | |
} | |
class Table extends NamedElement { | |
reference database: DataBase oppositeOf tables; | |
reference tuples[*] ordered container: Tuple oppositeOf owner; | |
} | |
class Tuple { | |
reference owner : Table oppositeOf tuples; | |
reference elements[*] ordered container: TupleElement oppositeOf tuple; | |
} | |
class TupleElement { | |
reference tuple: Tuple oppositeOf elements; | |
attribute value[0-1]: String; | |
} | |
} | |
package PrimitiveTypes { | |
datatype Integer; | |
datatype String; | |
datatype Boolean; | |
datatype Double; | |
} |