/********************************************************************************/
/*																				*/
/*	Kroenke, Auer, Vandenberg, Yoder - DBC (8th Edition) Chapter 08				*/
/*																				*/
/*  JRJ-DW Database Data														*/
/*																				*/
/*	These are the Microsoft SQL Server 2016 SQL code solutions					*/
/*																				*/
/********************************************************************************/

/*****   TIMELINE   *************************************************************/
-- use DATEVALUE("05-MAY-2017") etc to get TimeID values

INSERT INTO TIMELINE VALUES(
	42860, '05-May-17',	5, 'May', 2, 'Qtr2', 2017);
INSERT INTO TIMELINE VALUES(
	42862, '07-May-17',	5, 'May', 2, 'Qtr2', 2017);
INSERT INTO TIMELINE VALUES(
	42866, '11-May-17',	5, 'May', 2, 'Qtr2', 2017);
INSERT INTO TIMELINE VALUES(
	42870, '15-May-17',	5, 'May', 2, 'Qtr2', 2017);
INSERT INTO TIMELINE VALUES(
	42871, '16-May-17',	5, 'May', 2, 'Qtr2', 2017);
INSERT INTO TIMELINE VALUES(
	42880, '25-May-17',	5, 'May', 2, 'Qtr2', 2017);
INSERT INTO TIMELINE VALUES(
	42892, '06-Jun-17',	5, 'Jun', 2, 'Qtr2', 2017);
INSERT INTO TIMELINE VALUES(
	42893, '07-Jun-17',	5, 'Jun', 2, 'Qtr2', 2017);

/*****   ITEM DATA   ************************************************************/

INSERT INTO ITEM VALUES(1,'Bracelet', 'Gold');
INSERT INTO ITEM VALUES(2, 'Necklace', 'Gold');
INSERT INTO ITEM VALUES(3, 'Earrings', 'Bead');
INSERT INTO ITEM VALUES(4, 'Bracelet', 'Gold');
INSERT INTO ITEM VALUES(5, 'Necklace', 'Silver');
INSERT INTO ITEM VALUES(6, 'Earrings', 'Bead');
INSERT INTO ITEM VALUES(7, 'Earrings', 'Bead');
INSERT INTO ITEM VALUES(8, 'Earrings', 'Gold');
INSERT INTO ITEM VALUES(9, 'Necklace', 'Gold');
INSERT INTO ITEM VALUES(10, 'Earrings', 'Bead');
INSERT INTO ITEM VALUES(11, 'Earrings', 'Bead');
INSERT INTO ITEM VALUES(12, 'Earrings', 'Bead');
INSERT INTO ITEM VALUES(13, 'Necklace', 'Gold');
INSERT INTO ITEM VALUES(14, 'Earrings', 'Silver');
INSERT INTO ITEM VALUES(15, 'Bracelet', 'Gold');
INSERT INTO ITEM VALUES(16, 'Earrings', 'Bead');
INSERT INTO ITEM VALUES(17, 'Earrings', 'Bead');
INSERT INTO ITEM VALUES(18, 'Bracelet', 'Gold');
INSERT INTO ITEM VALUES(19, 'Necklace', 'Silver');


/*****   ARTIST DATA   ************************************************************/

INSERT INTO ARTIST VALUES(1, 'Mary Josephson');
INSERT INTO ARTIST VALUES(2, 'Samantha Baker');
INSERT INTO ARTIST VALUES(3, 'Sam Baxter');
INSERT INTO ARTIST VALUES(4, 'John Lintz');

/*****   PURCHASE_ITEM DATA   ***************************************************/
-- use DATEVALUE("05-MAY-2017") etc to get TimeID values


INSERT INTO PURCHASE_PRICE VALUES(42860, 1, 1, 155.00);
INSERT INTO PURCHASE_PRICE VALUES(42862, 2, 2, 203.00);
INSERT INTO PURCHASE_PRICE VALUES(42866, 3, 1, 75.00);
INSERT INTO PURCHASE_PRICE VALUES(42870, 6, 1, 35.00);
INSERT INTO PURCHASE_PRICE VALUES(42870, 7, 1, 32.00);
INSERT INTO PURCHASE_PRICE VALUES(42870, 4, 2, 240.00);
INSERT INTO PURCHASE_PRICE VALUES(42870, 8, 4, 90.00);
INSERT INTO PURCHASE_PRICE VALUES(42871, 10, 1, 25.00);
INSERT INTO PURCHASE_PRICE VALUES(42880, 11, 1, 45.00);
INSERT INTO PURCHASE_PRICE VALUES(42892, 5, 3, 175.00);
INSERT INTO PURCHASE_PRICE VALUES(42892, 9, 4, 215.00);
INSERT INTO PURCHASE_PRICE VALUES(42892, 12, 1, 55.00);
INSERT INTO PURCHASE_PRICE VALUES(42893, 14, 4, 72.00);

/*********************************************************************************/

