• Home

DATA BASE DESIGN project

Project

Can be any business other than a bicycle shop (sales/repair)

1 Person 20 Tables

2 People 38 Tables

3 People 56 Tables

4 People 74 Tables

(Average 5 Columns per table)

Should be normalized to 3rd Normal Form

1 (per person) instance where 1st, 2nd, or 3rd normal form is violated, give a detailed explanation as to why you designed this violation (you can have more than one, but it must be explained)

Create Select/Insert/Update/Delete statements for each table (other than  many-to-many tables)

Create at least 12 business rules, 10 should be built into the design (Per person)

Naming convention – explain the naming convention you used.

Data Dictionary

10 rows of dummy data in each table (where possible)

DDL Scripts for each table, PK, and FK

Using 
https://app.diagrams.net/
 create the ERD using Crow’s Foot Notation (No other Notation will be accepted)

If you are working as a team, make sure it is obvious who created which pieces. Color code the ERD, showing who did what.

One person should submit the project for the team.

DATA BASE DESIGN project

/* */
/* InstPubs.SQL – Creates the Pubs database */
/* */
/*
** Copyright Microsoft, Inc. 1994 – 2000
** All Rights Reserved.
*/

SET NOCOUNT ON
GO

set nocount on
set dateformat mdy

USE master

declare @dttm varchar(55)
select @dttm=convert(varchar,getdate(),113)
raiserror(‘Beginning InstPubs.SQL at %s ….’,1,1,@dttm) with nowait

GO

if exists (select * from sysdatabases where name=’pubs’)
begin
raiserror(‘Dropping existing pubs database ….’,0,1)
DROP database pubs
end
GO

CHECKPOINT
go

raiserror(‘Creating pubs database….’,0,1)
go
/*
Use default size with autogrow
*/

CREATE DATABASE pubs
GO

CHECKPOINT

GO

USE pubs

GO

if db_name() <> ‘pubs’
raiserror(‘Error in InstPubs.SQL, ”USE pubs” failed! Killing the SPID now.’
,22,127) with log

GO

if CAST(SERVERPROPERTY(‘ProductMajorVersion’) AS INT)<12
BEGIN
exec sp_dboption ‘pubs’,’trunc. log on chkpt.’,’true’
exec sp_dboption ‘pubs’,’select into/bulkcopy’,’true’
END
ELSE ALTER DATABASE [pubs] SET RECOVERY SIMPLE WITH NO_WAIT
GO

execute sp_addtype id ,’varchar(11)’ ,’NOT NULL’
execute sp_addtype tid ,’varchar(6)’ ,’NOT NULL’
execute sp_addtype empid ,’char(9)’ ,’NOT NULL’

raiserror(‘Now at the create table section ….’,0,1)

GO

CREATE TABLE authors
(
au_id id

CHECK (au_id like ‘[0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]’)

CONSTRAINT UPKCL_auidind PRIMARY KEY CLUSTERED,

au_lname varchar(40) NOT NULL,
au_fname varchar(20) NOT NULL,

phone char(12) NOT NULL

DEFAULT (‘UNKNOWN’),

address varchar(40) NULL,
city varchar(20) NULL,
state char(2) NULL,

zip char(5) NULL

CHECK (zip like ‘[0-9][0-9][0-9][0-9][0-9]’),

contract bit NOT NULL
)

GO

CREATE TABLE publishers
(
pub_id char(4) NOT NULL

CONSTRAINT UPKCL_pubind PRIMARY KEY CLUSTERED

CHECK (pub_id in (‘1389’, ‘0736’, ‘0877’, ‘1622’, ‘1756’)
OR pub_id like ’99[0-9][0-9]’),

pub_name varchar(40) NULL,
city varchar(20) NULL,
state char(2) NULL,

country varchar(30) NULL

DEFAULT(‘USA’)
)

GO

CREATE TABLE titles
(
title_id tid

CONSTRAINT UPKCL_titleidind PRIMARY KEY CLUSTERED,

title varchar(80) NOT NULL,

type char(12) NOT NULL

DEFAULT (‘UNDECIDED’),

pub_id char(4) NULL

REFERENCES publishers(pub_id),

price money NULL,
advance money NULL,
royalty int NULL,
ytd_sales int NULL,
notes varchar(200) NULL,

pubdate datetime NOT NULL

DEFAULT (getdate())
)

GO

CREATE TABLE titleauthor
(
au_id id

REFERENCES authors(au_id),

title_id tid

REFERENCES titles(title_id),

au_ord tinyint NULL,
royaltyper int NULL,

CONSTRAINT UPKCL_taind PRIMARY KEY CLUSTERED(au_id, title_id)
)

GO

CREATE TABLE stores
(
stor_id char(4) NOT NULL

CONSTRAINT UPK_storeid PRIMARY KEY CLUSTERED,

stor_name varchar(40) NULL,
stor_address varchar(40) NULL,
city varchar(20) NULL,
state char(2) NULL,
zip char(5) NULL
)

GO

CREATE TABLE sales
(
stor_id char(4) NOT NULL

REFERENCES stores(stor_id),

ord_num varchar(20) NOT NULL,
ord_date datetime NOT NULL,
qty smallint NOT NULL,
payterms varchar(12) NOT NULL,

title_id tid

REFERENCES titles(title_id),

CONSTRAINT UPKCL_sales PRIMARY KEY CLUSTERED (stor_id, ord_num, title_id)
)

GO

CREATE TABLE roysched
(
title_id tid

REFERENCES titles(title_id),

lorange int NULL,
hirange int NULL,
royalty int NULL
)

GO

CREATE TABLE discounts
(
discounttype varchar(40) NOT NULL,

stor_id char(4) NULL

REFERENCES stores(stor_id),

lowqty smallint NULL,
highqty smallint NULL,
discount dec(4,2) NOT NULL
)

GO

CREATE TABLE jobs
(
job_id smallint IDENTITY(1,1)

PRIMARY KEY CLUSTERED,

job_desc varchar(50) NOT NULL

DEFAULT ‘New Position – title not formalized yet’,

min_lvl tinyint NOT NULL

CHECK (min_lvl >= 10),

max_lvl tinyint NOT NULL

CHECK (max_lvl <= 250)
)

GO

CREATE TABLE pub_info
(
pub_id char(4) NOT NULL

REFERENCES publishers(pub_id)

CONSTRAINT UPKCL_pubinfo PRIMARY KEY CLUSTERED,

logo image NULL,
pr_info text NULL
)

GO

CREATE TABLE employee
(
emp_id empid

CONSTRAINT PK_emp_id PRIMARY KEY NONCLUSTERED

CONSTRAINT CK_emp_id CHECK (emp_id LIKE
‘[A-Z][A-Z][A-Z][1-9][0-9][0-9][0-9][0-9][FM]’ or
emp_id LIKE ‘[A-Z]-[A-Z][1-9][0-9][0-9][0-9][0-9][FM]’),

fname varchar(20) NOT NULL,
minit char(1) NULL,
lname varchar(30) NOT NULL,

job_id smallint NOT NULL

DEFAULT 1

REFERENCES jobs(job_id),

job_lvl tinyint

DEFAULT 10,

pub_id char(4) NOT NULL

DEFAULT (‘9952’)

REFERENCES publishers(pub_id),

hire_date datetime NOT NULL

DEFAULT (getdate())
)

GO

raiserror(‘Now at the create trigger section …’,0,1)

GO

CREATE TRIGGER employee_insupd
ON employee
FOR insert, UPDATE
AS
–Get the range of level for this job type from the jobs table.
declare @min_lvl tinyint,
@max_lvl tinyint,
@emp_lvl tinyint,
@job_id smallint
select @min_lvl = min_lvl,
@max_lvl = max_lvl,
@emp_lvl = i.job_lvl,
@job_id = i.job_id
from employee e, jobs j, inserted i
where e.emp_id = i.emp_id AND i.job_id = j.job_id
IF (@job_id = 1) and (@emp_lvl <> 10)
begin
raiserror (‘Job id 1 expects the default level of 10.’,16,1)
ROLLBACK TRANSACTION
end
ELSE
IF NOT (@emp_lvl BETWEEN @min_lvl AND @max_lvl)
begin
raiserror (‘The level for job_id:%d should be between %d and %d.’,
16, 1, @job_id, @min_lvl, @max_lvl)
ROLLBACK TRANSACTION
end

GO

raiserror(‘Now at the inserts to authors ….’,0,1)

GO

