D.2 Data-Structure Diagrams 3 customer name customer_street customer city account number balance customer (a) account customer_name customer_street customer city account number balance custoner (b) account Figure D.3 Two data-structure diagrams. customer-name,customer-street,and customer-city-as defined in Section D.1.Simi- larly,account is the record type corresponding to the entity set account.It includes the two fields account number and balance.Finally,the relationship depositor has been replaced with the link depositor. The relationship depositor is many to many.If the relationship depositor were one to many from customer to account,then the link depositor would have an arrow pointing to customer record type(Figure D.3a).Similarly,if the relationship deposi- tor were one to one,then the link depositor would have two arrows:one pointing to account record type and one pointing to customer record type(Figure D.3b).Since, in the E-R diagram of Figure D.2a,the depositor relationship is many to many,we draw no arrows on the link depositor in Figure D.2b. A database corresponding to the described schema may thus contain a num- ber of customer records linked to a number of account records.A sample database corresponding to the data-structure diagram of Figure D.2 appears in Figure D.4. Since the relationship is many to many,we show that Johnson has accounts A-101 and A-201 and that account A-201 is owned by both Johnson and Smith.A sample database corresponding to the data-structure diagram of Figure D.3a is depicted in Figure D.1.Since the relationship is one to many from customer to account,a customer may have more than one account,as Johnson does-she owns both A-101 and A-201.An account,however,cannot belong to more than one customer, and the database observes this restriction.Finally,a sample database correspond- ing to the data-structure diagram of Figure D.3b is shown in Figure D.5.Since the relationship is one to one,an account can be owned by precisely one customer, and a customer can have only one account;the sample database follows those rules. Hayes Main Harrison A-102400 A-101 500 Johnson Alma Palo Alto A-201 900 Turner Putnam Stamford A-305350 Figure D.4 Sample database corresponding to diagram of Figure D.2b.D.2 Data-Structure Diagrams 3 Figure D.3 Two data-structure diagrams. customer-name, customer street, and customer city—as defined in Section D.1. Similarly, account is the record type corresponding to the entity set account. It includes the two fields account number and balance. Finally, the relationship depositor has been replaced with the link depositor. The relationship depositor is many to many. If the relationship depositor were one to many from customer to account, then the link depositor would have an arrow pointing to customerrecord type (Figure D.3a). Similarly, if the relationship depositor were one to one, then the link depositor would have two arrows: one pointing to account record type and one pointing to customer record type (Figure D.3b). Since, in the E-R diagram of Figure D.2a, the depositor relationship is many to many, we draw no arrows on the link depositor in Figure D.2b. A database corresponding to the described schema may thus contain a number of customer records linked to a number of account records. A sample database corresponding to the data-structure diagram of Figure D.2 appears in Figure D.4. Since the relationship is many to many, we show that Johnson has accounts A-101 and A-201 and that account A-201 is owned by both Johnson and Smith. A sample database corresponding to the data-structure diagram of Figure D.3a is depicted in Figure D.1. Since the relationship is one to many from customer to account, a customer may have more than one account, as Johnson does—she owns both A-101 and A-201. An account, however, cannot belong to more than one customer, and the database observes this restriction. Finally, a sample database corresponding to the data-structure diagram of Figure D.3b is shown in Figure D.5. Since the relationship is one to one, an account can be owned by precisely one customer, and a customer can have only one account; the sample database follows those rules. Figure D.4 Sample database corresponding to diagram of Figure D.2b