Question
Run the sql file provided, creating a table. Apply DDL and DML commands to transform that existing DB of just one table into a DB
drop table Wine;
create table Wine
(ID NUMBER(6,0) NOT NULL,
wineID NUMBER(4,0),
name NVARCHAR2(30),
vintage NUMBER(4,0),
price NUMBER(6,0),
retailerID NUMBER(4,0),
retailerName NVARCHAR2(30),
PRIMARY KEY (ID));
insert into Wine values(1, 101, 'Grange', 2010, 750, 1001, 'Dan Murphys');
insert into Wine values(2, 102, 'Grange', 2006, 700, 1001, 'Dan Murphys');
insert into Wine values(3, 103, 'Reserve Shiraz', 2013, 10, 1001, 'Dan Murphys');
insert into Wine values(4, 104, 'Grey Label Shiraz', 2012, 35, 1001, 'Dan Murphys');
insert into Wine values(5, 105, 'Patricia Shiraz', 2009, 50, 1001, 'Dan Murphys');
insert into Wine values(6, 106, 'Ten Acres Shiraz', 2012, 25, 1001, 'Dan Murphys');
insert into Wine values(7, 107, 'Double Barrel Shiraz', 2012, 15, 1001, 'Dan Murphys');
insert into Wine values(8, 108, 'Platinum Label Shiraz', 2006, 170, 1001, 'Dan Murphys');
insert into Wine values(9, 103, 'Reserve Shiraz', 2013, 9, 1002, 'Woolworths');
insert into Wine values(10, 104, 'Grey Label Shiraz', 2012, 33, 1002, 'Woolworths');
insert into Wine values(11, 105, 'Patricia Shiraz', 2009, 44, 1002, 'Woolworths');
insert into Wine values(12, 106, 'Ten Acres Shiraz', 2012, 22, 1002, 'Woolworths');
insert into Wine values(13, 107, 'Double Barrel Shiraz', 2012, 12, 1002, 'Woolworths');
insert into Wine values(14, 110, 'Jacks Red', 2016, NULL, NULL, NULL);
insert into Wine values(15, 111, 'Jacks White', 2016, NULL, NULL, NULL);
insert into Wine values(16, NULL, NULL, NULL, NULL, 1003, 'Jills Hill');
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started