计算机工程与科学
計算機工程與科學
계산궤공정여과학
COMPUTER ENGINEERING & SCIENCE
2010年
4期
67-70,78
,共5页
曾一%王健%洪媛%周欣%蔡森虎
曾一%王健%洪媛%週訢%蔡森虎
증일%왕건%홍원%주흔%채삼호
UML类图%关系数据库模型%模型转换%OCL%QVT
UML類圖%關繫數據庫模型%模型轉換%OCL%QVT
UML류도%관계수거고모형%모형전환%OCL%QVT
UML class diagram%relational database model%model transformation%OCL%QVT
UML被MDA用来描述各种模型,成为建模语言事实上的标准.但是,由于UML类图中缺少对关系数据库的实现的约束,使得类图转换到的关系数据库模型不唯一,不能充分体现设计者对数据库的设计意图.这不利于MDA中PIM模型和关系PSM模型的双向转换.为解决以上问题,本文提出一种通过添加构造型和OCL约束来扩展UML类图的方法,以加强类图中数据之间的关系及约束,使PIM模型能够唯一地转换到PSM模型.最后,采用QVT模型转换方法将扩展后的UML类图转换到关系数据库模型,并结合例子给出了UML类图的关联、继承、组合和聚合关系等到关系数据库模型的转换规则和方法.利用本方法可以使UML类图到关系数据库模型的转换结果唯一.
UML被MDA用來描述各種模型,成為建模語言事實上的標準.但是,由于UML類圖中缺少對關繫數據庫的實現的約束,使得類圖轉換到的關繫數據庫模型不唯一,不能充分體現設計者對數據庫的設計意圖.這不利于MDA中PIM模型和關繫PSM模型的雙嚮轉換.為解決以上問題,本文提齣一種通過添加構造型和OCL約束來擴展UML類圖的方法,以加彊類圖中數據之間的關繫及約束,使PIM模型能夠唯一地轉換到PSM模型.最後,採用QVT模型轉換方法將擴展後的UML類圖轉換到關繫數據庫模型,併結閤例子給齣瞭UML類圖的關聯、繼承、組閤和聚閤關繫等到關繫數據庫模型的轉換規則和方法.利用本方法可以使UML類圖到關繫數據庫模型的轉換結果唯一.
UML피MDA용래묘술각충모형,성위건모어언사실상적표준.단시,유우UML류도중결소대관계수거고적실현적약속,사득류도전환도적관계수거고모형불유일,불능충분체현설계자대수거고적설계의도.저불리우MDA중PIM모형화관계PSM모형적쌍향전환.위해결이상문제,본문제출일충통과첨가구조형화OCL약속래확전UML류도적방법,이가강류도중수거지간적관계급약속,사PIM모형능구유일지전환도PSM모형.최후,채용QVT모형전환방법장확전후적UML류도전환도관계수거고모형,병결합례자급출료UML류도적관련、계승、조합화취합관계등도관계수거고모형적전환규칙화방법.이용본방법가이사UML류도도관계수거고모형적전환결과유일.
UML is used to describe a variety of models by MDA .UML is an actual standard for modeling languages. Because of the lack of constraints over the realization of relational database models in UML class diagram design, the outcome of the transformation from the UML class diagrams to the realization of relational database models is not exclusive. It can not sufficiently achieve the designer's intentions on the database and it is inconvenient in double-directional transformation from PIM to relational PSMs in MDA. To solve the problem mentioned above, an approach is proposed to enhance the relationship and the constraints of data in class diagrams which can extend UML by adding stereotypes and OCL constraints to build exclusive relational PSMs from PIM. Finally, a method based on QVT is provided for transferring the extended UML class diagrams to relational database models. In several examples the transformation rules are defined for association, inheritance, aggregation and combination of the UML class diagrams etc. It can get the exclusive outcome of the transformation from the UML class diagrams to the relational database models using this method.