Part 2

Desgin a common model to suit the three kinds of data-object pattern that have been used very popular.

    In the last part, we have talked about the three kinds of data-object pattern, this part we will talk about how to desgin a common model to suit it.
    In general, A relationl database's table consist with fields,primary key,foreign key,index,regular rule,etc.., the fileds is often necessary, the others are often unnecessary. if we want to use two or more tables describing an entity, the tables should joint with the foreign key, each table should has a primary key.  
    Here I gave a Order entity sample to explain that how to convert tables to data-object pattern, as you can see, the OrderList,OrderItemsList are describing an entity, and each table are describing the part functionality of the ORDER entity, If we draw a figure to explain
       

posted @ 2005-01-05 10:47  23热爱,自学业余码农。  阅读(294)  评论(0)    收藏  举报