Using CREATE TABLE AS subquery syntax, create a seq_d_songs table of all the columns in the DJ on Demand database table d_songs. Use the SELECT * in the subquery to make sure that you have copied all of the columns.
CIS 207 Oracle - Database Programming and SQL
HOMEWORK: # 14
Sections 16 & 17
Run the following queries in Oracle Application Express. Paste a copy of each query
Into this word document below the questions or notepad .txt file, save and return via
SECTION 16 LESSON 1 ? Working With Sequences
Exercise #1, 2, 3, 4, 6
Oracle Academy 10 Database Programming with SQL Try It / Solve It
1. Using CREATE TABLE AS subquery syntax, create a seq_d_songs table of all the columns in the
DJ on Demand database table d_songs. Use the SELECT * in the subquery to make sure that you
have copied all of the columns.
2. Because you are using copies of the original tables, the only constraints that were carried over
were the NOT NULL constraints. Create a sequence to be used with the primary-key column of the
seq_d_songs table. To avoid assigning primary-key numbers to these tables that already exist, the
sequence should start at 100 and have a maximum value of 1000. Have your sequence increment by
2 and have NOCACHE and NOCYCLE. Name the sequence seq_d_songs_seq.
3. Query the USER_SEQUENCES data dictionary to verify the seq_d_songs_seq SEQUENCE
sections 16 & 17
4. Insert two rows into the seq_d_songs table. Be sure to use the sequence that you created for the ID
column. Add the two songs shown in the graphic.
Castle of Dreams
6. What are three benefits of using SEQUENCEs?
SECTION 16 LESSON 2 ? Indexes and Synonyms
1. What is an index and what is it used for?
4. Create a nonunique index (foreign key) for the DJ on Demand column (cd_number) in the
D_TRACK_LISTINGS table. Use the Oracle Application Developer SQL Workshop Data Browser
to confirm that the index was created.
6. Use a SELECT statement to display the index_name, table_name, and uniqueness from the data
dictionary USER_INDEXES for the DJ on Demand D_EVENTS table.
7. Write a query to create a synonym called dj_tracks for the DJ on Demand d_track_listings table.
SECTION 17 LESSON 1 ? Controlling User Access
Ex. 1, 2, 4, 5, 9
1. What are system privileges concerned with?
sections 16 & 17
2. What are object privileges concerned with?
4. What commands are necessary to allow Scott access to the database with a password of tiger?
5. What are the commands to allow Scott to SELECT from and UPDATE the d_clients table?
9. If you create a table, how can you pass along privileges to other users just to view your table?
SECTION 17 LESSON 2 ? Creating and Revoking Object Privileges
5. What is the syntax to accomplish the following?
a. Create a role of manager that has the privileges to select, insert and update and delete from the
b. Create a role of clerk that just has the privileges of select and insert on the employees table
c. Grant the manager role to user scott
d. Revoke the ability to delete from the employees table from the manager role
SECTION 17 LESSON 3 ? Regular Expressions
1. Working with the employees table, and using regular expressions, write a query that returns
employees whose first name starts with a ?S? (uppercase) followed by either a ?t? (lowercase) or ?s?
sections 16 & 17
This question was answered on: Oct 07, 2020Buy this answer for only: $15
This attachment is locked
Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .
About this QuestionSTATUS
Oct 07, 2020EXPERT
GET INSTANT HELP/h4>
We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.
You can also use these solutions:
- As a reference for in-depth understanding of the subject.
- As a source of ideas / reasoning for your own research (if properly referenced)
- For editing and paraphrasing (check your institution's definition of plagiarism and recommended paraphrase).
NEW ASSIGNMENT HELP?
Order New Solution. Quick Turnaround
Click on the button below in order to Order for a New, Original and High-Quality Essay Solutions. New orders are original solutions and precise to your writing instruction requirements. Place a New Order using the button below.
WE GUARANTEE, THAT YOUR PAPER WILL BE WRITTEN FROM SCRATCH AND WITHIN A DEADLINE.