1 21:22:23 2 3 CUSTOMER CUST ID C120 C117 C118 C121 C115 C116 C119 C122 REPAIRS REPAIR_ID CLUB_REPAIRS 103 104 105 101 1
-
- Site Admin
- Posts: 899565
- Joined: Mon Aug 02, 2021 8:13 am
1 21:22:23 2 3 CUSTOMER CUST ID C120 C117 C118 C121 C115 C116 C119 C122 REPAIRS REPAIR_ID CLUB_REPAIRS 103 104 105 101 1
Instructions Create a database in Oracle named ADDB7311Exam_Student Number and execute the preloaded SQL code using either SQL DeveloperTM or SQL*PlusTM to create the database schema. Copy and paste your queries into a MS Word document. Save this file as "Advanced_Databases_Exam_Student_Number". Write the path and filename of this document on your exam paper. PRELOADS: ADDB7311 Ea_Preload.sql The following set of relations has been set up for a local golf club repair store specialising in the repairing of all types of golf clubs. At present, the database is small and only includes information about clubs, customers, repairs and club repairs. The relationships between the tables must be derived from the data in each of the tables. The tables and the information required are as follows: CLUBS(club_id, club_type, club_model, manufacturer) CUSTOMER(cust_id, cust_fname, cust_sname, cust_address, cust_contact) REPAIRS(repair_id, repair_work, repair_date, repair_hrs) CLUB_REPAIRS(club_repair_num, club_repair_date, club_repair_amt, club_id, cust_id, repair_id) Sample Data is shown below: CLUBS CLUB_ID 12345 54321 78945 98754 55311 CLUB_TYPE Putter Driver Iron Wedge Recovery CLUB_MODEL K100 J55 H9000 A450 L920 MANUFACTURER Taylor Made Ping King Kobra Nike Callaway
21; 22; 23 Question 2 Complete the following: 1. 2. 3. Create a PL/SQL query that will display the customer id, repair work done and the repair amount. In your query, only display the results where the repair amount is greater than R50. Sample Results Identify the type of cursor used and provide two reasons for its suitability in this query. Provide this information as a comment at the end of your code. Provide screenshot of query output. C119, REPAIR WORK: Shaft Replacing REPAIR AMOUNT: R75 CUSTOMER ID: CUSTOMER ID: 2022 C121, Club Head Repair (Marks: 20) REPAIR WORK: REPAIR AMOUNT: R75