insert authors
values(‘409-56-7008’, ‘Bennet’, ‘Abraham’, ‘415 658-9932’,
‘6223 Bateman St.’, ‘Berkeley’, ‘CA’, ‘94705’, 1)
insert authors
values(‘213-46-8915’, ‘Green’, ‘Marjorie’, ‘415 986-7020’,
‘309 63rd St. #411’, ‘Oakland’, ‘CA’, ‘94618’, 1)
insert authors
values(‘238-95-7766’, ‘Carson’, ‘Cheryl’, ‘415 548-7723’,
‘589 Darwin Ln.’, ‘Berkeley’, ‘CA’, ‘94705’, 1)
insert authors
values(‘998-72-3567’, ‘Ringer’, ‘Albert’, ‘801 826-0752′,
’67 Seventh Av.’, ‘Salt Lake City’, ‘UT’, ‘84152’, 1)
insert authors
values(‘899-46-2035’, ‘Ringer’, ‘Anne’, ‘801 826-0752′,
’67 Seventh Av.’, ‘Salt Lake City’, ‘UT’, ‘84152’, 1)
insert authors
values(‘722-51-5454’, ‘DeFrance’, ‘Michel’, ‘219 547-9982’,
‘3 Balding Pl.’, ‘Gary’, ‘IN’, ‘46403’, 1)
insert authors
values(‘807-91-6654’, ‘Panteley’, ‘Sylvia’, ‘301 946-8853’,
‘1956 Arlington Pl.’, ‘Rockville’, ‘MD’, ‘20853’, 1)
insert authors
values(‘893-72-1158’, ‘McBadden’, ‘Heather’,
‘707 448-4982’, ‘301 Putnam’, ‘Vacaville’, ‘CA’, ‘95688’, 0)
insert authors
values(‘724-08-9931’, ‘Stringer’, ‘Dirk’, ‘415 843-2991’,
‘5420 Telegraph Av.’, ‘Oakland’, ‘CA’, ‘94609’, 0)
insert authors
values(‘274-80-9391’, ‘Straight’, ‘Dean’, ‘415 834-2919’,
‘5420 College Av.’, ‘Oakland’, ‘CA’, ‘94609’, 1)
insert authors
values(‘756-30-7391’, ‘Karsen’, ‘Livia’, ‘415 534-9219’,
‘5720 McAuley St.’, ‘Oakland’, ‘CA’, ‘94609’, 1)
insert authors
values(‘724-80-9391’, ‘MacFeather’, ‘Stearns’, ‘415 354-7128′,
’44 Upland Hts.’, ‘Oakland’, ‘CA’, ‘94612’, 1)
insert authors
values(‘427-17-2319’, ‘Dull’, ‘Ann’, ‘415 836-7128’,
‘3410 Blonde St.’, ‘Palo Alto’, ‘CA’, ‘94301’, 1)
insert authors
values(‘672-71-3249’, ‘Yokomoto’, ‘Akiko’, ‘415 935-4228’,
‘3 Silver Ct.’, ‘Walnut Creek’, ‘CA’, ‘94595’, 1)
insert authors
values(‘267-41-2394’, ‘O”Leary’, ‘Michael’, ‘408 286-2428′,
’22 Cleveland Av. #14’, ‘San Jose’, ‘CA’, ‘95128’, 1)
insert authors
values(‘472-27-2349’, ‘Gringlesby’, ‘Burt’, ‘707 938-6445’,
‘PO Box 792’, ‘Covelo’, ‘CA’, ‘95428’, 3)
insert authors
values(‘527-72-3246’, ‘Greene’, ‘Morningstar’, ‘615 297-2723′,
’22 Graybar House Rd.’, ‘Nashville’, ‘TN’, ‘37215’, 0)
insert authors
values(‘172-32-1176’, ‘White’, ‘Johnson’, ‘408 496-7223’,
‘10932 Bigge Rd.’, ‘Menlo Park’, ‘CA’, ‘94025’, 1)
insert authors
values(‘712-45-1867’, ‘del Castillo’, ‘Innes’, ‘615 996-8275’,
‘2286 Cram Pl. #86’, ‘Ann Arbor’, ‘MI’, ‘48105’, 1)
insert authors
values(‘846-92-7186’, ‘Hunter’, ‘Sheryl’, ‘415 836-7128’,
‘3410 Blonde St.’, ‘Palo Alto’, ‘CA’, ‘94301’, 1)
insert authors
values(‘486-29-1786’, ‘Locksley’, ‘Charlene’, ‘415 585-4620′,
’18 Broadway Av.’, ‘San Francisco’, ‘CA’, ‘94130’, 1)
insert authors
values(‘648-92-1872’, ‘Blotchet-Halls’, ‘Reginald’, ‘503 745-6402′,
’55 Hillsdale Bl.’, ‘Corvallis’, ‘OR’, ‘97330’, 1)
insert authors
values(‘341-22-1782’, ‘Smith’, ‘Meander’, ‘913 843-0462′,
’10 Mississippi Dr.’, ‘Lawrence’, ‘KS’, ‘66044’, 0)

GO

raiserror(‘Now at the inserts to publishers ….’,0,1)

GO

insert publishers values(‘0736’, ‘New Moon Books’, ‘Boston’, ‘MA’, ‘USA’)
insert publishers values(‘0877’, ‘Binnet & Hardley’, ‘Washington’, ‘DC’, ‘USA’)
insert publishers values(‘1389’, ‘Algodata Infosystems’, ‘Berkeley’, ‘CA’, ‘USA’)
insert publishers values(‘9952’, ‘Scootney Books’, ‘New York’, ‘NY’, ‘USA’)
insert publishers values(‘1622’, ‘Five Lakes Publishing’, ‘Chicago’, ‘IL’, ‘USA’)
insert publishers values(‘1756’, ‘Ramona Publishers’, ‘Dallas’, ‘TX’, ‘USA’)
insert publishers values(‘9901’, ‘GGG&G’, ‘M�nchen’, NULL, ‘Germany’)
insert publishers values(‘9999’, ‘Lucerne Publishing’, ‘Paris’, NULL, ‘France’)

GO

raiserror(‘Now at the inserts to pub_info ….’,0,1)

GO

insert pub_info values(‘0736’, 0x474946383961D3001F00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000D3001F004004FFF0C949ABBD38EBCDBBFF60288E245001686792236ABAB03BC5B055B3F843D3B99DE2AB532A36FB15253B19E5A6231A934CA18CB75C1191D69BF62AAD467F5CF036D8243791369F516ADEF9304AF8F30A3563D7E54CFC04BF24377B5D697E6451333D8821757F898D8E8F1F76657877907259755E5493962081798D9F8A846D9B4A929385A7A5458CA0777362ACAF585E6C6A84AD429555BAA9A471A89D8E8BA2C3C7C82DC9C8AECBCECF1EC2D09143A66E80D3D9BC2C41D76AD28FB2CD509ADAA9AAC62594A3DF81C65FE0BDB5B0CDF4E276DEF6DD78EF6B86FA6C82C5A2648A54AB6AAAE4C1027864DE392E3AF4582BF582DFC07D9244ADA2480BD4C6767BFF32AE0BF3EF603B3907490A4427CE21A7330A6D0584B810664D7F383FA25932488FB96D0F37BDF9491448D1A348937A52CAB4A9D3784EF5E58B4A5545D54BC568FABC9A68DD526ED0A6B8AA17331BD91E5AD9D1D390CED23D88F54A3ACB0A955ADDAD9A50B50D87296E3EB9C76A7CDAABC86B2460040DF34D3995515AB9FF125F1AFA0DAB20A0972382CCB9F9E5AEBC368B21EEDB66EDA15F1347BE2DFDEBB44A7B7C6889240D9473EB73322F4E8D8DBBE14D960B6519BCE5724BB95789350E97EA4BF3718CDD64068D751A261D8B1539D6DCDE3C37F68E1FB58E5DCED8A44477537049852EFD253CEE38C973B7E9D97A488C2979FB936FBAFF2CF5CB79E35830400C31860F4A9BE925D4439F81B6A073BEF1575F593C01A25B26127255D45D4A45B65B851A36C56154678568A20E1100003B,
‘This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs datab

Data Base Design Project

/* */
/* InstPubs.SQL – Creates the Pubs database */
/* */
/*
** Copyright Microsoft, Inc. 1994 – 2000
** All Rights Reserved.
*/

SET NOCOUNT ON
GO

set nocount on
set dateformat mdy

USE master

declare @dttm varchar(55)
select @dttm=convert(varchar,getdate(),113)
raiserror(‘Beginning InstPubs.SQL at %s ….’,1,1,@dttm) with nowait

GO

if exists (select * from sysdatabases where name=’pubs’)
begin
raiserror(‘Dropping existing pubs database ….’,0,1)
DROP database pubs
end
GO

CHECKPOINT
go

raiserror(‘Creating pubs database….’,0,1)
go
/*
Use default size with autogrow
*/

CREATE DATABASE pubs
GO

CHECKPOINT

GO

USE pubs

GO

if db_name() <> ‘pubs’
raiserror(‘Error in InstPubs.SQL, ”USE pubs” failed! Killing the SPID now.’
,22,127) with log

GO

if CAST(SERVERPROPERTY(‘ProductMajorVersion’) AS INT)<12
BEGIN
exec sp_dboption ‘pubs’,’trunc. log on chkpt.’,’true’
exec sp_dboption ‘pubs’,’select into/bulkcopy’,’true’
END
ELSE ALTER DATABASE [pubs] SET RECOVERY SIMPLE WITH NO_WAIT
GO

execute sp_addtype id ,’varchar(11)’ ,’NOT NULL’
execute sp_addtype tid ,’varchar(6)’ ,’NOT NULL’
execute sp_addtype empid ,’char(9)’ ,’NOT NULL’

raiserror(‘Now at the create table section ….’,0,1)

GO

CREATE TABLE authors
(
au_id id

CHECK (au_id like ‘[0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]’)

CONSTRAINT UPKCL_auidind PRIMARY KEY CLUSTERED,

au_lname varchar(40) NOT NULL,
au_fname varchar(20) NOT NULL,

phone char(12) NOT NULL

DEFAULT (‘UNKNOWN’),

address varchar(40) NULL,
city varchar(20) NULL,
state char(2) NULL,

zip char(5) NULL

CHECK (zip like ‘[0-9][0-9][0-9][0-9][0-9]’),

contract bit NOT NULL
)

GO

CREATE TABLE publishers
(
pub_id char(4) NOT NULL

CONSTRAINT UPKCL_pubind PRIMARY KEY CLUSTERED

CHECK (pub_id in (‘1389’, ‘0736’, ‘0877’, ‘1622’, ‘1756’)
OR pub_id like ’99[0-9][0-9]’),

pub_name varchar(40) NULL,
city varchar(20) NULL,
state char(2) NULL,

country varchar(30) NULL

DEFAULT(‘USA’)
)

GO

CREATE TABLE titles
(
title_id tid

CONSTRAINT UPKCL_titleidind PRIMARY KEY CLUSTERED,

title varchar(80) NOT NULL,

type char(12) NOT NULL

DEFAULT (‘UNDECIDED’),

pub_id char(4) NULL

REFERENCES publishers(pub_id),

price money NULL,
advance money NULL,
royalty int NULL,
ytd_sales int NULL,
notes varchar(200) NULL,

pubdate datetime NOT NULL

DEFAULT (getdate())
)

GO

CREATE TABLE titleauthor
(
au_id id

REFERENCES authors(au_id),

title_id tid

REFERENCES titles(title_id),

au_ord tinyint NULL,
royaltyper int NULL,

CONSTRAINT UPKCL_taind PRIMARY KEY CLUSTERED(au_id, title_id)
)

GO

CREATE TABLE stores
(
stor_id char(4) NOT NULL

CONSTRAINT UPK_storeid PRIMARY KEY CLUSTERED,

stor_name varchar(40) NULL,
stor_address varchar(40) NULL,
city varchar(20) NULL,
state char(2) NULL,
zip char(5) NULL
)

GO

CREATE TABLE sales
(
stor_id char(4) NOT NULL

REFERENCES stores(stor_id),

ord_num varchar(20) NOT NULL,
ord_date datetime NOT NULL,
qty smallint NOT NULL,
payterms varchar(12) NOT NULL,

title_id tid

REFERENCES titles(title_id),

CONSTRAINT UPKCL_sales PRIMARY KEY CLUSTERED (stor_id, ord_num, title_id)
)

GO

CREATE TABLE roysched
(
title_id tid

REFERENCES titles(title_id),

lorange int NULL,
hirange int NULL,
royalty int NULL
)

GO

CREATE TABLE discounts
(
discounttype varchar(40) NOT NULL,

stor_id char(4) NULL

REFERENCES stores(stor_id),

lowqty smallint NULL,
highqty smallint NULL,
discount dec(4,2) NOT NULL
)

GO

CREATE TABLE jobs
(
job_id smallint IDENTITY(1,1)

PRIMARY KEY CLUSTERED,

job_desc varchar(50) NOT NULL

DEFAULT ‘New Position – title not formalized yet’,

min_lvl tinyint NOT NULL

CHECK (min_lvl >= 10),

max_lvl tinyint NOT NULL

CHECK (max_lvl <= 250)
)

GO

CREATE TABLE pub_info
(
pub_id char(4) NOT NULL

REFERENCES publishers(pub_id)

CONSTRAINT UPKCL_pubinfo PRIMARY KEY CLUSTERED,

logo image NULL,
pr_info text NULL
)

GO

CREATE TABLE employee
(
emp_id empid

CONSTRAINT PK_emp_id PRIMARY KEY NONCLUSTERED

CONSTRAINT CK_emp_id CHECK (emp_id LIKE
‘[A-Z][A-Z][A-Z][1-9][0-9][0-9][0-9][0-9][FM]’ or
emp_id LIKE ‘[A-Z]-[A-Z][1-9][0-9][0-9][0-9][0-9][FM]’),

fname varchar(20) NOT NULL,
minit char(1) NULL,
lname varchar(30) NOT NULL,

job_id smallint NOT NULL

DEFAULT 1

REFERENCES jobs(job_id),

job_lvl tinyint

DEFAULT 10,

pub_id char(4) NOT NULL

DEFAULT (‘9952’)

REFERENCES publishers(pub_id),

hire_date datetime NOT NULL

DEFAULT (getdate())
)

GO

raiserror(‘Now at the create trigger section …’,0,1)

GO

CREATE TRIGGER employee_insupd
ON employee
FOR insert, UPDATE
AS
–Get the range of level for this job type from the jobs table.
declare @min_lvl tinyint,
@max_lvl tinyint,
@emp_lvl tinyint,
@job_id smallint
select @min_lvl = min_lvl,
@max_lvl = max_lvl,
@emp_lvl = i.job_lvl,
@job_id = i.job_id
from employee e, jobs j, inserted i
where e.emp_id = i.emp_id AND i.job_id = j.job_id
IF (@job_id = 1) and (@emp_lvl <> 10)
begin
raiserror (‘Job id 1 expects the default level of 10.’,16,1)
ROLLBACK TRANSACTION
end
ELSE
IF NOT (@emp_lvl BETWEEN @min_lvl AND @max_lvl)
begin
raiserror (‘The level for job_id:%d should be between %d and %d.’,
16, 1, @job_id, @min_lvl, @max_lvl)
ROLLBACK TRANSACTION
end

GO

raiserror(‘Now at the inserts to authors ….’,0,1)

GO

insert authors
values(‘409-56-7008’, ‘Bennet’, ‘Abraham’, ‘415 658-9932’,
‘6223 Bateman St.’, ‘Berkeley’, ‘CA’, ‘94705’, 1)
insert authors
values(‘213-46-8915’, ‘Green’, ‘Marjorie’, ‘415 986-7020’,
‘309 63rd St. #411’, ‘Oakland’, ‘CA’, ‘94618’, 1)
insert authors
values(‘238-95-7766’, ‘Carson’, ‘Cheryl’, ‘415 548-7723’,
‘589 Darwin Ln.’, ‘Berkeley’, ‘CA’, ‘94705’, 1)
insert authors
values(‘998-72-3567’, ‘Ringer’, ‘Albert’, ‘801 826-0752′,
’67 Seventh Av.’, ‘Salt Lake City’, ‘UT’, ‘84152’, 1)
insert authors
values(‘899-46-2035’, ‘Ringer’, ‘Anne’, ‘801 826-0752′,
’67 Seventh Av.’, ‘Salt Lake City’, ‘UT’, ‘84152’, 1)
insert authors
values(‘722-51-5454’, ‘DeFrance’, ‘Michel’, ‘219 547-9982’,
‘3 Balding Pl.’, ‘Gary’, ‘IN’, ‘46403’, 1)
insert authors
values(‘807-91-6654’, ‘Panteley’, ‘Sylvia’, ‘301 946-8853’,
‘1956 Arlington Pl.’, ‘Rockville’, ‘MD’, ‘20853’, 1)
insert authors
values(‘893-72-1158’, ‘McBadden’, ‘Heather’,
‘707 448-4982’, ‘301 Putnam’, ‘Vacaville’, ‘CA’, ‘95688’, 0)
insert authors
values(‘724-08-9931’, ‘Stringer’, ‘Dirk’, ‘415 843-2991’,
‘5420 Telegraph Av.’, ‘Oakland’, ‘CA’, ‘94609’, 0)
insert authors
values(‘274-80-9391’, ‘Straight’, ‘Dean’, ‘415 834-2919’,
‘5420 College Av.’, ‘Oakland’, ‘CA’, ‘94609’, 1)
insert authors
values(‘756-30-7391’, ‘Karsen’, ‘Livia’, ‘415 534-9219’,
‘5720 McAuley St.’, ‘Oakland’, ‘CA’, ‘94609’, 1)
insert authors
values(‘724-80-9391’, ‘MacFeather’, ‘Stearns’, ‘415 354-7128′,
’44 Upland Hts.’, ‘Oakland’, ‘CA’, ‘94612’, 1)
insert authors
values(‘427-17-2319’, ‘Dull’, ‘Ann’, ‘415 836-7128’,
‘3410 Blonde St.’, ‘Palo Alto’, ‘CA’, ‘94301’, 1)
insert authors
values(‘672-71-3249’, ‘Yokomoto’, ‘Akiko’, ‘415 935-4228’,
‘3 Silver Ct.’, ‘Walnut Creek’, ‘CA’, ‘94595’, 1)
insert authors
values(‘267-41-2394’, ‘O”Leary’, ‘Michael’, ‘408 286-2428′,
’22 Cleveland Av. #14’, ‘San Jose’, ‘CA’, ‘95128’, 1)
insert authors
values(‘472-27-2349’, ‘Gringlesby’, ‘Burt’, ‘707 938-6445’,
‘PO Box 792’, ‘Covelo’, ‘CA’, ‘95428’, 3)
insert authors
values(‘527-72-3246’, ‘Greene’, ‘Morningstar’, ‘615 297-2723′,
’22 Graybar House Rd.’, ‘Nashville’, ‘TN’, ‘37215’, 0)
insert authors
values(‘172-32-1176’, ‘White’, ‘Johnson’, ‘408 496-7223’,
‘10932 Bigge Rd.’, ‘Menlo Park’, ‘CA’, ‘94025’, 1)
insert authors
values(‘712-45-1867’, ‘del Castillo’, ‘Innes’, ‘615 996-8275’,
‘2286 Cram Pl. #86’, ‘Ann Arbor’, ‘MI’, ‘48105’, 1)
insert authors
values(‘846-92-7186’, ‘Hunter’, ‘Sheryl’, ‘415 836-7128’,
‘3410 Blonde St.’, ‘Palo Alto’, ‘CA’, ‘94301’, 1)
insert authors
values(‘486-29-1786’, ‘Locksley’, ‘Charlene’, ‘415 585-4620′,
’18 Broadway Av.’, ‘San Francisco’, ‘CA’, ‘94130’, 1)
insert authors
values(‘648-92-1872’, ‘Blotchet-Halls’, ‘Reginald’, ‘503 745-6402′,
’55 Hillsdale Bl.’, ‘Corvallis’, ‘OR’, ‘97330’, 1)
insert authors
values(‘341-22-1782’, ‘Smith’, ‘Meander’, ‘913 843-0462′,
’10 Mississippi Dr.’, ‘Lawrence’, ‘KS’, ‘66044’, 0)

GO

raiserror(‘Now at the inserts to publishers ….’,0,1)

GO

insert publishers values(‘0736’, ‘New Moon Books’, ‘Boston’, ‘MA’, ‘USA’)
insert publishers values(‘0877’, ‘Binnet & Hardley’, ‘Washington’, ‘DC’, ‘USA’)
insert publishers values(‘1389’, ‘Algodata Infosystems’, ‘Berkeley’, ‘CA’, ‘USA’)
insert publishers values(‘9952’, ‘Scootney Books’, ‘New York’, ‘NY’, ‘USA’)
insert publishers values(‘1622’, ‘Five Lakes Publishing’, ‘Chicago’, ‘IL’, ‘USA’)
insert publishers values(‘1756’, ‘Ramona Publishers’, ‘Dallas’, ‘TX’, ‘USA’)
insert publishers values(‘9901’, ‘GGG&G’, ‘M�nchen’, NULL, ‘Germany’)
insert publishers values(‘9999’, ‘Lucerne Publishing’, ‘Paris’, NULL, ‘France’)

GO

raiserror(‘Now at the inserts to pub_info ….’,0,1)

GO

insert pub_info values(‘0736’, 0x474946383961D3001F00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000D3001F004004FFF0C949ABBD38EBCDBBFF60288E245001686792236ABAB03BC5B055B3F843D3B99DE2AB532A36FB15253B19E5A6231A934CA18CB75C1191D69BF62AAD467F5CF036D8243791369F516ADEF9304AF8F30A3563D7E54CFC04BF24377B5D697E6451333D8821757F898D8E8F1F76657877907259755E5493962081798D9F8A846D9B4A929385A7A5458CA0777362ACAF585E6C6A84AD429555BAA9A471A89D8E8BA2C3C7C82DC9C8AECBCECF1EC2D09143A66E80D3D9BC2C41D76AD28FB2CD509ADAA9AAC62594A3DF81C65FE0BDB5B0CDF4E276DEF6DD78EF6B86FA6C82C5A2648A54AB6AAAE4C1027864DE392E3AF4582BF582DFC07D9244ADA2480BD4C6767BFF32AE0BF3EF603B3907490A4427CE21A7330A6D0584B810664D7F383FA25932488FB96D0F37BDF9491448D1A348937A52CAB4A9D3784EF5E58B4A5545D54BC568FABC9A68DD526ED0A6B8AA17331BD91E5AD9D1D390CED23D88F54A3ACB0A955ADDAD9A50B50D87296E3EB9C76A7CDAABC86B2460040DF34D3995515AB9FF125F1AFA0DAB20A0972382CCB9F9E5AEBC368B21EEDB66EDA15F1347BE2DFDEBB44A7B7C6889240D9473EB73322F4E8D8DBBE14D960B6519BCE5724BB95789350E97EA4BF3718CDD64068D751A261D8B1539D6DCDE3C37F68E1FB58E5DCED8A44477537049852EFD253CEE38C973B7E9D97A488C2979FB936FBAFF2CF5CB79E35830400C31860F4A9BE925D4439F81B6A073BEF1575F593C01A25B26127255D45D4A45B65B851A36C56154678568A20E1100003B,
‘This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs database. New Moon Books is located in Boston, Massachusetts.

This is sample text data for New Moon Books, publisher 0736 in the pubs datab

Data Base Design Project

/*
** Copyright Microsoft, Inc. 1994 – 2000
** All Rights Reserved.
*/

SET NOCOUNT ON
GO

USE master
GO
if exists (select * from sysdatabases where name=’Northwind’)
drop database Northwind
go

DECLARE @device_directory NVARCHAR(520)
SELECT @device_directory = SUBSTRING(filename, 1, CHARINDEX(N’master.mdf’, LOWER(filename)) – 1)
FROM master.dbo.sysaltfiles WHERE dbid = 1 AND fileid = 1

EXECUTE (N’CREATE DATABASE Northwind
ON PRIMARY (NAME = N”Northwind”, FILENAME = N”’ + @device_directory + N’northwnd.mdf”)
LOG ON (NAME = N”Northwind_log”, FILENAME = N”’ + @device_directory + N’northwnd.ldf”)’)
go

if CAST(SERVERPROPERTY(‘ProductMajorVersion’) AS INT)<12
BEGIN
exec sp_dboption ‘Northwind’,’trunc. log on chkpt.’,’true’
exec sp_dboption ‘Northwind’,’select into/bulkcopy’,’true’
END
ELSE ALTER DATABASE [Northwind] SET RECOVERY SIMPLE WITH NO_WAIT
GO

set quoted_identifier on
GO

/* Set DATEFORMAT so that the date strings are interpreted correctly regardless of
the default DATEFORMAT on the server.
*/
SET DATEFORMAT mdy
GO
use “Northwind”
go
if exists (select * from sysobjects where id = object_id(‘dbo.Employee Sales by Country’) and sysstat & 0xf = 4)
drop procedure “dbo”.”Employee Sales by Country”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Sales by Year’) and sysstat & 0xf = 4)
drop procedure “dbo”.”Sales by Year”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Ten Most Expensive Products’) and sysstat & 0xf = 4)
drop procedure “dbo”.”Ten Most Expensive Products”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Category Sales for 1997’) and sysstat & 0xf = 2)
drop view “dbo”.”Category Sales for 1997″
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Sales by Category’) and sysstat & 0xf = 2)
drop view “dbo”.”Sales by Category”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Sales Totals by Amount’) and sysstat & 0xf = 2)
drop view “dbo”.”Sales Totals by Amount”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Summary of Sales by Quarter’) and sysstat & 0xf = 2)
drop view “dbo”.”Summary of Sales by Quarter”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Summary of Sales by Year’) and sysstat & 0xf = 2)
drop view “dbo”.”Summary of Sales by Year”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Invoices’) and sysstat & 0xf = 2)
drop view “dbo”.”Invoices”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Order Details Extended’) and sysstat & 0xf = 2)
drop view “dbo”.”Order Details Extended”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Order Subtotals’) and sysstat & 0xf = 2)
drop view “dbo”.”Order Subtotals”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Product Sales for 1997’) and sysstat & 0xf = 2)
drop view “dbo”.”Product Sales for 1997″
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Alphabetical list of products’) and sysstat & 0xf = 2)
drop view “dbo”.”Alphabetical list of products”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Current Product List’) and sysstat & 0xf = 2)
drop view “dbo”.”Current Product List”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Orders Qry’) and sysstat & 0xf = 2)
drop view “dbo”.”Orders Qry”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Products Above Average Price’) and sysstat & 0xf = 2)
drop view “dbo”.”Products Above Average Price”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Products by Category’) and sysstat & 0xf = 2)
drop view “dbo”.”Products by Category”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Quarterly Orders’) and sysstat & 0xf = 2)
drop view “dbo”.”Quarterly Orders”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Customer and Suppliers by City’) and sysstat & 0xf = 2)
drop view “dbo”.”Customer and Suppliers by City”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Order Details’) and sysstat & 0xf = 3)
drop table “dbo”.”Order Details”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Orders’) and sysstat & 0xf = 3)
drop table “dbo”.”Orders”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Products’) and sysstat & 0xf = 3)
drop table “dbo”.”Products”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Categories’) and sysstat & 0xf = 3)
drop table “dbo”.”Categories”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Customers’) and sysstat & 0xf = 3)
drop table “dbo”.”Customers”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Shippers’) and sysstat & 0xf = 3)
drop table “dbo”.”Shippers”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Suppliers’) and sysstat & 0xf = 3)
drop table “dbo”.”Suppliers”
GO
if exists (select * from sysobjects where id = object_id(‘dbo.Employees’) and sysstat & 0xf = 3)
drop table “dbo”.”Employees”
GO
CREATE TABLE “Employees” (
“EmployeeID” “int” IDENTITY (1, 1) NOT NULL ,
“LastName” nvarchar (20) NOT NULL ,
“FirstName” nvarchar (10) NOT NULL ,
“Title” nvarchar (30) NULL ,
“TitleOfCourtesy” nvarchar (25) NULL ,
“BirthDate” “datetime” NULL ,
“HireDate” “datetime” NULL ,
“Address” nvarchar (60) NULL ,
“City” nvarchar (15) NULL ,
“Region” nvarchar (15) NULL ,
“PostalCode” nvarchar (10) NULL ,
“Country” nvarchar (15) NULL ,
“HomePhone” nvarchar (24) NULL ,
“Extension” nvarchar (4) NULL ,
“Photo” “image” NULL ,
“Notes” “ntext” NULL ,
“ReportsTo” “int” NULL ,
“PhotoPath” nvarchar (255) NULL ,
CONSTRAINT “PK_Employees” PRIMARY KEY CLUSTERED
(
“EmployeeID”
),
CONSTRAINT “FK_Employees_Employees” FOREIGN KEY
(
“ReportsTo”
) REFERENCES “dbo”.”Employees” (
“EmployeeID”
),
CONSTRAINT “CK_Birthdate” CHECK (BirthDate < getdate())
)
GO
CREATE INDEX “LastName” ON “dbo”.”Employees”(“LastName”)
GO
CREATE INDEX “PostalCode” ON “dbo”.”Employees”(“PostalCode”)
GO

CREATE TABLE “Categories” (
“CategoryID” “int” IDENTITY (1, 1) NOT NULL ,
“CategoryName” nvarchar (15) NOT NULL ,
“Description” “ntext” NULL ,
“Picture” “image” NULL ,
CONSTRAINT “PK_Categories” PRIMARY KEY CLUSTERED
(
“CategoryID”
)
)
GO
CREATE INDEX “CategoryName” ON “dbo”.”Categories”(“CategoryName”)
GO

