Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello this needs to be done using ORACLE SQL --============================================ -- DATA BASE OBJECTS -- 60 points (5 points each) --============================================ /* 1. Write the

Hello this needs to be done using ORACLE SQL

--============================================ -- DATA BASE OBJECTS -- 60 points (5 points each) --============================================ /* 1. Write the SQL to get the Employee Count by Manager. Your results should include the following details: Manager Employee ID Manager Last Name Manager First Name Manager Department Name (not Department_ID) Manager Job_Title (not Job_ID) Employee Count Sort your results by employee count (descending). HINT: This will require a self-join on HOL_EMPLOYEES, other JOINS, and a sub- query. */ /* 2. Write the SQL to create a view called vManagerEmployeeCount using your query from Q1. Make this view read-only. In a second SQL statement, Select all rows from your view. */ /* 3. Create a SYNONYM for your view named vMEC. Write a separate SQL statement to select all rows from your view using your synonym. */ /* 4. Using your SYNONYM, write a query to display all results from your view. Sort your results be department name. */ /* 5. Using your SYNONYM, write a query to display results from you view where employee count >= 4. Sort results by Manager last and first names. */ /* 6. Write the SQL to create a sequence with following specifications: Name: SEQ_HOL_BOOK_CATEGORY Starting Value: 10 Maximum Value: 10000000 Increment By: 1

*/ /* 7. Write and run an INSERT statement to create a new Book Category named "Drama". Use you SEQ_HOL_BOOK_CATEGORY to generate a value for the PK of this new row. */ /* 8. Modify (do not recreate) the SEQ_HOL_BOOK_CATEGORY so that it increments by 5 and there is no maximum value. */ /* 9. Write the SQL to remove the HOL_DEPARTMENTS_SEQ from the database. This sequence was created in Module 1 or 2. */ /* 10. Write the SQL to create an index named IX_CUST_NAME for the LAST_NAME and FIRST_NAME columns in the HOL_CUSTOMERS table. */ /* 11. What is the benefit of IX_CUST_NAME? */ /* 12. Use APEX Object Browser to find all of the indexes on HOL_EMPLOYEES. Answer these questions. 1. How many Indexes are declared on HOL_EMPLOYEES? 2. What are the names of each of these indexes? 3. Which of these indexes are UNIQUE? 4. Which of these indexes are NONUNIQUE? 5. For each index, what are the column/s the index os based upon? */

image text in transcribedimage text in transcribed

DBMS 130: HOL Small Company ERD

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And SQL For DB2

Authors: James Cooper

1st Edition

1583473572, 978-1583473573

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago