文章研究了类图映射成关系数据库中的表的策略,首先使用Rational Rose 7。0建立类图数据模型,通过给类设置不同的可见性,并在类图中使用类与类之间的各种关系,然后再探讨了类图映射成关系表的规律。实践的结果表明,将类图映射成关系数据库中的表取决于两个因素,即类的可见性和类与类之间的关系,并发现Rational Rose 7。0软件没有考虑到当属性可见性不同时映射成表中对应的属性也应该是不同的。
Research on Strategy for Mapping Class Diagram to Relational Table
In this paper,the strategy of mapping class diagram to table in relational database is studied.Firstly,the data model of class diagram is established by using Rational Rose 7.0.By setting different visibility for classes and using various relationships between classes in class diagram,then the rule of mapping class diagram to relational table is discussed.The result of practice shows that the mapping of class diagram into tables in relational database depends on two factors,namely,the visibility of classes and the relationship between classes.And it is found that Rational Rose 7.0 software does not take into account that when the visibility of the attribute is different,the corresponding attribute in the mapping table should also be different.