Name of subject: Database Programming     Display the name of supplier(s) that supplied more expensive computer than that being supplied by IBM Note: Use Subqueries

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Name of subject: Database Programming

    Display the name of supplier(s) that supplied more expensive computer than that being supplied by IBM

Note: Use Subqueries

DROP TABLE computer CASCADE CONSTRAINTS,
DROP TABLE location CASCADE CONSTRAINTS;
DROP TABLE supplier CASCADE CONSTRAINTS:
CREATE TABLE supplier
(SuppID NUMBER (3),
SName VARCHAR2 (15),
SAddress VARCHAR2 120),
SPhone VARCHAR2 (12),
CONSTRAINT supplier_suppID_PK PRIMARY KEY (suppIDI);
CREATE TABLE location
(LocID NUMBER (3),
Bldg_code CHAR (4),
RoonNo NUMNBER (3),
CONSTRAINT location locid PK PRIMARY KEY (LOCID) I:
CREATE TABLE computer
(CompID NUMBER (5),
SNumber VARCHAR2 (15),
Make VARCHAR2 (20),
SuppID NUMBER (3),
LocID NUMBER (3),
Value NUMBER (6,2),
Date purchased DATE,
CONSTRAINT computer_compID_PK PRIMARY KEY (CompID),
CONSTRAINT computer_suppID_FK FOREIGN KEY (suppID) REFERENCES
supplier,
CONSTRAINT computer 10CID FK FOREIGN KEY (10CID) REFERENCES location) :
INSERT INTO supplier VALUES (122, 'Compag Sdn. Bhd', '10 Jalan Duta',
'03-989898');
INSERT INTO supplier VALUES (123, 'ASUS Sdn. Bhd', '12 Jalan Duta',
'03-2323231;
INSERT INTO supplier VALUES (124, 'IBM Sdn.Bhd', '15 Jalan Duta', '03-
565656'):
INSERT INTO supplier VALUES (125, 'Apple Sdn.Bhd', '18 Jalan Duta',
'03-785676')
INSERT INTO location VALUES (222, 'LAN', 343):
INSERT INTO location VALUES (333, 'IRK', 343)
INSERT INTO location VALUES (444, 'ICT', 343)
INSERT INTO computer VALUES (13321, "XDX12345', "Compaq', 122, 222,
2300.50, 70 DATE ('12-JAN-2008', 'DD-MON-YYYY')):
INSERT INTO computer VALUES (13322, 'XDX12344', 'ASUS PC', 123, 222,
3000.80, TO DATE ('17-JAN-2008', 'DD-MON-YYYY')):
INSERT INTO Computer VALUES (13323, "XDX12343', 'IBM', 124, 333,
2800.50, TO_DATE ('12-DEC-2008', 'DD-MON-YYYY'));
INSERT INTO computer VALUES (13324, "XDX12342', 'Apple', 125, 444,
5300.50, TO_DATE ('12-JUN-2009', 'DD-MON-YYYY')) :
INSERT INTO computer VALUES (13325, "XDX12341', 'Apple', 125, 444,
6300.50, T0 DATE ('12-JUN-2009', 'DD-MON-YYYY')):
INSERT INTO computer VALUES (13326, "XDX12346', 'Apple', 125, 444,
6000.85, 70 DATE ('12-JUN-2009', 'DD-MON-YYYY')):
COMMITI
Transcribed Image Text:DROP TABLE computer CASCADE CONSTRAINTS, DROP TABLE location CASCADE CONSTRAINTS; DROP TABLE supplier CASCADE CONSTRAINTS: CREATE TABLE supplier (SuppID NUMBER (3), SName VARCHAR2 (15), SAddress VARCHAR2 120), SPhone VARCHAR2 (12), CONSTRAINT supplier_suppID_PK PRIMARY KEY (suppIDI); CREATE TABLE location (LocID NUMBER (3), Bldg_code CHAR (4), RoonNo NUMNBER (3), CONSTRAINT location locid PK PRIMARY KEY (LOCID) I: CREATE TABLE computer (CompID NUMBER (5), SNumber VARCHAR2 (15), Make VARCHAR2 (20), SuppID NUMBER (3), LocID NUMBER (3), Value NUMBER (6,2), Date purchased DATE, CONSTRAINT computer_compID_PK PRIMARY KEY (CompID), CONSTRAINT computer_suppID_FK FOREIGN KEY (suppID) REFERENCES supplier, CONSTRAINT computer 10CID FK FOREIGN KEY (10CID) REFERENCES location) : INSERT INTO supplier VALUES (122, 'Compag Sdn. Bhd', '10 Jalan Duta', '03-989898'); INSERT INTO supplier VALUES (123, 'ASUS Sdn. Bhd', '12 Jalan Duta', '03-2323231; INSERT INTO supplier VALUES (124, 'IBM Sdn.Bhd', '15 Jalan Duta', '03- 565656'): INSERT INTO supplier VALUES (125, 'Apple Sdn.Bhd', '18 Jalan Duta', '03-785676') INSERT INTO location VALUES (222, 'LAN', 343): INSERT INTO location VALUES (333, 'IRK', 343) INSERT INTO location VALUES (444, 'ICT', 343) INSERT INTO computer VALUES (13321, "XDX12345', "Compaq', 122, 222, 2300.50, 70 DATE ('12-JAN-2008', 'DD-MON-YYYY')): INSERT INTO computer VALUES (13322, 'XDX12344', 'ASUS PC', 123, 222, 3000.80, TO DATE ('17-JAN-2008', 'DD-MON-YYYY')): INSERT INTO Computer VALUES (13323, "XDX12343', 'IBM', 124, 333, 2800.50, TO_DATE ('12-DEC-2008', 'DD-MON-YYYY')); INSERT INTO computer VALUES (13324, "XDX12342', 'Apple', 125, 444, 5300.50, TO_DATE ('12-JUN-2009', 'DD-MON-YYYY')) : INSERT INTO computer VALUES (13325, "XDX12341', 'Apple', 125, 444, 6300.50, T0 DATE ('12-JUN-2009', 'DD-MON-YYYY')): INSERT INTO computer VALUES (13326, "XDX12346', 'Apple', 125, 444, 6000.85, 70 DATE ('12-JUN-2009', 'DD-MON-YYYY')): COMMITI
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY