Associations considered a bad thing

被引:0
|
作者
Graham, I
Bischof, J
HendersonSellers, B
机构
[1] UNIV NEW S WALES,KENSINGTON,NSW 2033,AUSTRALIA
[2] SWINBURNE UNIV TECHNOL,HAWTHORN,VIC 3122,AUSTRALIA
来源
关键词
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
The concept of associations in object modeling has recently been a subject of some concern. Most object-oriented analysis and design methods represent associations as separate from object types similar to that of Entity-Relationship (ER) modeling. This article shows that this approach compromises the object-oriented principles of encapsulation and reusability. Some other methods insist that associations are object types. However, this can lead to an infinite regress. We suggest that the proper constructs with which to represent associations are uni-directional mappings represented as pointers embedded in the object types that participate in the association. The pointers must be coupled with rules to ensure the minimal semantic integrity required of an association. We also show how the problem of referential integrity maintenance can be handled in the same way: with rules. The mappings and rules refer only to the public interface of the corresponding classes, thus maintaining integrity without violating encapsulation or thwarting reuse. Finally, we discuss how referential integrity is handled in current object-oriented databases and interpret the notion of ''inverses'' within our new framework. These conclusions have implications for both database design and for the design of object-oriented CASE tools.
引用
收藏
页码:41 / 48
页数:8
相关论文
共 50 条