Turner Putnam Stamford customer template Hayes Main Harrison A-305 350 account template Johnson Alma Palo Alto Turner Putnam Stamford Round Hill Horseneck 8000000 branch template Perryridge Horseneck 1700000 Downtown Brooklyn 9000000 customer Round Hill Horseneck 8000000 account A-305 350 A-102 400 currency branch pointers A-402 1000 A-101 500 depositor A-408 1123 A-201 900 account-branch run unit Database System Concepts,5th Ed. A.16 @Silberschatz,Korth and Sudarshan
Database System Concepts, 5 A.16 ©Silberschatz, Korth and Sudarshan th Ed
The Find and Get Commands find locates a record in the database and sets the appropriate currency pointers get copies of the record to which the current of run-unit points from the database to the appropriate program work area template Example:Executing a find command to locate the customer record belonging to Johnson causes the following changes to occur in the state of the program work area. The current of the record type customer now points to the record of Johnson. The current of set type depositor now points to the set owned by Johnson The current of run unit now points to customer record Johnson. Database System Concepts,5th Ed. A.17 ©Silberschat乜,Korth and Sudarshan
Database System Concepts, 5 A.17 ©Silberschatz, Korth and Sudarshan th Ed. The Find and Get Commands find locates a record in the database and sets the appropriate currency pointers get copies of the record to which the current of run-unit points from the database to the appropriate program work area template Example: Executing a find command to locate the customer record belonging to Johnson causes the following changes to occur in the state of the program work area. The current of the record type customer now points to the record of Johnson. The current of set type depositor now points to the set owned by Johnson The current of run unit now points to customer record Johnson
Access of Individual Records find any <record type>using <record-field> Locates a record of type <record type>whose <record-field> value is the same as the value of <record-field>in the <record type>template in the program work area. Once such a record is found,the following currency pointers are set to point to that record: The current of run-unit pointer The record-type currency pointer for <record type> For each set in which that record belongs,the appropriate set currency pointer find duplicate <record type>using <record-field> Locates (according to a system-dependent ordering)the next record that matches the <record-field> Database System Concepts,5th Ed. A.18 ©Silberschat乜,Korth and Sudarshan
Database System Concepts, 5 A.18 ©Silberschatz, Korth and Sudarshan th Ed. Access of Individual Records find any <record type> using <record-field> Locates a record of type <record type> whose <record-field> value is the same as the value of <record-field> in the <record type> template in the program work area. Once such a record is found, the following currency pointers are set to point to that record: The current of run-unit pointer The record-type currency pointer for <record type> For each set in which that record belongs, the appropriate set currency pointer find duplicate <record type> using <record-field> Locates (according to a system-dependent ordering) the next record that matches the <record-field>
Access of Records Within a Set Other find commands locate records in the DBTG set that is pointed to by the <set-type>currency pointer. find first <record type>within <set-type> Locates the first database record of type <record type> belonging to the current <set-type>. To locate the other members of a set,k we use find next <record type>within <set-type> which finds the next element in the set <set-type>. find owner within <set-type> Locates the owner of a particular DBTG set Database System Concepts,5th Ed. A.19 ©Silberschat乜,Korth and Sudarshan
Database System Concepts, 5 A.19 ©Silberschatz, Korth and Sudarshan th Ed. Access of Records Within a Set Other find commands locate records in the DBTG set that is pointed to by the <set-type> currency pointer. find first <record type> within <set-type> Locates the first database record of type <record type> belonging to the current <set-type>. To locate the other members of a set,k we use find next <record type> within <set-type> which finds the next element in the set <set-type>. find owner within <set-type> Locates the owner of a particular DBTG set
Predicates For queries in which a field value must be matched with a specified range of values,rather than to only one,we need to: get the appropriate records into memory examine each one separately for a match determine whether each is the;target of our find statement Database System Concepts,5th Ed. A.20 ©Silberschat乜,Korth and Sudarshan
Database System Concepts, 5 A.20 ©Silberschatz, Korth and Sudarshan th Ed. Predicates For queries in which a field value must be matched with a specified range of values, rather than to only one, we need to: get the appropriate records into memory examine each one separately for a match determine whether each is the; target of our find statement