正在加载图片...
E.2 Tree-Structure Diagrams 11 branch customer account branch name c0o211 customer_name branch city account number depositor branch customer street branch_assets balance customer_city (a)E-R diagram branch branch_name branch_city assets customername customer_sfreet customer_city account_number balance account (b)Transformation of E-R diagram Figure E.14 E-R diagram and its transformation. diagrams as necessary.We can extend this approach,in turn,to deal with a general relationship that has descriptive attributes.We need only to create a new record type with one field for each descriptive attribute,and then to insert that record type in the appropriate location in the tree-structure diagram. E.2.2 Several Relationships The scheme that we have described to transform an E-R diagram to a tree-structure diagram ensures that,for each single relationship,the transformation will result in diagrams that are of the form of rooted trees.Unfortunately,application of such a transformation individually to each relationship in an E-R diagram does not necessarily result in diagrams that are rooted trees. Next,we shall discuss means for resolving the problem.The technique is to split the diagrams in question into several diagrams,each of which is a rooted tree. We present here two examples to illustrate the overall strategy that you can apply to deal with such transformations.(The large number of different possibilities would make it cumbersome to present a general transformation algorithm.) Consider the E-R diagram of Figure E.14a.By applying the transformation algorithm in Section E.2.1 separately to the relationships account-branch and de- positor,we obtain the diagram of Figure E.14b.This diagram is not a rooted tree, branch_name branch_city assets customer name customer street customer_city branch c1 istome时 account_number balance account_number balance account account Figure E.15 Tree-structure diagram corresponding to Figure E.14a.E.2 Tree-Structure Diagrams 11 Figure E.14 E-R diagram and its transformation. diagrams as necessary. We can extend this approach, in turn, to deal with a general relationship that has descriptive attributes. We need only to create a new record type with one field for each descriptive attribute, and then to insert that record type in the appropriate location in the tree-structure diagram. E.2.2 Several Relationships The scheme that we have described to transform an E-R diagram to a tree-structure diagram ensures that, for each single relationship, the transformation will result in diagrams that are of the form of rooted trees. Unfortunately, application of such a transformation individually to each relationship in an E-R diagram does not necessarily result in diagrams that are rooted trees. Next, we shall discuss means for resolving the problem. The technique is to split the diagrams in question into several diagrams, each of which is a rooted tree. We present here two examples to illustrate the overall strategy that you can apply to deal with such transformations. (The large number of different possibilities would make it cumbersome to present a general transformation algorithm.) Consider the E-R diagram of Figure E.14a. By applying the transformation algorithm in Section E.2.1 separately to the relationships account-branch and de￾positor, we obtain the diagram of Figure E.14b. This diagram is not a rooted tree, Figure E.15 Tree-structure diagram corresponding to Figure E.14a
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有