CREATE TABLE “Customers” (
“CustomerID” nchar (5) NOT NULL ,
“CompanyName” nvarchar (40) NOT NULL ,
“ContactName” nvarchar (30) NULL ,
“ContactTitle” nvarchar (30) NULL ,
“Address” nvarchar (60) NULL ,
“City” nvarchar (15) NULL ,
“Region” nvarchar (15) NULL ,
“PostalCode” nvarchar (10) NULL ,
“Country” nvarchar (15) NULL ,
“Phone” nvarchar (24) NULL ,
“Fax” nvarchar (24) NULL ,
CONSTRAINT “PK_Customers” PRIMARY KEY CLUSTERED
(
“CustomerID”
)
)
GO
CREATE INDEX “City” ON “dbo”.”Customers”(“City”)
GO
CREATE INDEX “CompanyName” ON “dbo”.”Customers”(“CompanyName”)
GO
CREATE INDEX “PostalCode” ON “dbo”.”Customers”(“PostalCode”)
GO
CREATE INDEX “Region” ON “dbo”.”Customers”(“Region”)
GO

CREATE TABLE “Shippers” (
“ShipperID” “int” IDENTITY (1, 1) NOT NULL ,
“CompanyName” nvarchar (40) NOT NULL ,
“Phone” nvarchar (24) NULL ,
CONSTRAINT “PK_Shippers” PRIMARY KEY CLUSTERED
(
“ShipperID”
)
)
GO
CREATE TABLE “Suppliers” (
“SupplierID” “int” IDENTITY (1, 1) NOT NULL ,
“CompanyName” nvarchar (40) NOT NULL ,
“ContactName” nvarchar (30) NULL ,
“ContactTitle” nvarchar (30) NULL ,
“Address” nvarchar (60) NULL ,
“City” nvarchar (15) NULL ,
“Region” nvarchar (15) NULL ,
“PostalCode” nvarchar (10) NULL ,
“Country” nvarchar (15) NULL ,
“Phone” nvarchar (24) NULL ,
“Fax” nvarchar (24) NULL ,
“HomePage” “ntext” NULL ,
CONSTRAINT “PK_Suppliers” PRIMARY KEY CLUSTERED
(
“SupplierID”
)
)
GO
CREATE INDEX “CompanyName” ON “dbo”.”Suppliers”(“CompanyName”)
GO
CREATE INDEX “PostalCode” ON “dbo”.”Suppliers”(“PostalCode”)
GO

CREATE TABLE “Orders” (
“OrderID” “int” IDENTITY (1, 1) NOT NULL ,
“CustomerID” nchar (5) NULL ,
“EmployeeID” “int” NULL ,
“OrderDate” “datetime” NULL ,
“RequiredDate” “datetime” NULL ,
“ShippedDate” “datetime” NULL ,
“ShipVia” “int” NULL ,
“Freight” “money” NULL CONSTRAINT “DF_Orders_Freight” DEFAULT (0),
“ShipName” nvarchar (40) NULL ,
“ShipAddress” nvarchar (60) NULL ,
“ShipCity” nvarchar (15) NULL ,
“ShipRegion” nvarchar (15) NULL ,
“ShipPostalCode” nvarchar (10) NULL ,
“ShipCountry” nvarchar (15) NULL ,
CONSTRAINT “PK_Orders” PRIMARY KEY CLUSTERED
(
“OrderID”
),
CONSTRAINT “FK_Orders_Customers” FOREIGN KEY
(
“CustomerID”
) REFERENCES “dbo”.”Customers” (
“CustomerID”
),
CONSTRAINT “FK_Orders_Employees” FOREIGN KEY
(
“EmployeeID”
) REFERENCES “dbo”.”Employees” (
“EmployeeID”
),
CONSTRAINT “FK_Orders_Shippers” FOREIGN KEY
(
“ShipVia”
) REFERENCES “dbo”.”Shippers” (
“ShipperID”
)
)
GO
CREATE INDEX “CustomerID” ON “dbo”.”Orders”(“CustomerID”)
GO
CREATE INDEX “CustomersOrders” ON “dbo”.”Orders”(“CustomerID”)
GO
CREATE INDEX “EmployeeID” ON “dbo”.”Orders”(“EmployeeID”)
GO
CREATE INDEX “EmployeesOrders” ON “dbo”.”Orders”(“EmployeeID”)
GO
CREATE INDEX “OrderDate” ON “dbo”.”Orders”(“OrderDate”)
GO
CREATE INDEX “ShippedDate” ON “dbo”.”Orders”(“ShippedDate”)
GO
CREATE INDEX “ShippersOrders” ON “dbo”.”Orders”(“ShipVia”)
GO
CREATE INDEX “ShipPostalCode” ON “dbo”.”Orders”(“ShipPostalCode”)
GO

CREATE TABLE “Products” (
“ProductID” “int” IDENTITY (1, 1) NOT NULL ,
“ProductName” nvarchar (40) NOT NULL ,
“SupplierID” “int” NULL ,
“CategoryID” “int” NULL ,
“QuantityPerUnit” nvarchar (20) NULL ,
“UnitPrice” “money” NULL CONSTRAINT “DF_Products_UnitPrice” DEFAULT (0),
“UnitsInStock” “smallint” NULL CONSTRAINT “DF_Products_UnitsInStock” DEFAULT (0),
“UnitsOnOrder” “smallint” NULL CONSTRAINT “DF_Products_UnitsOnOrder” DEFAULT (0),
“ReorderLevel” “smallint” NULL CONSTRAINT “DF_Products_ReorderLevel” DEFAULT (0),
“Discontinued” “bit” NOT NULL CONSTRAINT “DF_Products_Discontinued” DEFAULT (0),
CONSTRAINT “PK_Products” PRIMARY KEY CLUSTERED
(
“ProductID”
),
CONSTRAINT “FK_Products_Categories” FOREIGN KEY
(
“CategoryID”
) REFERENCES “dbo”.”Categories” (
“CategoryID”
),
CONSTRAINT “FK_Products_Suppliers” FOREIGN KEY
(
“SupplierID”
) REFERENCES “dbo”.”Suppliers” (
“SupplierID”
),
CONSTRAINT “CK_Products_UnitPrice” CHECK (UnitPrice >= 0),
CONSTRAINT “CK_ReorderLevel” CHECK (ReorderLevel >= 0),
CONSTRAINT “CK_UnitsInStock” CHECK (UnitsInStock >= 0),
CONSTRAINT “CK_UnitsOnOrder” CHECK (UnitsOnOrder >= 0)
)
GO
CREATE INDEX “CategoriesProducts” ON “dbo”.”Products”(“CategoryID”)
GO
CREATE INDEX “CategoryID” ON “dbo”.”Products”(“CategoryID”)
GO
CREATE INDEX “ProductName” ON “dbo”.”Products”(“ProductName”)
GO
CREATE INDEX “SupplierID” ON “dbo”.”Products”(“SupplierID”)
GO
CREATE INDEX “SuppliersProducts” ON “dbo”.”Products”(“SupplierID”)
GO

CREATE TABLE “Order Details” (
“OrderID” “int” NOT NULL ,
“ProductID” “int” NOT NULL ,
“UnitPrice” “money” NOT NULL CONSTRAINT “DF_Order_Details_UnitPrice” DEFAULT (0),
“Quantity” “smallint” NOT NULL CONSTRAINT “DF_Order_Details_Quantity” DEFAULT (1),
“Discount” “real” NOT NULL CONSTRAINT “DF_Order_Details_Discount” DEFAULT (0),
CONSTRAINT “PK_Order_Details” PRIMARY KEY CLUSTERED
(
“OrderID”,
“ProductID”
),
CONSTRAINT “FK_Order_Details_Orders” FOREIGN KEY
(
“OrderID”
) REFERENCES “dbo”.”Orders” (
“OrderID”
),
CONSTRAINT “FK_Order_Details_Products” FOREIGN KEY
(
“ProductID”
) REFERENCES “dbo”.”Products” (
“ProductID”
),
CONSTRAINT “CK_Discount” CHECK (Discount >= 0 and (Discount <= 1)),
CONSTRAINT “CK_Quantity” CHECK (Quantity > 0),
CONSTRAINT “CK_UnitPrice” CHECK (UnitPrice >= 0)
)
GO
CREATE INDEX “OrderID” ON “dbo”.”Order Details”(“OrderID”)
GO
CREATE INDEX “OrdersOrder_Details” ON “dbo”.”Order Details”(“OrderID”)
GO
CREATE INDEX “ProductID” ON “dbo”.”Order Details”(“ProductID”)
GO
CREATE INDEX “ProductsOrder_Details” ON “dbo”.”Order Details”(“ProductID”)
GO

create view “Customer and Suppliers by City” AS
SELECT City, CompanyName, ContactName, ‘Customers’ AS Relationship
FROM Customers
UNION SELECT City, CompanyName, ContactName, ‘Suppliers’
FROM Suppliers
–ORDER BY City, CompanyName
GO

create view “Alphabetical list of products” AS
SELECT Products.*, Categories.CategoryName
FROM Categories INNER JOIN Products ON Categories.CategoryID = Products.CategoryID
WHERE (((Products.Discontinued)=0))
GO

create view “Current Product List” AS
SELECT Product_List.ProductID, Product_List.ProductName
FROM Products AS Product_List
WHERE (((Product_List.Discontinued)=0))
–ORDER BY Product_List.ProductName
GO

create view “Orders Qry” AS
SELECT Orders.OrderID, Orders.CustomerID, Orders.EmployeeID, Orders.OrderDate, Orders.RequiredDate,
Orders.ShippedDate, Orders.ShipVia, Orders.Freight, Orders.ShipName, Orders.ShipAddress, Orders.ShipCity,
Orders.ShipRegion, Orders.ShipPostalCode, Orders.ShipCountry,
Customers.CompanyName, Customers.Address, Customers.City, Customers.Region, Customers.PostalCode, Customers.Country
FROM Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID
GO

create view “Products Above Average Price” AS
SELECT Products.ProductName, Products.UnitPrice
FROM Products
WHERE Products.UnitPrice>(SELECT AVG(UnitPrice) From Products)
–ORDER BY Products.UnitPrice DESC
GO

create view “Products by Category” AS
SELECT Categories.CategoryName, Products.ProductName, Products.QuantityPerUnit, Products.UnitsInStock, Products.Discontinued
FROM Categories INNER JOIN Products ON Categories.CategoryID = Products.CategoryID
WHERE Products.Discontinued <> 1
–ORDER BY Categories.CategoryName, Products.ProductName
GO

create view “Quarterly Orders” AS
SELECT DISTINCT Customers.CustomerID, Customers.CompanyName, Customers.City, Customers.Country
FROM Customers RIGHT JOIN Orders ON Customers.CustomerID = Orders.CustomerID
WHERE Orders.OrderDate BETWEEN ‘19970101’ And ‘19971231’
GO

create view Invoices AS
SELECT Orders.ShipName, Orders.ShipAddress, Orders.ShipCity, Orders.ShipRegion, Orders.ShipPostalCode,
Orders.ShipCountry, Orders.CustomerID, Customers.CompanyName AS CustomerName, Customers.Address, Customers.City,
Customers.Region, Customers.PostalCode, Customers.Country,
(FirstName + ‘ ‘ + LastName) AS Salesperson,
Orders.OrderID, Orders.OrderDate, Orders.RequiredDate, Orders.ShippedDate, Shippers.CompanyName As ShipperName,
“Order Details”.ProductID, Products.ProductName, “Order Details”.UnitPrice, “Order Details”.Quantity,
“Order Details”.Discount,
(CONVERT(money,(“Order Details”.UnitPrice*Quantity*(1-Discount)/100))*100) AS ExtendedPrice, Orders.Freight
FROM Shippers INNER JOIN
(Products INNER JOIN
(
(Employees INNER JOIN
(Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID)
ON Employees.EmployeeID = Orders.EmployeeID)
INNER JOIN “Order Details” ON Orders.OrderID = “Order Details”.OrderID)
ON Products.ProductID = “Order Details”.ProductID)
ON Shippers.ShipperID = Orders.ShipVia
GO

create view “Order Details Extended” AS
SELECT “Order Details”.OrderID, “Order Details”.ProductID, Products.ProductName,
“Order Details”.UnitPrice, “Order Details”.Quantity, “Order Details”.Discount,
(CONVERT(money,(“Order Details”.UnitPrice*Quantity*(1-Discount)/100))*100) AS ExtendedPrice
FROM Products INNER JOIN “Order Details” ON Products.ProductID = “Order Details”.ProductID
–ORDER BY “Order Details”.OrderID
GO

create view “Order Subtotals” AS
SELECT “Order Details”.OrderID, Sum(CONVERT(money,(“Order Details”.UnitPrice*Quantity*(1-Discount)/100))*100) AS Subtotal
FROM “Order Details”
GROUP BY “Order Details”.OrderID
GO

create view “Product Sales for 1997” AS
SELECT Categories.CategoryName, Products.ProductName,
Sum(CONVERT(money,(“Order Details”.UnitPrice*Quantity*(1-Discount)/100))*100) AS ProductSales
FROM (Categories INNER JOIN Products ON Categories.CategoryID = Products.CategoryID)
INNER JOIN (Orders
INNER JOIN “Order Details” ON Orders.OrderID = “Order Details”.OrderID)
ON Products.ProductID = “Order Details”.ProductID
WHERE (((Orders.ShippedDate) Between ‘19970101’ And ‘19971231’))
GROUP BY Categories.CategoryName, Products.ProductName
GO

create view “Category Sales for 1997” AS
SELECT “Product Sales for 1997”.CategoryName, Sum(“Product Sales for 1997”.ProductSales) AS CategorySales
FROM “Product Sales for 1997”
GROUP BY “Product Sales for 1997”.CategoryName
GO

create view “Sales by Category” AS
SELECT Categories.CategoryID, Categories.CategoryName, Products.ProductName,
Sum(“Order Details Extended”.ExtendedPrice) AS ProductSales
FROM Categories INNER JOIN
(Products INNER JOIN
(Orders INNER JOIN “Order Details Extended” ON Orders.OrderID = “Order Details Extended”.OrderID)
ON Products.ProductID = “Order Details Extended”.ProductID)
ON Categories.CategoryID = Products.CategoryID
WHERE Orders.OrderDate BETWEEN ‘19970101’ And ‘19971231’
GROUP BY Categories.CategoryID, Categories.CategoryName, Products.ProductName
–ORDER BY Products.ProductName
GO

create view “Sales Totals by Amount” AS
SELECT “Order Subtotals”.Subtotal AS SaleAmount, Orders.OrderID, Customers.CompanyName, Orders.ShippedDate
FROM Customers INNER JOIN
(Orders INNER JOIN “Order Subtotals” ON Orders.OrderID = “Order Subtotals”.OrderID)
ON Customers.CustomerID = Orders.CustomerID
WHERE (“Order Subtotals”.Subtotal >2500) AND (Orders.ShippedDate BETWEEN ‘19970101’ And ‘19971231’)
GO

create view “Summary of Sales by Quarter” AS
SELECT Orders.ShippedDate, Orders.OrderID, “Order Subtotals”.Subtotal
FROM Orders INNER JOIN “Order Subtotals” ON Orders.OrderID = “Order Subtotals”.OrderID
WHERE Orders.ShippedDate IS NOT NULL
–ORDER BY Orders.ShippedDate
GO

create view “Summary of Sales by Year” AS
SELECT Orders.ShippedDate, Orders.OrderID, “Order Subtotals”.Subtotal
FROM Orders INNER JOIN “Order Subtotals” ON Orders.OrderID = “Order Subtotals”.OrderID
WHERE Orders.ShippedDate IS NOT NULL
–ORDER BY Orders.ShippedDate
GO

create procedure “Ten Most Expensive Products” AS
SET ROWCOUNT 10
SELECT Products.ProductName AS TenMostExpensiveProducts, Products.UnitPrice
FROM Products
ORDER BY Products.UnitPrice DESC
GO

create procedure “Employee Sales by Country”
@Beginning_Date DateTime, @Ending_Date DateTime AS
SELECT Employees.Country, Employees.LastName, Employees.FirstName, Orders.ShippedDate, Orders.OrderID, “Order Subtotals”.Subtotal AS SaleAmount
FROM Employees INNER JOIN
(Orders INNER JOIN “Order Subtotals” ON Orders.OrderID = “Order Subtotals”.OrderID)
ON Employees.EmployeeID = Orders.EmployeeID
WHERE Orders.ShippedDate Between @Beginning_Date And @Ending_Date
GO

create procedure “Sales by Year”
@Beginning_Date DateTime, @Ending_Date DateTime AS
SELECT Orders.ShippedDate, Orders.OrderID, “Order Subtotals”.Subtotal, DATENAME(yy,ShippedDate) AS Year
FROM Orders INNER JOIN “Order Subtotals” ON Orders.OrderID = “Order Subtotals”.OrderID
WHERE Orders.ShippedDate Between @Beginning_Date And @Ending_Date
GO

