Objective: Use Oracle SQL to update an attribute inside an object and delete selected rows from an object table.
Use the object-table concepts from Updating an Object Table and Deleting Rows from an Object Table. In CUSTOMER_OBJ_TABLE, FULL_ADDRESS is an object-valued attribute whose type is ADDRESS_TYPE. That object contains the string attribute STATE. In PRODUCT_OBJ_TABLE, CURRENT_INVENTORY_COUNT is numeric.
For this practice scenario, correct the state code from 'HI' to 'LA' for matching customers, then remove products whose inventory count is exactly 5. These are exercise rules, not general business rules for customer addresses or stock management.
Use the following complete starting datasets to determine the row counts. Only the attributes relevant to this exercise are shown. Assume initialized address objects, sufficient privileges, no concurrent changes, and no triggers or constraints that change or prevent the requested operations.
| CUST_ID | FULL_ADDRESS.STATE |
|---|---|
| 1 | HI |
| 2 | CA |
| 3 | HI |
| 4 | LA |
| PRODUCT_ID | CURRENT_INVENTORY_COUNT |
|---|---|
| 11 | 5 |
| 12 | 8 |
| 13 | 5 |
| 14 | 0 |
| 15 | 5 |
No download is needed to write your answer. Running the statements requires a practice schema containing the object types, tables, and sample data; the tables above are a scenario, not an installation script.
UPDATE statement that sets FULL_ADDRESS.STATE to 'LA' only where its current value is 'HI'. Use a table alias and dot notation.DELETE statement that removes rows from PRODUCT_OBJ_TABLE only where CURRENT_INVENTORY_COUNT = 5. Keep the table itself.Explain how your alias, attribute path, and WHERE clauses select the intended data. If you run the statements, use a disposable practice schema with autocommit disabled, inspect the changes, and roll back the practice transaction.
Use the path cot.full_address.state, where cot is the table alias, full_address is the stored object attribute, and state is an attribute inside it. ADDRESS_TYPE is the type name; it does not replace full_address in this path. Use straight single quotes around state codes and the numeric literal 5 for inventory.
After submitting, compare your work with the model answer. This page does not execute SQL or calculate a score.
Enter both statements, the two row-count answers with IDs, and your explanation. Select Submit to view your response alongside the solution.