Class Normalization

I have been reading Agile Database Techiniques by Scott Ambler recently. In chapter 5, he talks about Object Normal Form, which obviously derives from classical Data Normal Form. The brief definitions are as follows:
  • First object normal form (1ONF): A class is in 1ONF when specific behavior required by an attribute that is actually a collection of similar attributes is encapsulated within its own class.
  • Second object normal form (2ONF): A class is in 2ONF when it is in 1ONF and when "shared" behavior required by more than one instance of the class is encapsulated within its own class(es).
  • Third object normal form (3ONF): A class is in 3ONF when it is in 2ONF and when it encapsulates only one set of cohensive behaviour.
I feel it's good as a guideline or checklist for class design, although the definitions are bit vague such as word "shared" which makes it a little hard to be applied in practice. It largely depends on the detailed business situation; yet in Data normalization, "dependency" is easier to identify than being "shared".

For further details, examples, and comments >>> (in Chinese)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值