set quoted_identifier on
go
set identity_insert “Categories” on
go
ALTER TABLE “Categories” NOCHECK CONSTRAINT ALL
go
INSERT “Categories”(“CategoryID”,”CategoryName”,”Description”,”Picture”) VALUES(1,’Beverages’,’Soft drinks, coffees, teas, beers, and ales’,0x151C2F00020000000D000E0014002100FFFFFFFF4269746D617020496D616765005061696E742E5069637475726500010500000200000007000000504272757368000000000000000000A0290000424D98290000000000005600000028000000AC00000078000000010004000000000000000000880B0000880B00000800000008000000FFFFFF0000FFFF00FF00FF000000FF00FFFF000000FF0000FF0000000000000000001000000000100000000100100000000000000101010001000010010000000101000100000010010000010000001010100010000010001000000000000000000000100000000100000000000000100000000000000000000000100100100000000000000000000100100100001250707010000000100000000100010010000001000000100000000010010010000000100101010101000000000000000000000100100010000010101010100000000000000000000000000000000000010102052536377777777777775353010010100010000000000101000100100010010010000000000010000000000000000010001000100101000100000001001000000000000010000000000000000000000000000000101434357777777777777777777777777777010012000101010010200000000000000000000000010010001001000000000010001000000000000000001001000000100100101010000000000000000000000000000000102161777777777575753535352577777777777777015012000010001010100000000000000000100000000000000100100100000000001001000001001001000010100100100000010000000100000000000000000000000141777773761737637777576777170775277777777634016121030000000001000000000001000000000000000000000000000000000000000010000000000010000000000001000010000000000000000000000000010050367757757170501400000010107071777577777777533410140001010101000101001010100000000000000000000000000000100000000000000000000000000000000101000100000100000000000000000000000001035735300000000000000000000000000017177777777747061210100000000100000100000001000000000000000000000000000000010001070301010121000000000000000000000000000000000000000000000010103435000000001065343577757047747470000010775777717100000010100100010100010101000010000000000000000000104147711013103575002004047730100010000000000000000000000000000000000000000001000401417657770700006777777777656040400737173436170140000124100000100000000100002040000020000010174776777700010107377757777777537210000000010000000000000010010000000001000001000003767647670000400057747041671747742140500043414034300056512051010030101400210717137070143777777777577777711210317777777777770575777101000000010000000000000001000010000010100047044044067100747777677777761406060074252400177777774764677675206025000302171673777777777777777474772757477700101677777777776717331770300010101000000001000000000100000000000042046020007742747776777777777567777774647465660676777766574677675715125350716673777773374677757777777757277677110051777777776777601571314103002000100000000100100000000001010006744004404776147776777670676777767476567347065750576737566474675777727125216771773377173777677767756747657757712110377577777777671702775312101010100001000000000010000101000001076706000477674777677677775677677777777704247767606777746747474767677756525653131177117737647777757675777774771011070177777776777740171734000000000010000100000000000100000010100477654066605077767765777767747077477777674766460777737674747677777767771717373537771773774777777777777477477001127107777776777776317173521012101010000000000000000000001000000030040676775767677507700676747777477477777474777047677765670674677765777777777777777777773766777747657477477777100103177777777676774137177100000000001000000000000000000000010100570744256765617600676700477047670770076777000047774773465644674567767677777777777777777737566777777777777777777310001077777777777777175352101010101000000000010001000000001000777771215250300467007777476742704724777657756470007673774767047427777777777777777736777777776577777777777743477775075777537776767677017277310000000000100000000000000100010100717070161420404600774604067616747077416774365677774007777606740746567767777777777775771777773747677571616124341030307777777757777521000001135000100100100000010100010000010000210017152567507007434067000500407670070657075777776777007774474646656777767777777777777777777377677761000000013777535031777777377773775070100010102100100010000000000001010001001030006777776165060406504760476074640477640670565677677007776475047474767777777777777777777373374777777301173577777777777777775777777777776741204100100100000100000100000001000100057774414000060740670676767677677777647775676777744770077407664676477756777777777777773737373776467774775352777777677777777777636573535351301030012030101000000000000000000100010700021000614776767464604040404006666776767777547677704664464404445677676777777777773373737377677777677424477737771771277716535757753424204001001001000001000100000010001000010030005000014666400000010103073435210110006567776707777004760477437767677776777777777737373733375647765707537710077077017777652527167300101210121030100103000000010010000000100000500006004616000400012534351011010100000000000774000004774473373737775767777777777737373737773765675777777737310167677077771777567177300101030000002102101000000000000010000000010007740000041402141400000000000000000000000000030000077777777373737767767777777777737373733373567767777737771017777771777470527176734030000001010100010000010000010010000000101400566000000073756060000000000000000000000000000473077777373337373777774767777777773733735376166677777773773701777167707735377757473531001210100000001001010000010000000001000430006540000000040014125414040400000000000000000003773777677377737373377767777777777767764674656575674777777377301701771076565435273577001701030303101001000000010000100101003070400066000000000000004000000000000000000000000000777751467337337373777777747677777777747464476466677677777777271103107611730737435747737301034105004303001210010001010010001250000004700000000004674200000000000000000000000007777667777737737737373373776777777777776764567650757477765761005712110173161157477763773510527012521301005021010000107021030165000000064000000000677640677646400004064143417777776766761473733733737377777776767777777656476747466466747776177527111211610100233121110105272101612014016103410601017307561777000057004740004740044600000046777050477776717357375676777676773773777373737777677777777777656474676547757677717670077465647473101001100000125016521471617012101201107077717377740006377004000076046760000000074076060077706777777767676767676733733337373737774767777777777676774742467674767715770167767767613133121313130137131731031216152505307307777777770004757770000000600676000064040000647404674077777777767676767673773777737377777776777777777767474676746747777774367017530532535252713533535317014341437161713013121177717777777700173777000676047667704706446640004764007774777777776767676767377337333373737377674677777776546767470474767476537561073177357375253473741701703530313010101003000142777777773777004777777004746070464406440000464006700476707777777776767676767337737777373777777677777777776656566567076776777507700756315334737073101321361703434343430703141712117777377777774025773770002744700006400000000064006400676077777777676776776777337333337373777747677777777774676567446474776776347702717275371717577775775735717171717171743361616377777773573740073777340046066004600000000000400060067674777777777676676676737737777737373777774767777777675656746774676577711710053715335377377777777777777777777777773775773757377777377377204777735000047404460044000000000004004777400777770066767767763333333333373777776676777777777766747656465747676060000735337537317777777777777777777777777777773777737773375377774000717777000066402464064000000000000464670047777700776766766677777777777373777777777777777677744646756567677753537352531713717717777777777777777777777777777777537777375377173770007673735000000047466466564664440040046400007770006767767777333333333337373777667677777777776777776676776567777171317521703717377777777777777777777777777537537717375377737777370005777700400747766776476676766746760000000477000076766766667777777777733777777567777777177777260400040406776117161313153535371777777777777777777773775377777777775377371773537470000050067044667777777677777677777656100466100000676776777733313110110077777766656777756770404050514077771653635314717313537177777777777777777757757777777777777777735375377737170000000177604040404040460607676777617000047000007110110010000000000011015717777677777647012410000253000477711130131301753537177777777777177173737777377737775377371735325216537616446426570040000000000000404004007677400044000077750075000000000000000001734776677774656410000000040030065251353075330317073777777577777777777773777777777377775375703535313431713731353300004644000000440000000005377000000000007734310000000000000000000413577777567617600070000000404421305215311535337135777737773773777577777757375777777735321350316161716352165725700000670006004240000000527371000000000000757700000000000000000053111777766544740524400000004003150131303072135353773777577757775373771773777777777777703534334313130310317131733713010000056700020000003175600000000000000007777101210010110113111713337546674746570704700007150216101153153435351775377373735377773777777777773753771350335317071717356134310530703052537004701416171743370000000000000000000010101177000000640273737376745646777777777306577351013734353131707373777377577777377757737573573757777734337537737367307131635273171717313700000773735271357400000000000000000000000046400000004673373737344664777777777774000737373711031034353717177356537353757717737573777777777777335373771717535772775371716373735777000007173537167770000000000000000000000000046000400467617373737474577777777777700463171311203121313131733717773777777737777777777777777777777537773777737737171735377357174773737761777167777357000000000000000000000000040040000000040633733346467377777777777400773337331100101313531717773777537737777777777777777777777773777757377737777773677177377371671753534337352577370000000000000000000000000000000000000003733737443337377777777770000774001031313317313733735775377777777777777777777777777777773773777537573737371736717165373572736737475373717400000000000000000000460000000000000000037373364377337377777777740407300000000001213733173737777777777777777777777777777777777757777373777375757573531727335353175753573737757630000000000000000000042440000000400004000737337573333733337777777000070000000000000000007047777777777777777777777777777777777773777375775375737373777777535727367337377353573735700000000000000000000440600000000040400403733733377373773737777770040000000000000400640404377777777375777777777777777777777777777377373777377777771737173735717175257347372177734000000000000000000000644640000000000400433733733337333733733777710000470534010001650377774771771775777777777777777777777777777375775777357717357777577757737777377737375777717770000000000066000064004767400000000400000373733737337733737373777404007776000400000004400473777777777777777777777777777777777777377377357737777737737737737753717753575737353771000000000000404000464060460000000000040007373373733733373737377770000004747742000000000043577777777777777777777777777777777777775777777777777777777777777777777773773737757777700000000000460000046006460000000400000000037337333733737373737377760000000000055004361777777777777777777777777777777777777777777377777777377777777777777777777777777777773773777700000000000000000000040640000000404000000337337373733737373737377004000000000277735777777777777777777777777777777777777777577777777777377757371777577777757737777777777777775734040000000000000004000406400000000000000007337337333733337373737775000000000005777777777777777777777777777777717777573757773777777773577777377777377377537737773573573537573773700000000000000004460040606000000000000004633733733737377737373377700746000000037777777777777777777777777777777773773777737777737777773737177535375375377777777777777777773771775000000000000000000000044440440040000000006373373733733333737337777406740000000077777777777777777777777737577377775777717717737773577777777737777777777777777777777777777777777770400000000000000000000600066606600000000443373333733737733337777770067600400440777777777777777777777777777775735737537777777577773777777777777777777777777777777777777777777777201000000000000000000004000440444000000000037373733733733737777777770460067466007777777777777777777777777773777777777777377377377777777777777737737777773777775377777777777777775004000000000000000000000046046000000000046373373373373373777777777004746406700077777777777777777777777777777777777777777777777777777173717777775737737775377777777773775777373700000000000000000000064464000046000000000007337373373373377777777375066076040001777777777777777777777777777777777777777777777777777777777737377377735717377537773573777737775777724000000000000000000060640000000000000000037337377373377777777773760474640040605777777777777777777777777777777777777777777577577173373537775717717573775373753777775777777777775010000000000000000004654000000000000000000733733333377777777777177106606767476767777777777777777777777777777777737777777737773777777573757373773637371737577377737373737777737120040000000000000000004600000000000000000007373737377777777777773770065647646461777777777777777777777777777575777777757575773577373537173735773757535763573357737757777777377777500004000000000000044064600004000000000000073373337777777777777713710660647640007777777777777777577775735777777775757737737577777573777757773573737737173577375707373717577777737000000000000000004676465654640000000000000773373777753

DATA BASE DESIGN project

/*******************************************************************************
Chinook Database – Version 1.4
Script: Chinook_SqlServer.sql
Description: Creates and populates the Chinook database.
DB Server: SqlServer
Author: Luis Rocha
License: http://www.codeplex.com/ChinookDatabase/license
********************************************************************************/

/*******************************************************************************
Drop database if it exists
********************************************************************************/
IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N’Chinook’)
BEGIN
ALTER DATABASE [Chinook] SET OFFLINE WITH ROLLBACK IMMEDIATE;
ALTER DATABASE [Chinook] SET ONLINE;
DROP DATABASE [Chinook];
END

GO

/*******************************************************************************
Create database
********************************************************************************/
CREATE DATABASE [Chinook];
GO

USE [Chinook];
GO

/*******************************************************************************
Create Tables
********************************************************************************/
CREATE TABLE [dbo].[Album]
(
[AlbumId] INT NOT NULL,
[Title] NVARCHAR(160) NOT NULL,
[ArtistId] INT NOT NULL,
CONSTRAINT [PK_Album] PRIMARY KEY CLUSTERED ([AlbumId])
);
GO
CREATE TABLE [dbo].[Artist]
(
[ArtistId] INT NOT NULL,
[Name] NVARCHAR(120),
CONSTRAINT [PK_Artist] PRIMARY KEY CLUSTERED ([ArtistId])
);
GO
CREATE TABLE [dbo].[Customer]
(
[CustomerId] INT NOT NULL,
[FirstName] NVARCHAR(40) NOT NULL,
[LastName] NVARCHAR(20) NOT NULL,
[Company] NVARCHAR(80),
[Address] NVARCHAR(70),
[City] NVARCHAR(40),
[State] NVARCHAR(40),
[Country] NVARCHAR(40),
[PostalCode] NVARCHAR(10),
[Phone] NVARCHAR(24),
[Fax] NVARCHAR(24),
[Email] NVARCHAR(60) NOT NULL,
[SupportRepId] INT,
CONSTRAINT [PK_Customer] PRIMARY KEY CLUSTERED ([CustomerId])
);
GO
CREATE TABLE [dbo].[Employee]
(
[EmployeeId] INT NOT NULL,
[LastName] NVARCHAR(20) NOT NULL,
[FirstName] NVARCHAR(20) NOT NULL,
[Title] NVARCHAR(30),
[ReportsTo] INT,
[BirthDate] DATETIME,
[HireDate] DATETIME,
[Address] NVARCHAR(70),
[City] NVARCHAR(40),
[State] NVARCHAR(40),
[Country] NVARCHAR(40),
[PostalCode] NVARCHAR(10),
[Phone] NVARCHAR(24),
[Fax] NVARCHAR(24),
[Email] NVARCHAR(60),
CONSTRAINT [PK_Employee] PRIMARY KEY CLUSTERED ([EmployeeId])
);
GO
CREATE TABLE [dbo].[Genre]
(
[GenreId] INT NOT NULL,
[Name] NVARCHAR(120),
CONSTRAINT [PK_Genre] PRIMARY KEY CLUSTERED ([GenreId])
);
GO
CREATE TABLE [dbo].[Invoice]
(
[InvoiceId] INT NOT NULL,
[CustomerId] INT NOT NULL,
[InvoiceDate] DATETIME NOT NULL,
[BillingAddress] NVARCHAR(70),
[BillingCity] NVARCHAR(40),
[BillingState] NVARCHAR(40),
[BillingCountry] NVARCHAR(40),
[BillingPostalCode] NVARCHAR(10),
[Total] NUMERIC(10,2) NOT NULL,
CONSTRAINT [PK_Invoice] PRIMARY KEY CLUSTERED ([InvoiceId])
);
GO
CREATE TABLE [dbo].[InvoiceLine]
(
[InvoiceLineId] INT NOT NULL,
[InvoiceId] INT NOT NULL,
[TrackId] INT NOT NULL,
[UnitPrice] NUMERIC(10,2) NOT NULL,
[Quantity] INT NOT NULL,
CONSTRAINT [PK_InvoiceLine] PRIMARY KEY CLUSTERED ([InvoiceLineId])
);
GO
CREATE TABLE [dbo].[MediaType]
(
[MediaTypeId] INT NOT NULL,
[Name] NVARCHAR(120),
CONSTRAINT [PK_MediaType] PRIMARY KEY CLUSTERED ([MediaTypeId])
);
GO
CREATE TABLE [dbo].[Playlist]
(
[PlaylistId] INT NOT NULL,
[Name] NVARCHAR(120),
CONSTRAINT [PK_Playlist] PRIMARY KEY CLUSTERED ([PlaylistId])
);
GO
CREATE TABLE [dbo].[PlaylistTrack]
(
[PlaylistId] INT NOT NULL,
[TrackId] INT NOT NULL,
CONSTRAINT [PK_PlaylistTrack] PRIMARY KEY NONCLUSTERED ([PlaylistId], [TrackId])
);
GO
CREATE TABLE [dbo].[Track]
(
[TrackId] INT NOT NULL,
[Name] NVARCHAR(200) NOT NULL,
[AlbumId] INT,
[MediaTypeId] INT NOT NULL,
[GenreId] INT,
[Composer] NVARCHAR(220),
[Milliseconds] INT NOT NULL,
[Bytes] INT,
[UnitPrice] NUMERIC(10,2) NOT NULL,
CONSTRAINT [PK_Track] PRIMARY KEY CLUSTERED ([TrackId])
);
GO

/*******************************************************************************
Create Primary Key Unique Indexes
********************************************************************************/

