Your Perfect Assignment is Just a Click Away
We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

CIS 143 Introduction to SQL Quiz 2

CIS 143 Introduction to SQL Quiz 2

CIS 143 Introduction to SQL Quiz 2

Student Name ________________________________________ Section ___ Date _______

Part I – MULTIPLE CHOICE AND SHORT ANSWER PORTION

1. The following is the correct code to create a view:

a. CREATE VIEW kljview AS b. CREATE OR REPLACE VIEW kljview

c. CREATE kljview d. REPLACE VIEW kljview

2. Which of the following is/are correct to give an alias for a column? Use the table Dual to check your answer!

a. SELECT sysdate ”Bach” s’ ” Home”

b. SELECT sysdate ‘Beethoven’s Home’

c. SELECT sysdate ”Brahms”s Home”

d. SELECT sysdate ‘Mozart’ Home’

e. SELECT sysdate ”Katherine’s Home”

3. Choose which letter accurately describes the relationship of the following entities

Patient

Doctor

a. 0:0 b. 1:0 c. 1:1 d. 1:M e. M:M

4. The SQL code: SELECT &last_name, &first_name from employees;

a. involve substitution variables

b. asks for direct user input

c. will be ignored by the server

d. a and b

e. b and c

5. Marge enters the following date in RR format for the employee’s date of birth: 25-Dec-25

Marge enters this information on September 26th, 2051. What is the year of birth as recognized by Oracle? [be careful on this one! Do your research!!]

a. 2025 b. 2005 c. 1925 d. 1905 e. 2125

6. Only primary and foreign keys have the constraint NULL.

a. True b. False

7. The column heading is used to customize what the reader will see for the name of the column field.

a. True b. False

8. To determine the total of all the employees of department_id = 90 using the table called employees, the SQL code is

SELECT TOTAL(last_NAME) FROM employees WHERE department_id=90;

a. True b. False

9. What does the following query yield?

SELECT last_name, first_name, Oracle_test_score, date_test

FROM students

Where Oracle_test_score > (SELECT AVG(Oracle_test_score) from students)

10. Concatenate the result returned by the following number functions. Be sure to show the sql code, along with the query results!

ROUND(222.199,-2), TRUNC(222.199,-2)

11. What are the number of days to reach the day after December 1st, 2021? Be sure to show the sql code, along with the query results!

12. What is the proper code to format a column that contains numbers to represent currency? Once you have determined the format, use the code to format the number 500 to represent currency to the second decimal.

13. Give the code to concatenate the following two fields: Book_ID, Book_Desc

14. Name at least two reasons to construct a View.

15. Give two examples of using the CHECK constraint, one example of using the NULL constraint, and one example using the UNIQUE constraint. You may construct a table to show these constraints assigned to any fields for the table.

Part II – Payroll Problem!

Create a Payroll table for the ORACO Company that will contain the following field schema as of 10/31/2011, and populate the table [note the last row is to include your name and today’s date]. You may name the table payroll. BY THE WAY, THE TABLE HAS BEEN CREATED FOR YOU AND IS FOUND IN THE EXAM FOLDER!!

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: Homework Free only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Homework Free are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Homework Free is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Homework Free, we have put in place a team of experts who answer to all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

Homework Free Org

Your one stop solution for all your online studies solutions. Hire some of the world's highly rated writers to handle your writing assignments. And guess what, you don't have to break the bank.

© 2020 Homework Free Org