⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 oracle_populate.sql

📁 此程序都是企业级 的数据库开发程序 全面揭示了JAVA对数据库的操作
💻 SQL
📖 第 1 页 / 共 2 页
字号:


--AudioStyles Table:
--------------------
--Create a sequence for this table to make sure the primary keys start at 1:

CREATE SEQUENCE seqAudioStyles INCREMENT BY 1 START WITH 1 NOCYCLE;

INSERT INTO AudioStyles (AudioStyleID,AUDIOSTYLEDESCRIPTION) VALUES (seqAudioStyles.NextVal,'Rock');
INSERT INTO AudioStyles (AudioStyleID,AUDIOSTYLEDESCRIPTION) VALUES (seqAudioStyles.NextVal,'Country');
INSERT INTO AudioStyles (AudioStyleID,AUDIOSTYLEDESCRIPTION) VALUES (seqAudioStyles.NextVal,'Alternative Rock');
INSERT INTO AudioStyles (AudioStyleID,AUDIOSTYLEDESCRIPTION) VALUES (seqAudioStyles.NextVal,'Classical');
INSERT INTO AudioStyles (AudioStyleID,AUDIOSTYLEDESCRIPTION) VALUES (seqAudioStyles.NextVal,'Jazz');
INSERT INTO AudioStyles (AudioStyleID,AUDIOSTYLEDESCRIPTION) VALUES (seqAudioStyles.NextVal,'RhythmandBlues');
INSERT INTO AudioStyles (AudioStyleID,AUDIOSTYLEDESCRIPTION) VALUES (seqAudioStyles.NextVal,'Urban');
INSERT INTO AudioStyles (AudioStyleID,AUDIOSTYLEDESCRIPTION) VALUES (seqAudioStyles.NextVal,'Rap');
INSERT INTO AudioStyles (AudioStyleID,AUDIOSTYLEDESCRIPTION) VALUES (seqAudioStyles.NextVal,'Folk');
INSERT INTO AudioStyles (AudioStyleID,AUDIOSTYLEDESCRIPTION) VALUES (seqAudioStyles.NextVal,'Comedy and Spoken Word');
INSERT INTO AudioStyles (AudioStyleID,AUDIOSTYLEDESCRIPTION) VALUES (seqAudioStyles.NextVal,'50s oldies');
INSERT INTO AudioStyles (AudioStyleID,AUDIOSTYLEDESCRIPTION) VALUES (seqAudioStyles.NextVal,'Classic Rock');
INSERT INTO AudioStyles (AudioStyleID,AUDIOSTYLEDESCRIPTION) VALUES (seqAudioStyles.NextVal,'Punk');
INSERT INTO AudioStyles (AudioStyleID,AUDIOSTYLEDESCRIPTION) VALUES (seqAudioStyles.NextVal,'80s Retro');
INSERT INTO AudioStyles (AudioStyleID,AUDIOSTYLEDESCRIPTION) VALUES (seqAudioStyles.NextVal,'Gospel');
INSERT INTO AudioStyles (AudioStyleID,AUDIOSTYLEDESCRIPTION) VALUES (seqAudioStyles.NextVal,'Dance');
INSERT INTO AudioStyles (AudioStyleID,AUDIOSTYLEDESCRIPTION) VALUES (seqAudioStyles.NextVal,'Album Oriented Adult');
INSERT INTO AudioStyles (AudioStyleID,AUDIOSTYLEDESCRIPTION) VALUES (seqAudioStyles.NextVal,'Techno and Electronica');



--ArtistsAndPerformers Table:
-----------------------------
--Create a sequence for this table to make sure the primary keys start at 1:

CREATE SEQUENCE seqArtistsAndPerformers INCREMENT BY 1 START WITH 1 NOCYCLE;

INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal,'10000 Maniacs',null,
'The band were formed in Jamestown, NY, in 1981 by singer Natalie Merchant and guitarist John Lombardo.');

INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal,'Aerosmith',null,null);

INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal,'Alanis Morissette',null,
'Alanis Morissette (b. June 1, 1974, Ottawa, Canada) is a confessional alternative singer/songwriter, in the vein of Liz Phair and Tor101,i Amos. ');

INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal,'Babyface',null,'Babyface');

INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal,'Billy Joel',null,null);

INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal,'Toni Braxton',null,null);

INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal, 'Garth Brooks',null,null);

INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal, 'Peter Gabriel',null,null);

INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal,'Everything But The Girl',null,'Originating at the turn of the 1980s as a leader of the lite-jazz movement.');

INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal,'Candy Skins',null,'Along with Supergrass and Radiohead, the Candyskins represent the cream of a burgeoning Oxford scene.');

INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal,'Various Artists',null,null);
INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal,'Eric Clapton',null,null);
INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal,'Bryan Ferry',null,null);
INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal,'Aaron Neville',null,null);
INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal,'Taj Mahal',null,null);
INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal,'Jewel',null,null);
INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal,'Marvin Gaye',null,null);
INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal,'The Iguanas',null,null);
INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal,'Dorthy Moore',null,null);
INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal,'J.J. Cale',null,null);
INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal,'Thomas Newman',null,null);
INSERT INTO ArtistsAndPerformers (ArtistID,ArtistName,ArtistImageFilespec,ArtistBioText) VALUES (seqArtistsAndPerformers.NextVal,'Tori Amos',null,null);




--PublishersAndLabels Table:
----------------------------
--Create a sequence for this table to make sure the primary keys start at 1:

CREATE SEQUENCE seqPublishersAndLabels INCREMENT BY 1 START WITH 1 NOCYCLE;

INSERT INTO PublishersAndLabels (CompanyID,CompanyName) VALUES (seqPublishersAndLabels.NextVal,'Sire Records');
INSERT INTO PublishersAndLabels (CompanyID,CompanyName) VALUES (seqPublishersAndLabels.NextVal,'Sony Music');
INSERT INTO PublishersAndLabels (CompanyID,CompanyName) VALUES (seqPublishersAndLabels.NextVal,'Arista Records');
INSERT INTO PublishersAndLabels (CompanyID,CompanyName) VALUES (seqPublishersAndLabels.NextVal,'Atlantic Recording Corporation');
INSERT INTO PublishersAndLabels (CompanyID,CompanyName) VALUES (seqPublishersAndLabels.NextVal,'Universal Records');
INSERT INTO PublishersAndLabels (CompanyID,CompanyName) VALUES (seqPublishersAndLabels.NextVal,'Warner Brothers Records');
INSERT INTO PublishersAndLabels (CompanyID,CompanyName) VALUES (seqPublishersAndLabels.NextVal,'Virgin Records');
INSERT INTO PublishersAndLabels (CompanyID,CompanyName) VALUES (seqPublishersAndLabels.NextVal,'Island Records');
INSERT INTO PublishersAndLabels (CompanyID,CompanyName) VALUES (seqPublishersAndLabels.NextVal,'Reprise Records');
INSERT INTO PublishersAndLabels (CompanyID,CompanyName) VALUES (seqPublishersAndLabels.NextVal,'Elektra Entertainment Group');
INSERT INTO PublishersAndLabels (CompanyID,CompanyName) VALUES (seqPublishersAndLabels.NextVal,'RCA Records');
INSERT INTO PublishersAndLabels (CompanyID,CompanyName) VALUES (seqPublishersAndLabels.NextVal,'Zomba Recording Corporation');
INSERT INTO PublishersAndLabels (CompanyID,CompanyName) VALUES (seqPublishersAndLabels.NextVal,'David Geffen Company');




--RecordingFormats Table:
-------------------------
--Create a sequence for this table to make sure the primary keys start at 1:

CREATE SEQUENCE seqRecordingFormats INCREMENT BY 1 START WITH 1 NOCYCLE;