/*******************************************************************************
Create Foreign Keys
********************************************************************************/
ALTER TABLE [dbo].[Album] ADD CONSTRAINT [FK_AlbumArtistId]
FOREIGN KEY ([ArtistId]) REFERENCES [dbo].[Artist] ([ArtistId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
CREATE INDEX [IFK_AlbumArtistId] ON [dbo].[Album] ([ArtistId]);
GO
ALTER TABLE [dbo].[Customer] ADD CONSTRAINT [FK_CustomerSupportRepId]
FOREIGN KEY ([SupportRepId]) REFERENCES [dbo].[Employee] ([EmployeeId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
CREATE INDEX [IFK_CustomerSupportRepId] ON [dbo].[Customer] ([SupportRepId]);
GO
ALTER TABLE [dbo].[Employee] ADD CONSTRAINT [FK_EmployeeReportsTo]
FOREIGN KEY ([ReportsTo]) REFERENCES [dbo].[Employee] ([EmployeeId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
CREATE INDEX [IFK_EmployeeReportsTo] ON [dbo].[Employee] ([ReportsTo]);
GO
ALTER TABLE [dbo].[Invoice] ADD CONSTRAINT [FK_InvoiceCustomerId]
FOREIGN KEY ([CustomerId]) REFERENCES [dbo].[Customer] ([CustomerId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
CREATE INDEX [IFK_InvoiceCustomerId] ON [dbo].[Invoice] ([CustomerId]);
GO
ALTER TABLE [dbo].[InvoiceLine] ADD CONSTRAINT [FK_InvoiceLineInvoiceId]
FOREIGN KEY ([InvoiceId]) REFERENCES [dbo].[Invoice] ([InvoiceId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
CREATE INDEX [IFK_InvoiceLineInvoiceId] ON [dbo].[InvoiceLine] ([InvoiceId]);
GO
ALTER TABLE [dbo].[InvoiceLine] ADD CONSTRAINT [FK_InvoiceLineTrackId]
FOREIGN KEY ([TrackId]) REFERENCES [dbo].[Track] ([TrackId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
CREATE INDEX [IFK_InvoiceLineTrackId] ON [dbo].[InvoiceLine] ([TrackId]);
GO
ALTER TABLE [dbo].[PlaylistTrack] ADD CONSTRAINT [FK_PlaylistTrackPlaylistId]
FOREIGN KEY ([PlaylistId]) REFERENCES [dbo].[Playlist] ([PlaylistId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
ALTER TABLE [dbo].[PlaylistTrack] ADD CONSTRAINT [FK_PlaylistTrackTrackId]
FOREIGN KEY ([TrackId]) REFERENCES [dbo].[Track] ([TrackId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
CREATE INDEX [IFK_PlaylistTrackTrackId] ON [dbo].[PlaylistTrack] ([TrackId]);
GO
ALTER TABLE [dbo].[Track] ADD CONSTRAINT [FK_TrackAlbumId]
FOREIGN KEY ([AlbumId]) REFERENCES [dbo].[Album] ([AlbumId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
CREATE INDEX [IFK_TrackAlbumId] ON [dbo].[Track] ([AlbumId]);
GO
ALTER TABLE [dbo].[Track] ADD CONSTRAINT [FK_TrackGenreId]
FOREIGN KEY ([GenreId]) REFERENCES [dbo].[Genre] ([GenreId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
CREATE INDEX [IFK_TrackGenreId] ON [dbo].[Track] ([GenreId]);
GO
ALTER TABLE [dbo].[Track] ADD CONSTRAINT [FK_TrackMediaTypeId]
FOREIGN KEY ([MediaTypeId]) REFERENCES [dbo].[MediaType] ([MediaTypeId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
CREATE INDEX [IFK_TrackMediaTypeId] ON [dbo].[Track] ([MediaTypeId]);
GO

/*******************************************************************************
Populate Tables
********************************************************************************/
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (1, N’Rock’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (2, N’Jazz’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (3, N’Metal’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (4, N’Alternative & Punk’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (5, N’Rock And Roll’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (6, N’Blues’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (7, N’Latin’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (8, N’Reggae’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (9, N’Pop’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (10, N’Soundtrack’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (11, N’Bossa Nova’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (12, N’Easy Listening’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (13, N’Heavy Metal’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (14, N’R&B/Soul’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (15, N’Electronica/Dance’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (16, N’World’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (17, N’Hip Hop/Rap’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (18, N’Science Fiction’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (19, N’TV Shows’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (20, N’Sci Fi & Fantasy’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (21, N’Drama’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (22, N’Comedy’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (23, N’Alternative’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (24, N’Classical’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (25, N’Opera’);

INSERT INTO [dbo].[MediaType] ([MediaTypeId], [Name]) VALUES (1, N’MPEG audio file’);
INSERT INTO [dbo].[MediaType] ([MediaTypeId], [Name]) VALUES (2, N’Protected AAC audio file’);
INSERT INTO [dbo].[MediaType] ([MediaTypeId], [Name]) VALUES (3, N’Protected MPEG-4 video file’);
INSERT INTO [dbo].[MediaType] ([MediaTypeId], [Name]) VALUES (4, N’Purchased AAC audio file’);
INSERT INTO [dbo].[MediaType] ([MediaTypeId], [Name]) VALUES (5, N’AAC audio file’);

INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (1, N’AC/DC’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (2, N’Accept’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (3, N’Aerosmith’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (4, N’Alanis Morissette’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (5, N’Alice In Chains’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (6, N’Antônio Carlos Jobim’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (7, N’Apocalyptica’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (8, N’Audioslave’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (9, N’BackBeat’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (10, N’Billy Cobham’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (11, N’Black Label Society’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (12, N’Black Sabbath’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (13, N’Body Count’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (14, N’Bruce Dickinson’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (15, N’Buddy Guy’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (16, N’Caetano Veloso’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (17, N’Chico Buarque’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (18, N’Chico Science & Nação Zumbi’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (19, N’Cidade Negra’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (20, N’Cláudio Zoli’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (21, N’Various Artists’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (22, N’Led Zeppelin’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (23, N’Frank Zappa & Captain Beefheart’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (24, N’Marcos Valle’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (25, N’Milton Nascimento & Bebeto’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (26, N’Azymuth’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (27, N’Gilberto Gil’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (28, N’João Gilberto’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (29, N’Bebel Gilberto’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (30, N’Jorge Vercilo’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (31, N’Baby Consuelo’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (32, N’Ney Matogrosso’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (33, N’Luiz Melodia’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (34, N’Nando Reis’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (35, N’Pedro Luís & A Parede’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (36, N’O Rappa’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (37, N’Ed Motta’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (38, N’Banda Black Rio’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (39, N’Fernanda Porto’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (40, N’Os Cariocas’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (41, N’Elis Regina’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (42, N’Milton Nascimento’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (43, N’A Cor Do Som’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (44, N’Kid Abelha’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (45, N’Sandra De Sá’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (46, N’Jorge Ben’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (47, N’Hermeto Pascoal’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (48, N’Barão Vermelho’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (49, N’Edson, DJ Marky & DJ Patife Featuring Fernanda Porto’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (50, N’Metallica’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (51, N’Queen’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (52, N’Kiss’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (53, N’Spyro Gyra’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (54, N’Green Day’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (55, N’David Coverdale’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (56, N’Gonzaguinha’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (57, N’Os Mutantes’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (58, N’Deep Purple’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (59, N’Santana’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (60, N’Santana Feat. Dave Matthews’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (61, N’Santana Feat. Everlast’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (62, N’Santana Feat. Rob Thomas’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (63, N’Santana Feat. Lauryn Hill & Cee-Lo’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (64, N’Santana Feat. The Project G&B’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (65, N’Santana Feat. Maná’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (66, N’Santana Feat. Eagle-Eye Cherry’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (67, N’Santana Feat. Eric Clapton’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (68, N’Miles Davis’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (69, N’Gene Krupa’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (70, N’Toquinho & Vinícius’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (71, N’Vinícius De Moraes & Baden Powell’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (72, N’Vinícius De Moraes’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (73, N’Vinícius E Qurteto Em Cy’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (74, N’Vinícius E Odette Lara’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (75, N’Vinicius, Toquinho & Quarteto Em Cy’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (76, N’Creedence Clearwater Revival’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (77, N’Cássia Eller’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (78, N’Def Leppard’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (79, N’Dennis Chambers’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (80, N’Djavan’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (81, N’Eric Clapton’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (82, N’Faith No More’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (83, N’Falamansa’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (84, N’Foo Fighters’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (85, N’Frank Sinatra’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (86, N’Funk Como Le Gusta’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (87, N’Godsmack’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (88, N’Guns N” Roses’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (89, N’Incognito’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (90, N’Iron Maiden’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (91, N’James Brown’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (92, N’Jamiroquai’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (93, N’JET’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (94, N’Jimi Hendrix’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (95, N’Joe Satriani’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (96, N’Jota Quest’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (97, N’João Suplicy’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (98, N’Judas Priest’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (99, N’Legião Urbana’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (100, N’Lenny Kravitz’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (101, N’Lulu Santos’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (102, N’Marillion’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (103, N’Marisa Monte’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (104, N’Marvin Gaye’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (105, N’Men At Work’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (106, N’Motörhead’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (107, N’Motörhead & Girlschool’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (108, N’Mônica Marianno’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (109, N’Mötley Crüe’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (110, N’Nirvana’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (111, N’O Terço’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (112, N’Olodum’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (113, N’Os Paralamas Do Sucesso’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (114, N’Ozzy Osbourne’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (115, N’Page & Plant’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (116, N’Passengers’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (117, N’Paul D”Ianno’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (118, N’Pearl Jam’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (119, N’Peter Tosh’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (120, N’Pink Floyd’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (121, N’Planet Hemp’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (122, N’R.E.M. Feat. Kate Pearson’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (123, N’R.E.M. Feat. KRS-One’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (124, N’R.E.M.’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (125, N’Raimundos’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (126, N’Raul Seixas’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (127, N’Red Hot Chili Peppers’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (128, N’Rush’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (129, N’Simply Red’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (130, N’Skank’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (131, N’Smashing Pumpkins’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (132, N’Soundgarden’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (133, N’Stevie Ray Vaughan & Double Trouble’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (134, N’Stone Temple Pilots’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (135, N’System Of A Down’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (136, N’Terry Bozzio, Tony Levin & Steve Stevens’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (137, N’The Black Crowes’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (138, N’The Clash’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (139, N’The Cult’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (140, N’The Doors’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (141, N’The Police’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (142, N’The Rolling Stones’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (143, N’The Tea Party’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (144, N’The Who’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (145, N’Tim Maia’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (146, N’Titãs’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (147, N’Battlestar Galactica’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (148, N’Heroes’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (149, N’Lost’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (150, N’U2′);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (151, N’UB40′);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (152, N’Van Halen’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (153, N’Velvet Revolver’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (154, N’Whitesnake’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (155, N’Zeca Pagodinho’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (156, N’The Office’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (157, N’Dread Zeppelin’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (158, N’Battlestar Galactica (Classic)’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (159, N’Aquaman’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (160, N’Christina Aguilera featuring BigElf’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (161, N’Aerosmith & Sierra Leone”s Refugee Allstars’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (162, N’Los Lonely Boys’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (163, N’Corinne Bailey Rae’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (164, N’Dhani Harrison & Jakob Dylan’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (165, N’Jackson Browne’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (166, N’Avril Lavigne’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (167, N’Big & Rich’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (168, N’Youssou N”Dour’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (169, N’Black Eyed Peas’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (170, N’Jack Johnson’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (171, N’Ben Harper’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (172, N’Snow Patrol’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (173, N’Matisyahu’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (174, N’The Postal Service’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (175, N’Jaguares’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (176, N’The Flaming Lips’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (177, N’Jack”s Mannequin & Mick Fleetwood’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (178, N’Regina Spektor’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (179, N’Scorpions’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (180, N’House Of Pain’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (181, N’Xis’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (182, N’Nega Gizza’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (183, N’Gustavo & Andres Veiga & Salazar’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (184, N’Rodox’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (185, N’Charlie Brown Jr.’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (186, N’Pedro Luís E A Parede’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (187, N’Los Hermanos’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (188, N’Mundo Livre S/A’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (189, N’Otto’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (190, N’Instituto’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (191, N’Nação Zumbi’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (192, N’DJ Dolores & Orchestra Santa Massa’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (193, N’Seu Jorge’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (194, N’Sabotage E Instituto’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (195, N’Stereo Maracana’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (196, N’Cake’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (197, N’Aisha Duo’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (198, N’Habib Koité and Bamada’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (199, N’Karsh Kale’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (200, N’The Posies’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (201, N’Luciana Souza/Romero Lubambo’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (202, N’Aaron Goldberg’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (203, N’Nicolaus Esterhazy Sinfonia’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (204, N’Temple of the Dog’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (205, N’Chris Cornell’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (206, N’Alberto Turco & Nova Schola Gregoriana’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (207, N’Richard Marlow & The Choir of Trinity College, Cambridge’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (208, N’English Concert & Trevor Pinnock’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (209, N’Anne-Sophie Mutter, Herbert Von Karajan & Wiener Philharmoniker’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (210, N’Hilary Hahn, Jeffrey Kahane, Los Angeles Chamber Orchestra & Margaret Batjer’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (211, N’Wilhelm Kempff’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (212, N’Yo-Yo Ma’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (213, N’Scholars Baroque Ensemble’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (214, N’Academy of St. Martin in the Fields & Sir Neville Marriner’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (215, N’Academy of St. Martin in the Fields Chamber Ensemble & Sir Neville Marriner’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (216, N’Berliner Philharmoniker, Claudio Abbado & Sabine Meyer’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (217, N’Royal Philharmonic Orchestra & Sir Thomas Beecham’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (218, N’Orchestre Révolutionnaire et Romantique & John Eliot Gardiner’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (219, N’Britten Sinfonia, Ivor Bolton & Lesley Garrett’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (220, N’Chicago Symphony Chorus, Chicago Symphony Orchestra & Sir Georg Solti’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (221, N’Sir Georg Solti & Wiener Philharmoniker’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (222, N’Academy of St. Martin in the Fields, John Birch, Sir Neville Marriner & Sylvia McNair’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (223, N’London Symphony Orchestra & Sir Charles Mackerras’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (224, N’Barry Wordsworth & BBC Concert Orchestra’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (225, N’Herbert Von Karajan, Mirella Freni & Wiener Philharmoniker’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (226, N’Eugene Ormandy’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (227, N’Luciano Pavarotti’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (228, N’Leonard Bernstein & New York Philharmonic’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (229, N’Boston Symphony Orchestra & Seiji Ozawa’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (230, N’Aaron Copland & London Symphony Orchestra’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (231, N’Ton Koopman’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (232, N’Sergei Prokofiev & Yuri Temirkanov’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (233, N’Chicago Symphony Orchestra & Fritz Reiner’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (234, N’Orchestra of The Age of Enlightenment’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (235, N’Emanuel Ax, Eugene Ormandy & Philadelphia Orchestra’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (236, N’James Levine’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (237, N’Berliner Philharmoniker & Hans Rosbaud’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (238, N’Maurizio Pollini’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (239, N’Academy of St. Martin in the Fields, Sir Neville Marriner & William Bennett’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (240, N’Gustav Mahler’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (241, N’Felix Schmidt, London Symphony Orchestra & Rafael Frühbeck de Burgos’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (242, N’Edo de Waart & San Francisco Symphony’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (243, N’Antal Doráti & London Symphony Orchestra’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (244, N’Choir Of Westminster Abbey & Simon Preston’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (245, N’Michael Tilson Thomas & San Francisco Symphony’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (246, N’Chor der Wiener Staatsoper, Herbert Von Karajan & Wiener Philharmoniker’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (247, N’The King”s Singers’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (248, N’Berliner Philharmoniker & Herbert Von Karajan’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (249, N’Sir Georg Solti, Sumi Jo & Wiener Philharmoniker’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (250, N’Christopher O”Riley’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (251, N’Fretwork’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (252, N’Amy Winehouse’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (253, N’Calexico’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (254, N’Otto Klemperer & Philharmonia Orchestra’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (255, N’Yehudi Menuhin’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (256, N’Philharmonia Orchestra & Sir Neville Marriner’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (257, N’Academy of St. Martin in the Fields, Sir Neville Marriner & Thurston Dart’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (258, N’Les Arts Florissants & William Christie’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (259, N’The 12 Cellists of The Berlin Philharmonic’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (260, N’Adrian Leaper & Doreen de Feis’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (261, N’Roger Norrington, London Classical Players’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (262, N’Charles Dutoit & L’

Data Base Design Project

Data Dictionary

Table Name Column Name Data Type PK or FK FK Referenced Table Description
Parts PartID INT PK Primary Key
Mfg_PartNumber Varchar(100) Part Number provided by Vendor
VendorId INT FK Vendors FK to Vendor Table
WholesaleCost Decimal Wholesale cost from vendor
RetailPrice Decimal Price we charge customers
Vendors VendorId INT PK Primary Key
Name Varchar(100) Vendors Name
Address Varchar(100) Mailing Address
StateCode Char(2) State
ZipCode Char(9) Zip

DATA BASE DESIGN project

Data Dictionary

Table Name Column Name Data Type PK or FK FK Referenced Table Description
Parts PartID INT PK Primary Key
Mfg_PartNumber Varchar(100) Part Number provided by Vendor
VendorId INT FK Vendors FK to Vendor Table
WholesaleCost Decimal Wholesale cost from vendor
RetailPrice Decimal Price we charge customers
Vendors VendorId INT PK Primary Key
Name Varchar(100) Vendors Name
Address Varchar(100) Mailing Address
StateCode Char(2) State
ZipCode Char(9) Zip

Data Base Design Project

USE [master]
GO

/****** Object: Database [AdventureWorks2016] Script Date: 4/5/2022 7:50:15 PM ******/
Drop DATABASE [AdventureWorks2016]
GO
CREATE DATABASE [AdventureWorks2016]

GO

USE [AdventureWorks2016]
IF (1 = FULLTEXTSERVICEPROPERTY(‘IsFullTextInstalled’))
begin
EXEC [AdventureWorks2016].[dbo].[sp_fulltext_database] @action = ‘enable’
end
GO

EXEC [AdventureWorks2016].sys.sp_addextendedproperty @name=N’MS_Description’, @value=N’AdventureWorks 2016 Sample OLTP Database’
GO

USE [master]
GO

ALTER DATABASE [AdventureWorks2016] SET READ_WRITE
GO

USE [AdventureWorks2016]
GO
/****** Object: Schema [HumanResources] Script Date: 4/5/2022 7:49:43 PM ******/
CREATE SCHEMA [HumanResources]
GO
/****** Object: Schema [Person] Script Date: 4/5/2022 7:49:43 PM ******/
CREATE SCHEMA [Person]
GO
/****** Object: Schema [Production] Script Date: 4/5/2022 7:49:43 PM ******/
CREATE SCHEMA [Production]
GO
/****** Object: Schema [Purchasing] Script Date: 4/5/2022 7:49:43 PM ******/
CREATE SCHEMA [Purchasing]
GO
/****** Object: Schema [Sales] Script Date: 4/5/2022 7:49:43 PM ******/
CREATE SCHEMA [Sales]
GO
/****** Object: Table [dbo].[AWBuildVersion] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[AWBuildVersion](
[SystemInformationID] [tinyint] IDENTITY(1,1) NOT NULL,
[Database Version] [nvarchar](25) NOT NULL,
[VersionDate] [datetime] NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_AWBuildVersion_SystemInformationID] PRIMARY KEY CLUSTERED
(
[SystemInformationID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[DatabaseLog] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DatabaseLog](
[DatabaseLogID] [int] IDENTITY(1,1) NOT NULL,
[PostTime] [datetime] NOT NULL,
[DatabaseUser] [sysname] NOT NULL,
[Event] [sysname] NOT NULL,
[Schema] [sysname] NULL,
[Object] [sysname] NULL,
[TSQL] [nvarchar](max) NOT NULL,
[XmlEvent] [xml] NOT NULL,
CONSTRAINT [PK_DatabaseLog_DatabaseLogID] PRIMARY KEY NONCLUSTERED
(
[DatabaseLogID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[ErrorLog] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ErrorLog](
[ErrorLogID] [int] IDENTITY(1,1) NOT NULL,
[ErrorTime] [datetime] NOT NULL,
[UserName] [sysname] NOT NULL,
[ErrorNumber] [int] NOT NULL,
[ErrorSeverity] [int] NULL,
[ErrorState] [int] NULL,
[ErrorProcedure] [nvarchar](126) NULL,
[ErrorLine] [int] NULL,
[ErrorMessage] [nvarchar](4000) NOT NULL,
CONSTRAINT [PK_ErrorLog_ErrorLogID] PRIMARY KEY CLUSTERED
(
[ErrorLogID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [HumanResources].[Department] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HumanResources].[Department](
[DepartmentID] [smallint] IDENTITY(1,1) NOT NULL,
[Name] varchar(100) NOT NULL,
[GroupName] varchar(100) NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Department_DepartmentID] PRIMARY KEY CLUSTERED
(
[DepartmentID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [HumanResources].[Employee] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HumanResources].[Employee](
[BusinessEntityID] [int] NOT NULL,
[NationalIDNumber] [nvarchar](15) NOT NULL,
[LoginID] [nvarchar](256) NOT NULL,
[OrganizationNode] [hierarchyid] NULL,
[OrganizationLevel] AS ([OrganizationNode].[GetLevel]()),
[JobTitle] [nvarchar](50) NOT NULL,
[BirthDate] [date] NOT NULL,
[MaritalStatus] [nchar](1) NOT NULL,
[Gender] [nchar](1) NOT NULL,
[HireDate] [date] NOT NULL,
[SalariedFlag] tinyint NOT NULL,
[VacationHours] [smallint] NOT NULL,
[SickLeaveHours] [smallint] NOT NULL,
[CurrentFlag] tinyint NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Employee_BusinessEntityID] PRIMARY KEY CLUSTERED
(
[BusinessEntityID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [HumanResources].[EmployeeDepartmentHistory] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HumanResources].[EmployeeDepartmentHistory](
[BusinessEntityID] [int] NOT NULL,
[DepartmentID] [smallint] NOT NULL,
[ShiftID] [tinyint] NOT NULL,
[StartDate] [date] NOT NULL,
[EndDate] [date] NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_EmployeeDepartmentHistory_BusinessEntityID_StartDate_DepartmentID] PRIMARY KEY CLUSTERED
(
[BusinessEntityID] ASC,
[StartDate] ASC,
[DepartmentID] ASC,
[ShiftID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [HumanResources].[EmployeePayHistory] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HumanResources].[EmployeePayHistory](
[BusinessEntityID] [int] NOT NULL,
[RateChangeDate] [datetime] NOT NULL,
[Rate] [money] NOT NULL,
[PayFrequency] [tinyint] NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_EmployeePayHistory_BusinessEntityID_RateChangeDate] PRIMARY KEY CLUSTERED
(
[BusinessEntityID] ASC,
[RateChangeDate] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [HumanResources].[JobCandidate] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HumanResources].[JobCandidate](
[JobCandidateID] [int] IDENTITY(1,1) NOT NULL,
[BusinessEntityID] [int] NULL,
— [Resume] [xml](CONTENT [HumanResources].[HRResumeSchemaCollection]) NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_JobCandidate_JobCandidateID] PRIMARY KEY CLUSTERED
(
[JobCandidateID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [HumanResources].[Shift] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HumanResources].[Shift](
[ShiftID] [tinyint] IDENTITY(1,1) NOT NULL,
[Name] varchar(100) NOT NULL,
[StartTime] [time](7) NOT NULL,
[EndTime] [time](7) NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Shift_ShiftID] PRIMARY KEY CLUSTERED
(
[ShiftID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[Address] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[Address](
[AddressID] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
[AddressLine1] [nvarchar](60) NOT NULL,
[AddressLine2] [nvarchar](60) NULL,
[City] [nvarchar](30) NOT NULL,
[StateProvinceID] [int] NOT NULL,
[PostalCode] [nvarchar](15) NOT NULL,
[SpatialLocation] [geography] NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Address_AddressID] PRIMARY KEY CLUSTERED
(
[AddressID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [Person].[AddressType] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[AddressType](
[AddressTypeID] [int] IDENTITY(1,1) NOT NULL,
[Name] varchar(100) NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_AddressType_AddressTypeID] PRIMARY KEY CLUSTERED
(
[AddressTypeID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[BusinessEntity] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[BusinessEntity](
[BusinessEntityID] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_BusinessEntity_BusinessEntityID] PRIMARY KEY CLUSTERED
(
[BusinessEntityID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[BusinessEntityAddress] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[BusinessEntityAddress](
[BusinessEntityID] [int] NOT NULL,
[AddressID] [int] NOT NULL,
[AddressTypeID] [int] NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_BusinessEntityAddress_BusinessEntityID_AddressID_AddressTypeID] PRIMARY KEY CLUSTERED
(
[BusinessEntityID] ASC,
[AddressID] ASC,
[AddressTypeID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[BusinessEntityContact] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[BusinessEntityContact](
[BusinessEntityID] [int] NOT NULL,
[PersonID] [int] NOT NULL,
[ContactTypeID] [int] NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_BusinessEntityContact_BusinessEntityID_PersonID_ContactTypeID] PRIMARY KEY CLUSTERED
(
[BusinessEntityID] ASC,
[PersonID] ASC,
[ContactTypeID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[ContactType] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[ContactType](
[ContactTypeID] [int] IDENTITY(1,1) NOT NULL,
[Name] varchar(100) NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ContactType_ContactTypeID] PRIMARY KEY CLUSTERED
(
[ContactTypeID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[CountryRegion] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[CountryRegion](
[CountryRegionCode] [nvarchar](3) NOT NULL,
[Name] varchar(100) NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_CountryRegion_CountryRegionCode] PRIMARY KEY CLUSTERED
(
[CountryRegionCode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[EmailAddress] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[EmailAddress](
[BusinessEntityID] [int] NOT NULL,
[EmailAddressID] [int] IDENTITY(1,1) NOT NULL,
[EmailAddress] [nvarchar](50) NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_EmailAddress_BusinessEntityID_EmailAddressID] PRIMARY KEY CLUSTERED
(
[BusinessEntityID] ASC,
[EmailAddressID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[Password] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[Password](
[BusinessEntityID] [int] NOT NULL,
[PasswordHash] [varchar](128) NOT NULL,
[PasswordSalt] [varchar](10) NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Password_BusinessEntityID] PRIMARY KEY CLUSTERED
(
[BusinessEntityID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[Person] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[Person](
[BusinessEntityID] [int] NOT NULL,
[PersonType] [nchar](2) NOT NULL,
[NameStyle] varchar(20) NOT NULL,
[Title] [nvarchar](8) NULL,
[FirstName] varchar(100) NOT NULL,
[MiddleName] varchar(100) NULL,
[LastName] varchar(100) NOT NULL,
[Suffix] [nvarchar](10) NULL,
[EmailPromotion] [int] NOT NULL,
— [AdditionalContactInfo] [xml](CONTENT [Person].[AdditionalContactInfoSchemaCollection]) NULL,
— [Demographics] [xml](CONTENT [Person].[IndividualSurveySchemaCollection]) NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Person_BusinessEntityID] PRIMARY KEY CLUSTERED
(
[BusinessEntityID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[PersonPhone] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[PersonPhone](
[BusinessEntityID] [int] NOT NULL,
[PhoneNumber] varchar(20) NOT NULL,
[PhoneNumberTypeID] [int] NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_PersonPhone_BusinessEntityID_PhoneNumber_PhoneNumberTypeID] PRIMARY KEY CLUSTERED
(
[BusinessEntityID] ASC,
[PhoneNumber] ASC,
[PhoneNumberTypeID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[PhoneNumberType] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[PhoneNumberType](
[PhoneNumberTypeID] [int] IDENTITY(1,1) NOT NULL,
[Name] varchar(100) NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_PhoneNumberType_PhoneNumberTypeID] PRIMARY KEY CLUSTERED
(
[PhoneNumberTypeID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[StateProvince] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[StateProvince](
[StateProvinceID] [int] IDENTITY(1,1) NOT NULL,
[StateProvinceCode] [nchar](3) NOT NULL,
[CountryRegionCode] [nvarchar](3) NOT NULL,
[IsOnlyStateProvinceFlag] tinyint NOT NULL,
[Name] varchar(100) NOT NULL,
[TerritoryID] [int] NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_StateProvince_StateProvinceID] PRIMARY KEY CLUSTERED
(
[StateProvinceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[BillOfMaterials] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[BillOfMaterials](
[BillOfMaterialsID] [int] IDENTITY(1,1) NOT NULL,
[ProductAssemblyID] [int] NULL,
[ComponentID] [int] NOT NULL,
[StartDate] [datetime] NOT NULL,
[EndDate] [datetime] NULL,
[UnitMeasureCode] [nchar](3) NOT NULL,
[BOMLevel] [smallint] NOT NULL,
[PerAssemblyQty] [decimal](8, 2) NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_BillOfMaterials_BillOfMaterialsID] PRIMARY KEY NONCLUSTERED
(
[BillOfMaterialsID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[Culture] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[Culture](
[CultureID] [nchar](6) NOT NULL,
[Name] varchar(100) NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Culture_CultureID] PRIMARY KEY CLUSTERED
(
[CultureID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[Document] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[Document](
[DocumentNode] [hierarchyid] NOT NULL,
[DocumentLevel] AS ([DocumentNode].[GetLevel]()),
[Title] [nvarchar](50) NOT NULL,
[Owner] [int] NOT NULL,
[FolderFlag] [bit] NOT NULL,
[FileName] [nvarchar](400) NOT NULL,
[FileExtension] [nvarchar](8) NOT NULL,
[Revision] [nchar](5) NOT NULL,
[ChangeNumber] [int] NOT NULL,
[Status] [tinyint] NOT NULL,
[DocumentSummary] [nvarchar](max) NULL,
[Document] [varbinary](max) NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Document_DocumentNode] PRIMARY KEY CLUSTERED
(
[DocumentNode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY],
UNIQUE NONCLUSTERED
(
[rowguid] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [Production].[Illustration] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[Illustration](
[IllustrationID] [int] IDENTITY(1,1) NOT NULL,
[Diagram] [xml] NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Illustration_IllustrationID] PRIMARY KEY CLUSTERED
(
[IllustrationID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [Production].[Location] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[Location](
[LocationID] [smallint] IDENTITY(1,1) NOT NULL,
[Name] varchar(100) NOT NULL,
[CostRate] [smallmoney] NOT NULL,
[Availability] [decimal](8, 2) NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Location_LocationID] PRIMARY KEY CLUSTERED
(
[LocationID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[Product] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[Product](
[ProductID] [int] IDENTITY(1,1) NOT NULL,
[Name] varchar(100) NOT NULL,
[ProductNumber] [nvarchar](25) NOT NULL,
[MakeFlag] tinyint NOT NULL,
[FinishedGoodsFlag] tinyint NOT NULL,
[Color] [nvarchar](15) NULL,
[SafetyStockLevel] [smallint] NOT NULL,
[ReorderPoint] [smallint] NOT NULL,
[StandardCost] [money] NOT NULL,
[ListPrice] [money] NOT NULL,
[Size] [nvarchar](5) NULL,
[SizeUnitMeasureCode] [nchar](3) NULL,
[WeightUnitMeasureCode] [nchar](3) NULL,
[Weight] [decimal](8, 2) NULL,
[DaysToManufacture] [int] NOT NULL,
[ProductLine] [nchar](2) NULL,
[Class] [nchar](2) NULL,
[Style] [nchar](2) NULL,
[ProductSubcategoryID] [int] NULL,
[ProductModelID] [int] NULL,
[SellStartDate] [datetime] NOT NULL,
[SellEndDate] [datetime] NULL,
[DiscontinuedDate] [datetime] NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Product_ProductID] PRIMARY KEY CLUSTERED
(
[ProductID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductCategory] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductCategory](
[ProductCategoryID] [int] IDENTITY(1,1) NOT NULL,
[Name] varchar(100) NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductCategory_ProductCategoryID] PRIMARY KEY CLUSTERED
(
[ProductCategoryID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductCostHistory] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductCostHistory](
[ProductID] [int] NOT NULL,
[StartDate] [datetime] NOT NULL,
[EndDate] [datetime] NULL,
[StandardCost] [money] NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductCostHistory_ProductID_StartDate] PRIMARY KEY CLUSTERED
(
[ProductID] ASC,
[StartDate] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductDescription] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductDescription](
[ProductDescriptionID] [int] IDENTITY(1,1) NOT NULL,
[Description] [nvarchar](400) NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductDescription_ProductDescriptionID] PRIMARY KEY CLUSTERED
(
[ProductDescriptionID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductDocument] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductDocument](
[ProductID] [int] NOT NULL,
[DocumentNode] [hierarchyid] NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductDocument_ProductID_DocumentNode] PRIMARY KEY CLUSTERED
(
[ProductID] ASC,
[DocumentNode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductInventory] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductInventory](
[ProductID] [int] NOT NULL,
[LocationID] [smallint] NOT NULL,
[Shelf] [nvarchar](10) NOT NULL,
[Bin] [tinyint] NOT NULL,
[Quantity] [smallint] NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductInventory_ProductID_LocationID] PRIMARY KEY CLUSTERED
(
[ProductID] ASC,
[LocationID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductListPriceHistory] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductListPriceHistory](
[ProductID] [int] NOT NULL,
[StartDate] [datetime] NOT NULL,
[EndDate] [datetime] NULL,
[ListPrice] [money] NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductListPriceHistory_ProductID_StartDate] PRIMARY KEY CLUSTERED
(
[ProductID] ASC,
[StartDate] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductModel] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductModel](
[ProductModelID] [int] IDENTITY(1,1) NOT NULL,
[Name] varchar(100) NOT NULL,
— [CatalogDescription] [xml](CONTENT [Production].[ProductDescriptionSchemaCollection]) NULL,
— [Instructions] [xml](CONTENT [Production].[ManuInstructionsSchemaCollection]) NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductModel_ProductModelID] PRIMARY KEY CLUSTERED
(
[ProductModelID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductModelIllustration] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductModelIllustration](
[ProductModelID] [int] NOT NULL,
[IllustrationID] [int] NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductModelIllustration_ProductModelID_IllustrationID] PRIMARY KEY CLUSTERED
(
[ProductModelID] ASC,
[IllustrationID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductModelProductDescriptionCulture] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductModelProductDescriptionCulture](
[ProductModelID] [int] NOT NULL,
[ProductDescriptionID] [int] NOT NULL,
[CultureID] [nchar](6) NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductModelProductDescriptionCulture_ProductModelID_ProductDescriptionID_CultureID] PRIMARY KEY CLUSTERED
(
[ProductModelID] ASC,
[ProductDescriptionID] ASC,
[CultureID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductPhoto] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductPhoto](
[ProductPhotoID] [int] IDENTITY(1,1) NOT NULL,
[ThumbNailPhoto] [varbinary](max) NULL,
[ThumbnailPhotoFileName] [nvarchar](50) NULL,
[LargePhoto] [varbinary](max) NULL,
[LargePhotoFileName] [nvarchar](50) NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductPhoto_ProductPhotoID] PRIMARY KEY CLUSTERED
(
[ProductPhotoID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductProductPhoto] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductProductPhoto](
[ProductID] [int] NOT NULL,
[ProductPhotoID] [int] NOT NULL,
[Primary] tinyint NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductProductPhoto_ProductID_ProductPhotoID] PRIMARY KEY NONCLUSTERED
(
[ProductID] ASC,
[ProductPhotoID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductReview] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductReview](
[ProductReviewID] [int] IDENTITY(1,1) NOT NULL,
[ProductID] [int] NOT NULL,
[ReviewerName] varchar(100) NOT NULL,
[ReviewDate] [datetime] NOT NULL,
[EmailAddress] [nvarchar](50) NOT NULL,
[Rating] [int] NOT NULL,
[Comments] [nvarchar](3850) NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductReview_ProductReviewID] PRIMARY KEY CLUSTERED
(
[ProductReviewID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductSubcategory] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductSubcategory](
[ProductSubcategoryID] [int] IDENTITY(1,1) NOT NULL,
[ProductCategoryID] [int] NOT NULL,
[Name] varchar(100) NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductSubcategory_ProductSubcategoryID] PRIMARY KEY CLUSTERED
(
[ProductSubcategoryID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ScrapReason] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ScrapReason](
[ScrapReasonID] [smallint] IDENTITY(1,1) NOT NULL,
[Name] varchar(100) NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ScrapReason_ScrapReasonID] PRIMARY KEY CLUSTERED
(
[ScrapReasonID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[TransactionHistory] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[TransactionHistory](
[TransactionID] [int] IDENTITY(100000,1) NOT NULL,
[ProductID] [int] NOT NULL,
[ReferenceOrderID] [int] NOT NULL,
[ReferenceOrderLineID] [int] NOT NULL,
[TransactionDate] [datetime] NOT NULL,
[TransactionType] [nchar](1) NOT NULL,
[Quantity] [int] NOT NULL,
[ActualCost] [money] NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_TransactionHistory_TransactionID] PRIMARY KEY CLUSTERED
(
[TransactionID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[TransactionHistoryArchive] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[TransactionHistoryArchive](
[TransactionID] [int] NOT NULL,
[ProductID] [int] NOT NULL,
[ReferenceOrderID] [

DATA BASE DESIGN project

USE [master]
GO

/****** Object: Database [AdventureWorks2016] Script Date: 4/5/2022 7:50:15 PM ******/
Drop DATABASE [AdventureWorks2016]
GO
CREATE DATABASE [AdventureWorks2016]

GO

USE [AdventureWorks2016]
IF (1 = FULLTEXTSERVICEPROPERTY(‘IsFullTextInstalled’))
begin
EXEC [AdventureWorks2016].[dbo].[sp_fulltext_database] @action = ‘enable’
end
GO

EXEC [AdventureWorks2016].sys.sp_addextendedproperty @name=N’MS_Description’, @value=N’AdventureWorks 2016 Sample OLTP Database’
GO

USE [master]
GO

ALTER DATABASE [AdventureWorks2016] SET READ_WRITE
GO

USE [AdventureWorks2016]
GO
/****** Object: Schema [HumanResources] Script Date: 4/5/2022 7:49:43 PM ******/
CREATE SCHEMA [HumanResources]
GO
/****** Object: Schema [Person] Script Date: 4/5/2022 7:49:43 PM ******/
CREATE SCHEMA [Person]
GO
/****** Object: Schema [Production] Script Date: 4/5/2022 7:49:43 PM ******/
CREATE SCHEMA [Production]
GO
/****** Object: Schema [Purchasing] Script Date: 4/5/2022 7:49:43 PM ******/
CREATE SCHEMA [Purchasing]
GO
/****** Object: Schema [Sales] Script Date: 4/5/2022 7:49:43 PM ******/
CREATE SCHEMA [Sales]
GO
/****** Object: Table [dbo].[AWBuildVersion] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[AWBuildVersion](
[SystemInformationID] [tinyint] IDENTITY(1,1) NOT NULL,
[Database Version] [nvarchar](25) NOT NULL,
[VersionDate] [datetime] NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_AWBuildVersion_SystemInformationID] PRIMARY KEY CLUSTERED
(
[SystemInformationID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[DatabaseLog] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DatabaseLog](
[DatabaseLogID] [int] IDENTITY(1,1) NOT NULL,
[PostTime] [datetime] NOT NULL,
[DatabaseUser] [sysname] NOT NULL,
[Event] [sysname] NOT NULL,
[Schema] [sysname] NULL,
[Object] [sysname] NULL,
[TSQL] [nvarchar](max) NOT NULL,
[XmlEvent] [xml] NOT NULL,
CONSTRAINT [PK_DatabaseLog_DatabaseLogID] PRIMARY KEY NONCLUSTERED
(
[DatabaseLogID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [dbo].[ErrorLog] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ErrorLog](
[ErrorLogID] [int] IDENTITY(1,1) NOT NULL,
[ErrorTime] [datetime] NOT NULL,
[UserName] [sysname] NOT NULL,
[ErrorNumber] [int] NOT NULL,
[ErrorSeverity] [int] NULL,
[ErrorState] [int] NULL,
[ErrorProcedure] [nvarchar](126) NULL,
[ErrorLine] [int] NULL,
[ErrorMessage] [nvarchar](4000) NOT NULL,
CONSTRAINT [PK_ErrorLog_ErrorLogID] PRIMARY KEY CLUSTERED
(
[ErrorLogID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [HumanResources].[Department] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HumanResources].[Department](
[DepartmentID] [smallint] IDENTITY(1,1) NOT NULL,
[Name] varchar(100) NOT NULL,
[GroupName] varchar(100) NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Department_DepartmentID] PRIMARY KEY CLUSTERED
(
[DepartmentID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [HumanResources].[Employee] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HumanResources].[Employee](
[BusinessEntityID] [int] NOT NULL,
[NationalIDNumber] [nvarchar](15) NOT NULL,
[LoginID] [nvarchar](256) NOT NULL,
[OrganizationNode] [hierarchyid] NULL,
[OrganizationLevel] AS ([OrganizationNode].[GetLevel]()),
[JobTitle] [nvarchar](50) NOT NULL,
[BirthDate] [date] NOT NULL,
[MaritalStatus] [nchar](1) NOT NULL,
[Gender] [nchar](1) NOT NULL,
[HireDate] [date] NOT NULL,
[SalariedFlag] tinyint NOT NULL,
[VacationHours] [smallint] NOT NULL,
[SickLeaveHours] [smallint] NOT NULL,
[CurrentFlag] tinyint NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Employee_BusinessEntityID] PRIMARY KEY CLUSTERED
(
[BusinessEntityID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [HumanResources].[EmployeeDepartmentHistory] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HumanResources].[EmployeeDepartmentHistory](
[BusinessEntityID] [int] NOT NULL,
[DepartmentID] [smallint] NOT NULL,
[ShiftID] [tinyint] NOT NULL,
[StartDate] [date] NOT NULL,
[EndDate] [date] NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_EmployeeDepartmentHistory_BusinessEntityID_StartDate_DepartmentID] PRIMARY KEY CLUSTERED
(
[BusinessEntityID] ASC,
[StartDate] ASC,
[DepartmentID] ASC,
[ShiftID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [HumanResources].[EmployeePayHistory] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HumanResources].[EmployeePayHistory](
[BusinessEntityID] [int] NOT NULL,
[RateChangeDate] [datetime] NOT NULL,
[Rate] [money] NOT NULL,
[PayFrequency] [tinyint] NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_EmployeePayHistory_BusinessEntityID_RateChangeDate] PRIMARY KEY CLUSTERED
(
[BusinessEntityID] ASC,
[RateChangeDate] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [HumanResources].[JobCandidate] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HumanResources].[JobCandidate](
[JobCandidateID] [int] IDENTITY(1,1) NOT NULL,
[BusinessEntityID] [int] NULL,
— [Resume] [xml](CONTENT [HumanResources].[HRResumeSchemaCollection]) NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_JobCandidate_JobCandidateID] PRIMARY KEY CLUSTERED
(
[JobCandidateID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [HumanResources].[Shift] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [HumanResources].[Shift](
[ShiftID] [tinyint] IDENTITY(1,1) NOT NULL,
[Name] varchar(100) NOT NULL,
[StartTime] [time](7) NOT NULL,
[EndTime] [time](7) NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Shift_ShiftID] PRIMARY KEY CLUSTERED
(
[ShiftID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[Address] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[Address](
[AddressID] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
[AddressLine1] [nvarchar](60) NOT NULL,
[AddressLine2] [nvarchar](60) NULL,
[City] [nvarchar](30) NOT NULL,
[StateProvinceID] [int] NOT NULL,
[PostalCode] [nvarchar](15) NOT NULL,
[SpatialLocation] [geography] NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Address_AddressID] PRIMARY KEY CLUSTERED
(
[AddressID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [Person].[AddressType] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[AddressType](
[AddressTypeID] [int] IDENTITY(1,1) NOT NULL,
[Name] varchar(100) NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_AddressType_AddressTypeID] PRIMARY KEY CLUSTERED
(
[AddressTypeID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[BusinessEntity] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[BusinessEntity](
[BusinessEntityID] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_BusinessEntity_BusinessEntityID] PRIMARY KEY CLUSTERED
(
[BusinessEntityID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[BusinessEntityAddress] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[BusinessEntityAddress](
[BusinessEntityID] [int] NOT NULL,
[AddressID] [int] NOT NULL,
[AddressTypeID] [int] NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_BusinessEntityAddress_BusinessEntityID_AddressID_AddressTypeID] PRIMARY KEY CLUSTERED
(
[BusinessEntityID] ASC,
[AddressID] ASC,
[AddressTypeID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[BusinessEntityContact] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[BusinessEntityContact](
[BusinessEntityID] [int] NOT NULL,
[PersonID] [int] NOT NULL,
[ContactTypeID] [int] NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_BusinessEntityContact_BusinessEntityID_PersonID_ContactTypeID] PRIMARY KEY CLUSTERED
(
[BusinessEntityID] ASC,
[PersonID] ASC,
[ContactTypeID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[ContactType] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[ContactType](
[ContactTypeID] [int] IDENTITY(1,1) NOT NULL,
[Name] varchar(100) NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ContactType_ContactTypeID] PRIMARY KEY CLUSTERED
(
[ContactTypeID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[CountryRegion] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[CountryRegion](
[CountryRegionCode] [nvarchar](3) NOT NULL,
[Name] varchar(100) NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_CountryRegion_CountryRegionCode] PRIMARY KEY CLUSTERED
(
[CountryRegionCode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[EmailAddress] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[EmailAddress](
[BusinessEntityID] [int] NOT NULL,
[EmailAddressID] [int] IDENTITY(1,1) NOT NULL,
[EmailAddress] [nvarchar](50) NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_EmailAddress_BusinessEntityID_EmailAddressID] PRIMARY KEY CLUSTERED
(
[BusinessEntityID] ASC,
[EmailAddressID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[Password] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[Password](
[BusinessEntityID] [int] NOT NULL,
[PasswordHash] [varchar](128) NOT NULL,
[PasswordSalt] [varchar](10) NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Password_BusinessEntityID] PRIMARY KEY CLUSTERED
(
[BusinessEntityID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[Person] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[Person](
[BusinessEntityID] [int] NOT NULL,
[PersonType] [nchar](2) NOT NULL,
[NameStyle] varchar(20) NOT NULL,
[Title] [nvarchar](8) NULL,
[FirstName] varchar(100) NOT NULL,
[MiddleName] varchar(100) NULL,
[LastName] varchar(100) NOT NULL,
[Suffix] [nvarchar](10) NULL,
[EmailPromotion] [int] NOT NULL,
— [AdditionalContactInfo] [xml](CONTENT [Person].[AdditionalContactInfoSchemaCollection]) NULL,
— [Demographics] [xml](CONTENT [Person].[IndividualSurveySchemaCollection]) NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Person_BusinessEntityID] PRIMARY KEY CLUSTERED
(
[BusinessEntityID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[PersonPhone] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[PersonPhone](
[BusinessEntityID] [int] NOT NULL,
[PhoneNumber] varchar(20) NOT NULL,
[PhoneNumberTypeID] [int] NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_PersonPhone_BusinessEntityID_PhoneNumber_PhoneNumberTypeID] PRIMARY KEY CLUSTERED
(
[BusinessEntityID] ASC,
[PhoneNumber] ASC,
[PhoneNumberTypeID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[PhoneNumberType] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[PhoneNumberType](
[PhoneNumberTypeID] [int] IDENTITY(1,1) NOT NULL,
[Name] varchar(100) NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_PhoneNumberType_PhoneNumberTypeID] PRIMARY KEY CLUSTERED
(
[PhoneNumberTypeID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Person].[StateProvince] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Person].[StateProvince](
[StateProvinceID] [int] IDENTITY(1,1) NOT NULL,
[StateProvinceCode] [nchar](3) NOT NULL,
[CountryRegionCode] [nvarchar](3) NOT NULL,
[IsOnlyStateProvinceFlag] tinyint NOT NULL,
[Name] varchar(100) NOT NULL,
[TerritoryID] [int] NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_StateProvince_StateProvinceID] PRIMARY KEY CLUSTERED
(
[StateProvinceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[BillOfMaterials] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[BillOfMaterials](
[BillOfMaterialsID] [int] IDENTITY(1,1) NOT NULL,
[ProductAssemblyID] [int] NULL,
[ComponentID] [int] NOT NULL,
[StartDate] [datetime] NOT NULL,
[EndDate] [datetime] NULL,
[UnitMeasureCode] [nchar](3) NOT NULL,
[BOMLevel] [smallint] NOT NULL,
[PerAssemblyQty] [decimal](8, 2) NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_BillOfMaterials_BillOfMaterialsID] PRIMARY KEY NONCLUSTERED
(
[BillOfMaterialsID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[Culture] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[Culture](
[CultureID] [nchar](6) NOT NULL,
[Name] varchar(100) NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Culture_CultureID] PRIMARY KEY CLUSTERED
(
[CultureID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[Document] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[Document](
[DocumentNode] [hierarchyid] NOT NULL,
[DocumentLevel] AS ([DocumentNode].[GetLevel]()),
[Title] [nvarchar](50) NOT NULL,
[Owner] [int] NOT NULL,
[FolderFlag] [bit] NOT NULL,
[FileName] [nvarchar](400) NOT NULL,
[FileExtension] [nvarchar](8) NOT NULL,
[Revision] [nchar](5) NOT NULL,
[ChangeNumber] [int] NOT NULL,
[Status] [tinyint] NOT NULL,
[DocumentSummary] [nvarchar](max) NULL,
[Document] [varbinary](max) NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Document_DocumentNode] PRIMARY KEY CLUSTERED
(
[DocumentNode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY],
UNIQUE NONCLUSTERED
(
[rowguid] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [Production].[Illustration] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[Illustration](
[IllustrationID] [int] IDENTITY(1,1) NOT NULL,
[Diagram] [xml] NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Illustration_IllustrationID] PRIMARY KEY CLUSTERED
(
[IllustrationID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [Production].[Location] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[Location](
[LocationID] [smallint] IDENTITY(1,1) NOT NULL,
[Name] varchar(100) NOT NULL,
[CostRate] [smallmoney] NOT NULL,
[Availability] [decimal](8, 2) NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Location_LocationID] PRIMARY KEY CLUSTERED
(
[LocationID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[Product] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[Product](
[ProductID] [int] IDENTITY(1,1) NOT NULL,
[Name] varchar(100) NOT NULL,
[ProductNumber] [nvarchar](25) NOT NULL,
[MakeFlag] tinyint NOT NULL,
[FinishedGoodsFlag] tinyint NOT NULL,
[Color] [nvarchar](15) NULL,
[SafetyStockLevel] [smallint] NOT NULL,
[ReorderPoint] [smallint] NOT NULL,
[StandardCost] [money] NOT NULL,
[ListPrice] [money] NOT NULL,
[Size] [nvarchar](5) NULL,
[SizeUnitMeasureCode] [nchar](3) NULL,
[WeightUnitMeasureCode] [nchar](3) NULL,
[Weight] [decimal](8, 2) NULL,
[DaysToManufacture] [int] NOT NULL,
[ProductLine] [nchar](2) NULL,
[Class] [nchar](2) NULL,
[Style] [nchar](2) NULL,
[ProductSubcategoryID] [int] NULL,
[ProductModelID] [int] NULL,
[SellStartDate] [datetime] NOT NULL,
[SellEndDate] [datetime] NULL,
[DiscontinuedDate] [datetime] NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_Product_ProductID] PRIMARY KEY CLUSTERED
(
[ProductID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductCategory] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductCategory](
[ProductCategoryID] [int] IDENTITY(1,1) NOT NULL,
[Name] varchar(100) NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductCategory_ProductCategoryID] PRIMARY KEY CLUSTERED
(
[ProductCategoryID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductCostHistory] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductCostHistory](
[ProductID] [int] NOT NULL,
[StartDate] [datetime] NOT NULL,
[EndDate] [datetime] NULL,
[StandardCost] [money] NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductCostHistory_ProductID_StartDate] PRIMARY KEY CLUSTERED
(
[ProductID] ASC,
[StartDate] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductDescription] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductDescription](
[ProductDescriptionID] [int] IDENTITY(1,1) NOT NULL,
[Description] [nvarchar](400) NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductDescription_ProductDescriptionID] PRIMARY KEY CLUSTERED
(
[ProductDescriptionID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductDocument] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductDocument](
[ProductID] [int] NOT NULL,
[DocumentNode] [hierarchyid] NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductDocument_ProductID_DocumentNode] PRIMARY KEY CLUSTERED
(
[ProductID] ASC,
[DocumentNode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductInventory] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductInventory](
[ProductID] [int] NOT NULL,
[LocationID] [smallint] NOT NULL,
[Shelf] [nvarchar](10) NOT NULL,
[Bin] [tinyint] NOT NULL,
[Quantity] [smallint] NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductInventory_ProductID_LocationID] PRIMARY KEY CLUSTERED
(
[ProductID] ASC,
[LocationID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductListPriceHistory] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductListPriceHistory](
[ProductID] [int] NOT NULL,
[StartDate] [datetime] NOT NULL,
[EndDate] [datetime] NULL,
[ListPrice] [money] NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductListPriceHistory_ProductID_StartDate] PRIMARY KEY CLUSTERED
(
[ProductID] ASC,
[StartDate] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductModel] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductModel](
[ProductModelID] [int] IDENTITY(1,1) NOT NULL,
[Name] varchar(100) NOT NULL,
— [CatalogDescription] [xml](CONTENT [Production].[ProductDescriptionSchemaCollection]) NULL,
— [Instructions] [xml](CONTENT [Production].[ManuInstructionsSchemaCollection]) NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductModel_ProductModelID] PRIMARY KEY CLUSTERED
(
[ProductModelID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductModelIllustration] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductModelIllustration](
[ProductModelID] [int] NOT NULL,
[IllustrationID] [int] NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductModelIllustration_ProductModelID_IllustrationID] PRIMARY KEY CLUSTERED
(
[ProductModelID] ASC,
[IllustrationID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductModelProductDescriptionCulture] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductModelProductDescriptionCulture](
[ProductModelID] [int] NOT NULL,
[ProductDescriptionID] [int] NOT NULL,
[CultureID] [nchar](6) NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductModelProductDescriptionCulture_ProductModelID_ProductDescriptionID_CultureID] PRIMARY KEY CLUSTERED
(
[ProductModelID] ASC,
[ProductDescriptionID] ASC,
[CultureID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductPhoto] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductPhoto](
[ProductPhotoID] [int] IDENTITY(1,1) NOT NULL,
[ThumbNailPhoto] [varbinary](max) NULL,
[ThumbnailPhotoFileName] [nvarchar](50) NULL,
[LargePhoto] [varbinary](max) NULL,
[LargePhotoFileName] [nvarchar](50) NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductPhoto_ProductPhotoID] PRIMARY KEY CLUSTERED
(
[ProductPhotoID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductProductPhoto] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductProductPhoto](
[ProductID] [int] NOT NULL,
[ProductPhotoID] [int] NOT NULL,
[Primary] tinyint NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductProductPhoto_ProductID_ProductPhotoID] PRIMARY KEY NONCLUSTERED
(
[ProductID] ASC,
[ProductPhotoID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductReview] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductReview](
[ProductReviewID] [int] IDENTITY(1,1) NOT NULL,
[ProductID] [int] NOT NULL,
[ReviewerName] varchar(100) NOT NULL,
[ReviewDate] [datetime] NOT NULL,
[EmailAddress] [nvarchar](50) NOT NULL,
[Rating] [int] NOT NULL,
[Comments] [nvarchar](3850) NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductReview_ProductReviewID] PRIMARY KEY CLUSTERED
(
[ProductReviewID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ProductSubcategory] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ProductSubcategory](
[ProductSubcategoryID] [int] IDENTITY(1,1) NOT NULL,
[ProductCategoryID] [int] NOT NULL,
[Name] varchar(100) NOT NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ProductSubcategory_ProductSubcategoryID] PRIMARY KEY CLUSTERED
(
[ProductSubcategoryID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[ScrapReason] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[ScrapReason](
[ScrapReasonID] [smallint] IDENTITY(1,1) NOT NULL,
[Name] varchar(100) NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_ScrapReason_ScrapReasonID] PRIMARY KEY CLUSTERED
(
[ScrapReasonID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[TransactionHistory] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[TransactionHistory](
[TransactionID] [int] IDENTITY(100000,1) NOT NULL,
[ProductID] [int] NOT NULL,
[ReferenceOrderID] [int] NOT NULL,
[ReferenceOrderLineID] [int] NOT NULL,
[TransactionDate] [datetime] NOT NULL,
[TransactionType] [nchar](1) NOT NULL,
[Quantity] [int] NOT NULL,
[ActualCost] [money] NOT NULL,
[ModifiedDate] [datetime] NOT NULL,
CONSTRAINT [PK_TransactionHistory_TransactionID] PRIMARY KEY CLUSTERED
(
[TransactionID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [Production].[TransactionHistoryArchive] Script Date: 4/5/2022 7:49:43 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [Production].[TransactionHistoryArchive](
[TransactionID] [int] NOT NULL,
[ProductID] [int] NOT NULL,
[ReferenceOrderID] [

Data Base Design Project

/*******************************************************************************
Chinook Database – Version 1.4
Script: Chinook_SqlServer.sql
Description: Creates and populates the Chinook database.
DB Server: SqlServer
Author: Luis Rocha
License: http://www.codeplex.com/ChinookDatabase/license
********************************************************************************/

/*******************************************************************************
Drop database if it exists
********************************************************************************/
IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N’Chinook’)
BEGIN
ALTER DATABASE [Chinook] SET OFFLINE WITH ROLLBACK IMMEDIATE;
ALTER DATABASE [Chinook] SET ONLINE;
DROP DATABASE [Chinook];
END

GO

/*******************************************************************************
Create database
********************************************************************************/
CREATE DATABASE [Chinook];
GO

USE [Chinook];
GO

/*******************************************************************************
Create Tables
********************************************************************************/
CREATE TABLE [dbo].[Album]
(
[AlbumId] INT NOT NULL,
[Title] NVARCHAR(160) NOT NULL,
[ArtistId] INT NOT NULL,
CONSTRAINT [PK_Album] PRIMARY KEY CLUSTERED ([AlbumId])
);
GO
CREATE TABLE [dbo].[Artist]
(
[ArtistId] INT NOT NULL,
[Name] NVARCHAR(120),
CONSTRAINT [PK_Artist] PRIMARY KEY CLUSTERED ([ArtistId])
);
GO
CREATE TABLE [dbo].[Customer]
(
[CustomerId] INT NOT NULL,
[FirstName] NVARCHAR(40) NOT NULL,
[LastName] NVARCHAR(20) NOT NULL,
[Company] NVARCHAR(80),
[Address] NVARCHAR(70),
[City] NVARCHAR(40),
[State] NVARCHAR(40),
[Country] NVARCHAR(40),
[PostalCode] NVARCHAR(10),
[Phone] NVARCHAR(24),
[Fax] NVARCHAR(24),
[Email] NVARCHAR(60) NOT NULL,
[SupportRepId] INT,
CONSTRAINT [PK_Customer] PRIMARY KEY CLUSTERED ([CustomerId])
);
GO
CREATE TABLE [dbo].[Employee]
(
[EmployeeId] INT NOT NULL,
[LastName] NVARCHAR(20) NOT NULL,
[FirstName] NVARCHAR(20) NOT NULL,
[Title] NVARCHAR(30),
[ReportsTo] INT,
[BirthDate] DATETIME,
[HireDate] DATETIME,
[Address] NVARCHAR(70),
[City] NVARCHAR(40),
[State] NVARCHAR(40),
[Country] NVARCHAR(40),
[PostalCode] NVARCHAR(10),
[Phone] NVARCHAR(24),
[Fax] NVARCHAR(24),
[Email] NVARCHAR(60),
CONSTRAINT [PK_Employee] PRIMARY KEY CLUSTERED ([EmployeeId])
);
GO
CREATE TABLE [dbo].[Genre]
(
[GenreId] INT NOT NULL,
[Name] NVARCHAR(120),
CONSTRAINT [PK_Genre] PRIMARY KEY CLUSTERED ([GenreId])
);
GO
CREATE TABLE [dbo].[Invoice]
(
[InvoiceId] INT NOT NULL,
[CustomerId] INT NOT NULL,
[InvoiceDate] DATETIME NOT NULL,
[BillingAddress] NVARCHAR(70),
[BillingCity] NVARCHAR(40),
[BillingState] NVARCHAR(40),
[BillingCountry] NVARCHAR(40),
[BillingPostalCode] NVARCHAR(10),
[Total] NUMERIC(10,2) NOT NULL,
CONSTRAINT [PK_Invoice] PRIMARY KEY CLUSTERED ([InvoiceId])
);
GO
CREATE TABLE [dbo].[InvoiceLine]
(
[InvoiceLineId] INT NOT NULL,
[InvoiceId] INT NOT NULL,
[TrackId] INT NOT NULL,
[UnitPrice] NUMERIC(10,2) NOT NULL,
[Quantity] INT NOT NULL,
CONSTRAINT [PK_InvoiceLine] PRIMARY KEY CLUSTERED ([InvoiceLineId])
);
GO
CREATE TABLE [dbo].[MediaType]
(
[MediaTypeId] INT NOT NULL,
[Name] NVARCHAR(120),
CONSTRAINT [PK_MediaType] PRIMARY KEY CLUSTERED ([MediaTypeId])
);
GO
CREATE TABLE [dbo].[Playlist]
(
[PlaylistId] INT NOT NULL,
[Name] NVARCHAR(120),
CONSTRAINT [PK_Playlist] PRIMARY KEY CLUSTERED ([PlaylistId])
);
GO
CREATE TABLE [dbo].[PlaylistTrack]
(
[PlaylistId] INT NOT NULL,
[TrackId] INT NOT NULL,
CONSTRAINT [PK_PlaylistTrack] PRIMARY KEY NONCLUSTERED ([PlaylistId], [TrackId])
);
GO
CREATE TABLE [dbo].[Track]
(
[TrackId] INT NOT NULL,
[Name] NVARCHAR(200) NOT NULL,
[AlbumId] INT,
[MediaTypeId] INT NOT NULL,
[GenreId] INT,
[Composer] NVARCHAR(220),
[Milliseconds] INT NOT NULL,
[Bytes] INT,
[UnitPrice] NUMERIC(10,2) NOT NULL,
CONSTRAINT [PK_Track] PRIMARY KEY CLUSTERED ([TrackId])
);
GO

/*******************************************************************************
Create Primary Key Unique Indexes
********************************************************************************/

/*******************************************************************************
Create Foreign Keys
********************************************************************************/
ALTER TABLE [dbo].[Album] ADD CONSTRAINT [FK_AlbumArtistId]
FOREIGN KEY ([ArtistId]) REFERENCES [dbo].[Artist] ([ArtistId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
CREATE INDEX [IFK_AlbumArtistId] ON [dbo].[Album] ([ArtistId]);
GO
ALTER TABLE [dbo].[Customer] ADD CONSTRAINT [FK_CustomerSupportRepId]
FOREIGN KEY ([SupportRepId]) REFERENCES [dbo].[Employee] ([EmployeeId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
CREATE INDEX [IFK_CustomerSupportRepId] ON [dbo].[Customer] ([SupportRepId]);
GO
ALTER TABLE [dbo].[Employee] ADD CONSTRAINT [FK_EmployeeReportsTo]
FOREIGN KEY ([ReportsTo]) REFERENCES [dbo].[Employee] ([EmployeeId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
CREATE INDEX [IFK_EmployeeReportsTo] ON [dbo].[Employee] ([ReportsTo]);
GO
ALTER TABLE [dbo].[Invoice] ADD CONSTRAINT [FK_InvoiceCustomerId]
FOREIGN KEY ([CustomerId]) REFERENCES [dbo].[Customer] ([CustomerId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
CREATE INDEX [IFK_InvoiceCustomerId] ON [dbo].[Invoice] ([CustomerId]);
GO
ALTER TABLE [dbo].[InvoiceLine] ADD CONSTRAINT [FK_InvoiceLineInvoiceId]
FOREIGN KEY ([InvoiceId]) REFERENCES [dbo].[Invoice] ([InvoiceId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
CREATE INDEX [IFK_InvoiceLineInvoiceId] ON [dbo].[InvoiceLine] ([InvoiceId]);
GO
ALTER TABLE [dbo].[InvoiceLine] ADD CONSTRAINT [FK_InvoiceLineTrackId]
FOREIGN KEY ([TrackId]) REFERENCES [dbo].[Track] ([TrackId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
CREATE INDEX [IFK_InvoiceLineTrackId] ON [dbo].[InvoiceLine] ([TrackId]);
GO
ALTER TABLE [dbo].[PlaylistTrack] ADD CONSTRAINT [FK_PlaylistTrackPlaylistId]
FOREIGN KEY ([PlaylistId]) REFERENCES [dbo].[Playlist] ([PlaylistId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
ALTER TABLE [dbo].[PlaylistTrack] ADD CONSTRAINT [FK_PlaylistTrackTrackId]
FOREIGN KEY ([TrackId]) REFERENCES [dbo].[Track] ([TrackId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
CREATE INDEX [IFK_PlaylistTrackTrackId] ON [dbo].[PlaylistTrack] ([TrackId]);
GO
ALTER TABLE [dbo].[Track] ADD CONSTRAINT [FK_TrackAlbumId]
FOREIGN KEY ([AlbumId]) REFERENCES [dbo].[Album] ([AlbumId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
CREATE INDEX [IFK_TrackAlbumId] ON [dbo].[Track] ([AlbumId]);
GO
ALTER TABLE [dbo].[Track] ADD CONSTRAINT [FK_TrackGenreId]
FOREIGN KEY ([GenreId]) REFERENCES [dbo].[Genre] ([GenreId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
CREATE INDEX [IFK_TrackGenreId] ON [dbo].[Track] ([GenreId]);
GO
ALTER TABLE [dbo].[Track] ADD CONSTRAINT [FK_TrackMediaTypeId]
FOREIGN KEY ([MediaTypeId]) REFERENCES [dbo].[MediaType] ([MediaTypeId]) ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
CREATE INDEX [IFK_TrackMediaTypeId] ON [dbo].[Track] ([MediaTypeId]);
GO

/*******************************************************************************
Populate Tables
********************************************************************************/
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (1, N’Rock’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (2, N’Jazz’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (3, N’Metal’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (4, N’Alternative & Punk’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (5, N’Rock And Roll’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (6, N’Blues’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (7, N’Latin’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (8, N’Reggae’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (9, N’Pop’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (10, N’Soundtrack’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (11, N’Bossa Nova’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (12, N’Easy Listening’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (13, N’Heavy Metal’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (14, N’R&B/Soul’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (15, N’Electronica/Dance’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (16, N’World’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (17, N’Hip Hop/Rap’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (18, N’Science Fiction’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (19, N’TV Shows’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (20, N’Sci Fi & Fantasy’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (21, N’Drama’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (22, N’Comedy’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (23, N’Alternative’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (24, N’Classical’);
INSERT INTO [dbo].[Genre] ([GenreId], [Name]) VALUES (25, N’Opera’);

INSERT INTO [dbo].[MediaType] ([MediaTypeId], [Name]) VALUES (1, N’MPEG audio file’);
INSERT INTO [dbo].[MediaType] ([MediaTypeId], [Name]) VALUES (2, N’Protected AAC audio file’);
INSERT INTO [dbo].[MediaType] ([MediaTypeId], [Name]) VALUES (3, N’Protected MPEG-4 video file’);
INSERT INTO [dbo].[MediaType] ([MediaTypeId], [Name]) VALUES (4, N’Purchased AAC audio file’);
INSERT INTO [dbo].[MediaType] ([MediaTypeId], [Name]) VALUES (5, N’AAC audio file’);

INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (1, N’AC/DC’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (2, N’Accept’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (3, N’Aerosmith’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (4, N’Alanis Morissette’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (5, N’Alice In Chains’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (6, N’Antônio Carlos Jobim’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (7, N’Apocalyptica’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (8, N’Audioslave’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (9, N’BackBeat’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (10, N’Billy Cobham’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (11, N’Black Label Society’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (12, N’Black Sabbath’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (13, N’Body Count’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (14, N’Bruce Dickinson’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (15, N’Buddy Guy’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (16, N’Caetano Veloso’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (17, N’Chico Buarque’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (18, N’Chico Science & Nação Zumbi’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (19, N’Cidade Negra’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (20, N’Cláudio Zoli’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (21, N’Various Artists’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (22, N’Led Zeppelin’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (23, N’Frank Zappa & Captain Beefheart’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (24, N’Marcos Valle’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (25, N’Milton Nascimento & Bebeto’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (26, N’Azymuth’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (27, N’Gilberto Gil’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (28, N’João Gilberto’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (29, N’Bebel Gilberto’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (30, N’Jorge Vercilo’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (31, N’Baby Consuelo’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (32, N’Ney Matogrosso’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (33, N’Luiz Melodia’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (34, N’Nando Reis’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (35, N’Pedro Luís & A Parede’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (36, N’O Rappa’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (37, N’Ed Motta’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (38, N’Banda Black Rio’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (39, N’Fernanda Porto’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (40, N’Os Cariocas’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (41, N’Elis Regina’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (42, N’Milton Nascimento’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (43, N’A Cor Do Som’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (44, N’Kid Abelha’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (45, N’Sandra De Sá’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (46, N’Jorge Ben’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (47, N’Hermeto Pascoal’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (48, N’Barão Vermelho’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (49, N’Edson, DJ Marky & DJ Patife Featuring Fernanda Porto’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (50, N’Metallica’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (51, N’Queen’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (52, N’Kiss’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (53, N’Spyro Gyra’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (54, N’Green Day’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (55, N’David Coverdale’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (56, N’Gonzaguinha’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (57, N’Os Mutantes’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (58, N’Deep Purple’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (59, N’Santana’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (60, N’Santana Feat. Dave Matthews’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (61, N’Santana Feat. Everlast’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (62, N’Santana Feat. Rob Thomas’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (63, N’Santana Feat. Lauryn Hill & Cee-Lo’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (64, N’Santana Feat. The Project G&B’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (65, N’Santana Feat. Maná’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (66, N’Santana Feat. Eagle-Eye Cherry’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (67, N’Santana Feat. Eric Clapton’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (68, N’Miles Davis’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (69, N’Gene Krupa’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (70, N’Toquinho & Vinícius’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (71, N’Vinícius De Moraes & Baden Powell’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (72, N’Vinícius De Moraes’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (73, N’Vinícius E Qurteto Em Cy’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (74, N’Vinícius E Odette Lara’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (75, N’Vinicius, Toquinho & Quarteto Em Cy’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (76, N’Creedence Clearwater Revival’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (77, N’Cássia Eller’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (78, N’Def Leppard’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (79, N’Dennis Chambers’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (80, N’Djavan’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (81, N’Eric Clapton’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (82, N’Faith No More’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (83, N’Falamansa’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (84, N’Foo Fighters’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (85, N’Frank Sinatra’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (86, N’Funk Como Le Gusta’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (87, N’Godsmack’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (88, N’Guns N” Roses’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (89, N’Incognito’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (90, N’Iron Maiden’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (91, N’James Brown’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (92, N’Jamiroquai’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (93, N’JET’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (94, N’Jimi Hendrix’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (95, N’Joe Satriani’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (96, N’Jota Quest’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (97, N’João Suplicy’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (98, N’Judas Priest’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (99, N’Legião Urbana’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (100, N’Lenny Kravitz’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (101, N’Lulu Santos’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (102, N’Marillion’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (103, N’Marisa Monte’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (104, N’Marvin Gaye’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (105, N’Men At Work’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (106, N’Motörhead’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (107, N’Motörhead & Girlschool’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (108, N’Mônica Marianno’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (109, N’Mötley Crüe’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (110, N’Nirvana’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (111, N’O Terço’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (112, N’Olodum’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (113, N’Os Paralamas Do Sucesso’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (114, N’Ozzy Osbourne’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (115, N’Page & Plant’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (116, N’Passengers’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (117, N’Paul D”Ianno’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (118, N’Pearl Jam’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (119, N’Peter Tosh’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (120, N’Pink Floyd’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (121, N’Planet Hemp’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (122, N’R.E.M. Feat. Kate Pearson’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (123, N’R.E.M. Feat. KRS-One’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (124, N’R.E.M.’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (125, N’Raimundos’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (126, N’Raul Seixas’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (127, N’Red Hot Chili Peppers’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (128, N’Rush’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (129, N’Simply Red’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (130, N’Skank’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (131, N’Smashing Pumpkins’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (132, N’Soundgarden’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (133, N’Stevie Ray Vaughan & Double Trouble’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (134, N’Stone Temple Pilots’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (135, N’System Of A Down’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (136, N’Terry Bozzio, Tony Levin & Steve Stevens’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (137, N’The Black Crowes’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (138, N’The Clash’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (139, N’The Cult’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (140, N’The Doors’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (141, N’The Police’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (142, N’The Rolling Stones’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (143, N’The Tea Party’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (144, N’The Who’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (145, N’Tim Maia’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (146, N’Titãs’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (147, N’Battlestar Galactica’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (148, N’Heroes’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (149, N’Lost’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (150, N’U2′);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (151, N’UB40′);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (152, N’Van Halen’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (153, N’Velvet Revolver’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (154, N’Whitesnake’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (155, N’Zeca Pagodinho’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (156, N’The Office’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (157, N’Dread Zeppelin’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (158, N’Battlestar Galactica (Classic)’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (159, N’Aquaman’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (160, N’Christina Aguilera featuring BigElf’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (161, N’Aerosmith & Sierra Leone”s Refugee Allstars’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (162, N’Los Lonely Boys’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (163, N’Corinne Bailey Rae’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (164, N’Dhani Harrison & Jakob Dylan’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (165, N’Jackson Browne’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (166, N’Avril Lavigne’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (167, N’Big & Rich’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (168, N’Youssou N”Dour’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (169, N’Black Eyed Peas’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (170, N’Jack Johnson’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (171, N’Ben Harper’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (172, N’Snow Patrol’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (173, N’Matisyahu’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (174, N’The Postal Service’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (175, N’Jaguares’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (176, N’The Flaming Lips’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (177, N’Jack”s Mannequin & Mick Fleetwood’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (178, N’Regina Spektor’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (179, N’Scorpions’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (180, N’House Of Pain’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (181, N’Xis’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (182, N’Nega Gizza’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (183, N’Gustavo & Andres Veiga & Salazar’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (184, N’Rodox’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (185, N’Charlie Brown Jr.’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (186, N’Pedro Luís E A Parede’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (187, N’Los Hermanos’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (188, N’Mundo Livre S/A’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (189, N’Otto’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (190, N’Instituto’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (191, N’Nação Zumbi’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (192, N’DJ Dolores & Orchestra Santa Massa’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (193, N’Seu Jorge’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (194, N’Sabotage E Instituto’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (195, N’Stereo Maracana’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (196, N’Cake’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (197, N’Aisha Duo’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (198, N’Habib Koité and Bamada’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (199, N’Karsh Kale’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (200, N’The Posies’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (201, N’Luciana Souza/Romero Lubambo’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (202, N’Aaron Goldberg’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (203, N’Nicolaus Esterhazy Sinfonia’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (204, N’Temple of the Dog’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (205, N’Chris Cornell’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (206, N’Alberto Turco & Nova Schola Gregoriana’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (207, N’Richard Marlow & The Choir of Trinity College, Cambridge’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (208, N’English Concert & Trevor Pinnock’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (209, N’Anne-Sophie Mutter, Herbert Von Karajan & Wiener Philharmoniker’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (210, N’Hilary Hahn, Jeffrey Kahane, Los Angeles Chamber Orchestra & Margaret Batjer’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (211, N’Wilhelm Kempff’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (212, N’Yo-Yo Ma’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (213, N’Scholars Baroque Ensemble’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (214, N’Academy of St. Martin in the Fields & Sir Neville Marriner’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (215, N’Academy of St. Martin in the Fields Chamber Ensemble & Sir Neville Marriner’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (216, N’Berliner Philharmoniker, Claudio Abbado & Sabine Meyer’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (217, N’Royal Philharmonic Orchestra & Sir Thomas Beecham’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (218, N’Orchestre Révolutionnaire et Romantique & John Eliot Gardiner’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (219, N’Britten Sinfonia, Ivor Bolton & Lesley Garrett’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (220, N’Chicago Symphony Chorus, Chicago Symphony Orchestra & Sir Georg Solti’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (221, N’Sir Georg Solti & Wiener Philharmoniker’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (222, N’Academy of St. Martin in the Fields, John Birch, Sir Neville Marriner & Sylvia McNair’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (223, N’London Symphony Orchestra & Sir Charles Mackerras’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (224, N’Barry Wordsworth & BBC Concert Orchestra’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (225, N’Herbert Von Karajan, Mirella Freni & Wiener Philharmoniker’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (226, N’Eugene Ormandy’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (227, N’Luciano Pavarotti’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (228, N’Leonard Bernstein & New York Philharmonic’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (229, N’Boston Symphony Orchestra & Seiji Ozawa’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (230, N’Aaron Copland & London Symphony Orchestra’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (231, N’Ton Koopman’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (232, N’Sergei Prokofiev & Yuri Temirkanov’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (233, N’Chicago Symphony Orchestra & Fritz Reiner’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (234, N’Orchestra of The Age of Enlightenment’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (235, N’Emanuel Ax, Eugene Ormandy & Philadelphia Orchestra’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (236, N’James Levine’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (237, N’Berliner Philharmoniker & Hans Rosbaud’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (238, N’Maurizio Pollini’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (239, N’Academy of St. Martin in the Fields, Sir Neville Marriner & William Bennett’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (240, N’Gustav Mahler’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (241, N’Felix Schmidt, London Symphony Orchestra & Rafael Frühbeck de Burgos’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (242, N’Edo de Waart & San Francisco Symphony’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (243, N’Antal Doráti & London Symphony Orchestra’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (244, N’Choir Of Westminster Abbey & Simon Preston’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (245, N’Michael Tilson Thomas & San Francisco Symphony’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (246, N’Chor der Wiener Staatsoper, Herbert Von Karajan & Wiener Philharmoniker’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (247, N’The King”s Singers’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (248, N’Berliner Philharmoniker & Herbert Von Karajan’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (249, N’Sir Georg Solti, Sumi Jo & Wiener Philharmoniker’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (250, N’Christopher O”Riley’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (251, N’Fretwork’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (252, N’Amy Winehouse’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (253, N’Calexico’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (254, N’Otto Klemperer & Philharmonia Orchestra’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (255, N’Yehudi Menuhin’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (256, N’Philharmonia Orchestra & Sir Neville Marriner’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (257, N’Academy of St. Martin in the Fields, Sir Neville Marriner & Thurston Dart’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (258, N’Les Arts Florissants & William Christie’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (259, N’The 12 Cellists of The Berlin Philharmonic’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (260, N’Adrian Leaper & Doreen de Feis’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (261, N’Roger Norrington, London Classical Players’);
INSERT INTO [dbo].[Artist] ([ArtistId], [Name]) VALUES (262, N’Charles Dutoit & L’

DATA BASE DESIGN Project

  

Project

Can be any business other than a bicycle shop (sales/repair)

1 Person 20 Tables

(Average 5 Columns per table) Important note: I need 100 attributes in total in 20 20 tables(it may be either 5-6 attributes 1 table or 3-4 attributes in another table)

Should be normalized to 3rd Normal Form

1 (per person) instance where 1st, 2nd, or 3rd normal form is violated, give a detailed explanation as to why you designed this violation (you can have more than one, but it must be explained)

Create Select/Insert/Update/Delete statements for each table (other than  many-to-many tables)

Create at least 12 business rules, 10 should be built into the design (Per person)

Naming convention – explain the naming convention you used.

Data Dictionary(need in excel)

10 rows of dummy data in each table (where possible)(neeed in excel)

DDL Scripts for each table, PK, and FK

Using https://app.diagrams.net/ create the ERD using Crow’s Foot Notation (No other Notation will be accepted)

If you are working as a team, make sure it is obvious who created which pieces. Color code the ERD, showing who did what.

One person should submit the project for the team.

Data Base Design Project

I am doing in single person so choose 1 person 20 Tables
I include the template given by the professor. Please do not copy from any sources .

NO PLAGIARISM
ONLY RESPONSE WHO CAN DO IT 

 Project
Can be any business other than a bicycle shop (sales/repair)
1 Person 20 Tables
2 People 38 Tables
3 People 56 Tables
4 People 74 Tables
(Average 5 Columns per table)
Should be normalized to 3rd Normal Form
1 (per person) instance where 1st, 2nd, or 3rd normal form is  violated, give a detailed explanation as to why you designed this  violation (you can have more than one, but it must be explained)
Create Select/Insert/Update/Delete statements for each table (other than  many-to-many tables)
Create at least 12 business rules, 10 should be built into the design (Per person)
Naming convention – explain the naming convention you used.
Data Dictionary
10 rows of dummy data in each table (where possible)
DDL Scripts for each table, PK, and FK
Using https://app.diagrams.net/ create the ERD using Crow’s Foot Notation (No other Notation will be accepted)
If you are working as a team, make sure it is obvious who created which pieces. Color code the ERD, showing who did what.
One person should submit the project for the team.
instpubs.sql
instnwnd.sql
Chinook_SqlServer.sql
Adventureworks.sql
Data Dictionary Template.xlsx