Create an Oracle sequence to generate values for volunteer numbers. The sequence should startwith 9000 and increment by 10. Do not cache any values.

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

PLZ help with the following question 

USE ORACLE SQL or SQL LIVE

  1. Create an Oracle sequence to generate values for volunteer numbers. The sequence should startwith 9000 and increment by 10. Do not cache any values.

The databse:

CREATE TABLE Packinglist(
   List_ID INT NOT NULL,
   Name VARCHAR(50),
   Description VARCHAR(100),
   PRIMARY KEY(List_ID));

CREATE TABLE Task(
   Task_Code INT NOT NULL,
   List_ID INT,
   Task_Description VARCHAR(100),
   Type VARCHAR(30),
   Status VARCHAR(20),
   PRIMARY KEY(Task_Code),
   FOREIGN KEY(List_ID) REFERENCES Packinglist(List_ID));

CREATE TABLE Volunteer(
   Vol_ID INT NOT NULL,
   Name VARCHAR(50),
   Telephone NUMBER,
   Address VARCHAR(100),
   PRIMARY KEY(Vol_ID));

CREATE TABLE Assignment(
   Vol_ID INT,
   Task_Code INT,
   Start_Time TIME,
   End_Time TIME,
   PRIMARY KEY(Vol_ID, Task_Code),
   FOREIGN KEY(Vol_ID) REFERENCES Volunteer(Vol_ID),
   FOREIGN KEY(Task_Code) REFERENCES Task(Task_Code));

CREATE TABLE Package(
   Pack_ID INT NOT NULL,
   Task_Code INT,
   Date DATE,
   Weight FLOAT,
   PRIMARY KEY(Pack_ID),
   FOREIGN KEY(Task_Code) REFERENCES Task(Task_Code));

CREATE TABLE Item(
   Item_ID INT NOT NULL,
   Description VARCHAR(100),
   Value DECIMAL(10,2),
   Quantity NUMBER,
   PRIMARY KEY(Item_ID));

CREATE TABLE Content(
   Pack_ID INT,
   Item_ID INT,
   Quantity NUMBER,
   PRIMARY KEY(Pack_ID, Item_ID),
   FOREIGN KEY(Pack_ID) REFERENCES Package(Pack_ID),
   FOREIGN KEY(Item_ID) REFERENCES Item(Item_ID));

 

INSERT INTO Packinglist
VALUES(101, "Packinglist1", "Packinglist1 Description"),
   (102, "Packinglist2", "Packinglist2 Description"),
   (103, "Packinglist3", "Packinglist3 Description"),
   (104, "Packinglist4", "Packinglist4 Description"),
   (105, "Packinglist5", "Packinglist5 Description");

INSERT INTO Task
VALUES(201, 101, "Task1 Description", "Type1", "Active"),
   (202, 101, "Task2 Description", "Type3", "InActive"),
   (203, 102, "Task3 Description", "Type2", "Progress"),
   (204, 104, "Task4 Description", "Type1", "Active"),
   (205, 102, "Task5 Description", "Type2", "Hold");

INSERT INTO Volunteer
VALUES(301, "Volunteer1", 1234, "Volunteer1 Address"),
   (302, "Volunteer2", 2345, "Volunteer2 Address"),
   (303, "Volunteer3", 3456, "Volunteer3 Address"),
   (304, "Volunteer4", 4567, "Volunteer4 Address"),
   (305, "Volunteer5", 5678, "Volunteer5 Address");

INSERT INTO Assignment
VALUES(301, 202, "2:40", "5:55"),
   (301, 203, "3:45", "4:30"),
   (304, 205, "2:40", "5:55"),
   (303, 201, "9:30", "10:30"),
   (302, 202, "6:40", "7:25");

INSERT INTO Package
VALUES(401, 202, "21-03-2020", "5"),
   (402, 201, "20-04-2020", "1"),
   (403, 202, "15-02-2021", "4"),
   (404, 203, "11-08-2021", "9"),
   (405, 201, "21-11-2020", "3");

INSERT INTO Item
VALUES(501, "Item1 Description", "200", 5),
   (502, "Item2 Description", "150", 2),
   (503, "Item3 Description", "200", 3),
   (504, "Item4 Description", "290", 5),
   (505, "Item5 Description", "440", 9);

INSERT INTO Content
VALUES(401, 505, 2),
   (401, 504, 4),
   (402, 501, 6),
   (401, 501, 7),
   (403, 503, 9);

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

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