INSERT INTO RecordingFormats (RecordingFormatID,RECORDINGFORMATDESCRIPTION) VALUES(seqRecordingFormats.NextVal,'Audio CD');
INSERT INTO RecordingFormats (RecordingFormatID,RECORDINGFORMATDESCRIPTION) VALUES(seqRecordingFormats.NextVal,'Enhanced Audio CD');
INSERT INTO RecordingFormats (RecordingFormatID,RECORDINGFORMATDESCRIPTION) VALUES(seqRecordingFormats.NextVal,'DVD');
INSERT INTO RecordingFormats (RecordingFormatID,RECORDINGFORMATDESCRIPTION) VALUES(seqRecordingFormats.NextVal,'Cassette Tape');
INSERT INTO RecordingFormats (RecordingFormatID,RECORDINGFORMATDESCRIPTION) VALUES(seqRecordingFormats.NextVal,'Vinyl');
INSERT INTO RecordingFormats (RecordingFormatID,RECORDINGFORMATDESCRIPTION) VALUES(seqRecordingFormats.NextVal,'VHS');




--Languages Table:
------------------
--Create a sequence for this table to make sure the primary keys start at 1:

CREATE SEQUENCE seqLanguages INCREMENT BY 1 START WITH 1 NOCYCLE;

INSERT INTO Languages (LanguageID,LANGUAGEDESCRIPTION) VALUES (seqLanguages.NextVal,'English');
INSERT INTO Languages (LanguageID,LANGUAGEDESCRIPTION) VALUES (seqLanguages.NextVal,'Spanish');
INSERT INTO Languages (LanguageID,LANGUAGEDESCRIPTION) VALUES (seqLanguages.NextVal,'French');
INSERT INTO Languages (LanguageID,LANGUAGEDESCRIPTION) VALUES (seqLanguages.NextVal,'German');
INSERT INTO Languages (LanguageID,LANGUAGEDESCRIPTION) VALUES (seqLanguages.NextVal,'Italian');



--Recordings Table:
-------------------
--Create a sequence for this table to make sure the primary keys start at 1:

CREATE SEQUENCE seqRecordings INCREMENT BY 1 START WITH 1 NOCYCLE;

INSERT INTO Recordings (RecordingID,RecordingTitle, PublisherID, CatalogNumber, RecordingFormatID, ReleaseDate, LanguageID, ListPrice, CoverImageFilespec) VALUES
(seqRecordings.NextVal,'Space I''m In', 12, '2064-24370-2',1,'23-MAY-91',1,14.99,null);

INSERT INTO Recordings (RecordingID,RecordingTitle, PublisherID, CatalogNumber, RecordingFormatID, ReleaseDate, LanguageID, ListPrice, CoverImageFilespec) VALUES (seqRecordings.NextVal,'Phenomenon Soundtrack',10,'9362-46360-2',1,'23-AUG-96',1,15.99,'images/VA_Phenonmenon.jpg');

INSERT INTO Recordings (RecordingID,RecordingTitle, PublisherID, CatalogNumber, RecordingFormatID, ReleaseDate, LanguageID, ListPrice, CoverImageFilespec) VALUES (seqRecordings.NextVal,'Little Earthquakes',13,'7567-82358-2',1,'10-FEB-91',1,14.99,'images/tamos_LittleEarthquakes.jpg');

INSERT INTO Recordings (RecordingID,RecordingTitle, PublisherID, CatalogNumber, RecordingFormatID, ReleaseDate, LanguageID, ListPrice, CoverImageFilespec) VALUES (seqRecordings.NextVal,'Crucify',13,'82399-2',1,'21-MAR-92',1,9.99,'images/tamos_Crucify.jpg');

INSERT INTO Recordings (RecordingID,RecordingTitle, PublisherID, CatalogNumber, RecordingFormatID, ReleaseDate, LanguageID, ListPrice, CoverImageFilespec) VALUES (seqRecordings.NextVal,'Big Time',7,'GAIL3 12',1,'21-JUN-87',1,9.99,null);

INSERT INTO Recordings (RecordingID,RecordingTitle, PublisherID, CatalogNumber, RecordingFormatID, ReleaseDate, LanguageID, ListPrice, CoverImageFilespec) VALUES (seqRecordings.NextVal,'US',7,'GAHN2 07',1,'29-SEP-89',1,18.97,'images/pgabriel_us.gif');

