Skip to content

CS405 - Database Programming using Oracle 11g

5 Topics 12 Posts
  • 0 Votes
    2 Posts
    171 Views
    zaasmiZ

    Please share idea

  • 0 Votes
    2 Posts
    384 Views
    zareenZ

    100% Solved:
    Q.1 Solution

    SELECT NAME FROM SALESRESP WHERE QUOTA >= (SELECT TARGET FROM OFFICES WHERE CITY = 'LAHORE')

    Q.2 Solution

    DECLARE eno salesresp.empl_num%type; commission salesresp.commision%type; update_commision number(10):=0; BEGIN Select empl_num, commision from SALESRESP where months_between(sysdate, joining_date) < 24 AND sal > 50000; update_commision:=commission-commision*0.01; update salesresp set commission = update_commision; dbms_output.put_line('Updated Commision ' || commision); END;
  • 0 Votes
    1 Posts
    109 Views
    No one has replied
  • 0 Votes
    6 Posts
    1k Views
    zareenZ

    @zareen said in CS405 Assignment 1 Solution and Discussion:

    e3e13fed-5997-4fb9-8c4e-eb15cf0493a5-image.png

    Create an ERD for a car dealership. The dealership sells both new and used cars, and it operates a service facility (see Figure B.2). Base your design on the following business rules:

    A salesperson may sell many cars, but each car is sold by only one salesperson. A customer may buy many cars, but each car is bought by only one customer. A salesperson writes a single invoice for each car he or she sells. A customer gets an invoice for each car he or she buys. A customer may come in just to have his or her car serviced; that is, a customer need not buy a car to be classified as a customer. When a customer takes one or more cars in for repair or service, one service ticket is written for each car. The car dealership maintains a service history for each of the cars serviced. The service records are referenced by the car’s serial number. A car brought in for service can be worked on by many mechanics, and each mechanic may work on many cars. A car that is serviced may or may not need parts (e.g., adjusting a carburetor or cleaning a fuel injector nozzle does not require providing new parts).

    ERD Answer

  • 0 Votes
    1 Posts
    103 Views
    No one has replied