正在加载图片...
D.3 The DBTG CODASYL Model 7 A-102400 A-101500 A-201900 A-305350 Hayes Main Harrison Perryridge Horseneck 1700000 Lindsay Park Pittsfield Downtown Brooklyn 9000000 Turner Putnam Stamford 4 Round Hill Horseneck 8000000 Figure D.9 Sample database corresponding to diagram of Figure D.8b. D.3 The DBTG CODASYL Model The first database-standard specification,called the CODASYL DBTG 1971 report, was written in the late 1960s by the Database Task Group.Since then,a number of changes have been proposed many of which are reflected in our discussion concerning the DBTG model. D.3.1 Link Restriction In the DBTG model,only many-to-one links can be used.Many-to-many links are disallowed to simplify the implementation.We represent one-to-one links using a many-to-one link.These restrictions imply that the various algorithms of Section D.2 for transforming an E-R diagram to a data-structure diagram must be revised. Consider a binary relationship that is either one to many or one to one.In this case,the transformation algorithm defined in Section D.2.1 can be applied directly.Thus,for our customer-account database,if the depositor relationship is one to many with no descriptive attributes,then the appropriate data-structure diagram is as shown in Figure D.10a.If the relationship has a descriptive attribute (for example,access-date),then the appropriate data-structure diagram is as shown in Figure D.10b. If the depositor relationship,however,is many to many,then our transforma- tion algorithm must be refined;if the relationship has no descriptive attributes (Figure D.11a),then this algorithm must be employed: 1.Replace the entity sets customer and account with record types customer and account,respectively. 2.Create a new dummy record type,Rlink,that may either have no fields or have a single field containing an externally defined unique identifier. 3.Create the following two many-to-one links:D.3 The DBTG CODASYL Model 7 Figure D.9 Sample database corresponding to diagram of Figure D.8b. D.3 The DBTG CODASYL Model The first database-standard specification, called the CODASYL DBTG 1971 report, was written in the late 1960s by the Database Task Group. Since then, a number of changes have been proposed many of which are reflected in our discussion concerning the DBTG model. D.3.1 Link Restriction In the DBTG model, only many-to-one links can be used. Many-to-many links are disallowed to simplify the implementation. We represent one-to-one links using a many-to-one link. These restrictions imply that the various algorithms of Section D.2 for transforming an E-R diagram to a data-structure diagram must be revised. Consider a binary relationship that is either one to many or one to one. In this case, the transformation algorithm defined in Section D.2.1 can be applied directly. Thus, for our customer-account database, if the depositor relationship is one to many with no descriptive attributes, then the appropriate data-structure diagram is as shown in Figure D.10a. If the relationship has a descriptive attribute (for example, access-date), then the appropriate data-structure diagram is as shown in Figure D.10b. If the depositor relationship, however, is many to many, then our transforma￾tion algorithm must be refined; if the relationship has no descriptive attributes (Figure D.11a), then this algorithm must be employed: 1. Replace the entity sets customer and account with record types customer and account, respectively. 2. Create a new dummy record type, Rlink, that may either have no fields or have a single field containing an externally defined unique identifier. 3. Create the following two many-to-one links:
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有