REMARK WORKS up to here

--Tracks Table:
---------------
--No need to create a sequence for this table since the primary key is a composite key, part of which is a foreign key as well

INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (1,1,'So Easy',10,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (1,2,'Submarine Song',10,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (1,3,'Black and Blue',10,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (1,4,'Never Will Forget You',10,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (1,5,'Freedom Bus',10,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (1,6,'Without Love',10,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (1,7,'She Blew Me Away',10,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (1,8,'Third World Blues',10,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (1,9,'Not Sad To See You Go',10,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (1,10,'Get Together',10,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (1,11,'For What It''s Worth',10,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (1,12,'Space I''m In',10,3,null);


INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (3,1,'Crucify',22,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (3,2,'Girl',22,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (3,3,'Silent All These Years',22,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (3,4,'Precious Things',22,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (3,5,'Winter',22,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (3,6,'Happy Phantom',22,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (3,7,'China',22,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (3,8,'Leather',22,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (3,9,'Mother',22,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (3,10,'Tear In Your Hand',22,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (3,11,'Me And A Gun',22,3,null);
INSERT INTO Tracks (RecordingID, TrackNumber, TrackTitle, ArtistID, StyleID, SampleFilespec) Values (3,12,'Little Earthquakes',22,3,null);


--Reviews Table:
----------------
--Create a sequence for this table to make sure the primary keys start at 1:

CREATE SEQUENCE seqReviews INCREMENT BY 1 START WITH 1 NOCYCLE;

INSERT INTO Reviews (ReviewID,RecordingID, ReviewerName, ReviewText, Rating, ReviewDate) VALUES (seqReviews.NextVal,6,'Lance Trickey','Peter Gabriel has the amazing ability to write about depression, love, and loss in such a way that you feel uplifted while listening to it. And he does this (among many things) exceptionally yet again in his 1992 release, Us.',5,'25-APR-01');




--Languages Table:
------------------
--No need for a sequence for this table since the primary key is a composite key, with both of its components being foreign keys as well.

INSERT INTO Inventories (ProductID,StoreID,QtyOnHand) VALUES (1,3,5);
INSERT INTO Inventories (ProductID,StoreID,QtyOnHand) VALUES (1,4,5);
INSERT INTO Inventories (ProductID,StoreID,QtyOnHand) VALUES (1,5,0);
INSERT INTO Inventories (ProductID,StoreID,QtyOnHand) VALUES (3,6,4);
INSERT INTO Inventories (ProductID,StoreID,QtyOnHand) VALUES (2,4,15);
INSERT INTO Inventories (ProductID,StoreID,QtyOnHand) VALUES (4,5,22);
INSERT INTO Inventories (ProductID,StoreID,QtyOnHand) VALUES (5,8,1);
INSERT INTO Inventories (ProductID,StoreID,QtyOnHand) VALUES (6,5,4);
INSERT INTO Inventories (ProductID,StoreID,QtyOnHand) VALUES (6,3,1);




--SalesCampaigns Table:
-----------------------
--Create a sequence for this table to make sure the primary keys start at 1:

CREATE SEQUENCE seqSalesCampaigns INCREMENT BY 1 START WITH 1 NOCYCLE;

INSERT INTO SalesCampaigns (SalesCampaignID,SalesCampaignDescription, MinQty, MaxQty, PercentDiscount) Values (seqSalesCampaigns.NextVal,'New Customers',1,1,10);
INSERT INTO SalesCampaigns (SalesCampaignID,SalesCampaignDescription, MinQty, MaxQty, PercentDiscount) Values (seqSalesCampaigns.NextVal,'Volume Discount 1',5,10,10);
INSERT INTO SalesCampaigns (SalesCampaignID,SalesCampaignDescription, MinQty, MaxQty, PercentDiscount) Values (seqSalesCampaigns.NextVal,'Volume Discount 2',10,15,12);
INSERT INTO SalesCampaigns (SalesCampaignID,SalesCampaignDescription, MinQty, MaxQty, PercentDiscount) Values (seqSalesCampaigns.NextVal,'Volume Discount 3',15,999,15);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -