6 Appendix C Other Relational Query Languages Compare the preceding query with our earlier query"Find the names of all customers who have both an account and a loan at the bank."The only difference is the-appearing next to the example row in the borrower skeleton.This difference, however,has a major effect on the processing of the query.QBE finds all x values for which 1.There is a tuple in the depositor relation whose customer name is the domain variable x. 2.There is no tuple in the borrower relation whose customer name is the same as in the domain variable x. The-can be read as"there does not exist." The fact that we placed the-under the relation name,rather than under an attribute name,is important.A-under an attribute name is shorthand for Thus,to find all customers who have at least two accounts,we write depositor customer-name account_number P._x y -y In English,the preceding query reads"Display all customer name values that appear in at least two tuples,with the second tuple having an account number different from the first." C.1.4 The Condition Box At times,it is either inconvenient or impossible to express all the constraints on the domain variables within the skeleton tables.To overcome this difficulty,QBE includes a condition box feature that allows the expression of general constraints over any of the domain variables.QBE allows logical expressions to appear in a condition box.The logical operators are the words and and or,or the symbols “&”and“”. For example,the query"Find the loan numbers of all loans made to Smith,to Jones (or to both jointly)"can be written as borrower customer_name 1oa11_111u171be 卫x conditions n=Smith or_n=Jones It is possible to express the above query without using a condition box,by using P.in multiple rows.However,queries with P.in multiple rows are sometimes hard to understand,and are best avoided.6 Appendix C Other Relational Query Languages Compare the preceding query with our earlier query “Find the names of all customers who have both an account and a loan at the bank.”The only difference is the ¬ appearing next to the example row in the borrower skeleton. This difference, however, has a major effect on the processing of the query. QBE finds all x values for which 1. There is a tuple in the depositor relation whose customer name is the domain variable x. 2. There is no tuple in the borrower relation whose customer name is the same as in the domain variable x. The ¬ can be read as “there does not exist.” The fact that we placed the ¬ under the relation name, rather than under an attribute name, is important. A ¬ under an attribute name is shorthand for =. Thus, to find all customers who have at least two accounts, we write depositor customer_name account_number P. x y x ¬ y In English, the preceding query reads “Display all customer name values that appear in at least two tuples, with the second tuple having an account number different from the first.” C.1.4 The Condition Box At times, it is either inconvenient or impossible to express all the constraints on the domain variables within the skeleton tables. To overcome this difficulty, QBE includes a condition box feature that allows the expression of general constraints over any of the domain variables. QBE allows logical expressions to appear in a condition box. The logical operators are the words and and or, or the symbols “&” and “|”. For example, the query “Find the loan numbers of all loans made to Smith, to Jones (or to both jointly)” can be written as borrower customer_name loan_number n P. x conditions n = Smith or n = Jones It is possible to express the above query without using a condition box, by using P. inmultiple rows. However, queries with P. inmultiple rows are sometimes hard to understand, and are best avoided