Halaman

Thursday, August 8, 2019

Answer Sections 15 Quiz Database Programming with SQL 2019 Learner - English


Section 15


You need to create a view on the SALES table, but the SALES table has not yet been created. Which statement is true?    
                                                                               
                                               
                You must create the SALES table before creating the view.

                                               
                You can create the table and the view at the same time using the FORCE option.

                                               
                You can use the FORCE option to create the view before the SALES table has been created. (*)

                                               
                By default, the view will be created even if the SALES table does not exist.

                                                                               
Unlike tables, views contain no data of their own. True or False?              
                                                                               
                                               
                True (*)

                                               
                False

                                                                               
Which of the following keywords cannot be used when creating a view?      
                                                                               
                                               
                HAVING

                                               
                WHERE

                                               
                ORDER BY (*)

                                               
                They are all valid keywords when creating views.

                                                                               
In order to query a database using a view, which of the following statements applies?  
                                                                               
                                               
                The tables you are selecting from can be empty, yet the view still returns the original data from those tables.

                                               
                You can never see all the rows in the table through the view.

                                               
                Use special VIEW SELECT keywords.

                                               
                You can retrieve data from a view as you would from any table. (*)

                                                                               
A view can contain group functions. True or False?          
                                                                               
                                               
                True (*)

                                               
                False


Which action can be performed by using DML statements?  
                                                                               
                                               
                Deleting records in a table (*)

                                               
                Altering a table

                                               
                Creating PRIMARY KEY constraints

                                               
                Disabling an index

                                                                               
If a database administrator wants to ensure that changes performed through a view do not violate existing constraints, which clause should he include when creating the view?     
                                                                               
                                               
                WITH CONSTRAINT CHECK

                                               
                WITH CHECK OPTION (*)

                                               
                FORCE

                                               
                WITH READ ONLY

                                                                               
                                                               
For a View created using the WITH CHECK OPTION keywords, which of the following statements are true?   
                                                                               
                                               
                Prohibits changing rows not returned by the subquery in the view definition. (*)

                                               
                The view will allow the user to check it against the data dictionary

                                               
                Allows for DELETES from other tables, including ones not listed in subquery

                                               
                Prohibits DML actions without administrator CHECK approval

                                                                               
Which option would you use when creating a view to ensure that no DML operations occur on the view?   
                                                                               
                                               
                WITH READ ONLY (*)

                                               
                FORCE

                                               
                WITH ADMIN OPTION

                                               
                NOFORCE

                                                                               

Using the pseudocolumn ROWNUM in a view has no implications on the ability to do DML's through the view. True or False?       
                                                                               
                                               
                True

                                               
                False (*)


You must create a view that will display the name, customer identification number, new balance, finance charge, and credit limit of all customers.
You issue this statement:
CREATE OR REPLACE VIEW CUST_CREDIT_V
AS SELECT c.last_name, c.customer_id, a.new_balance, a.finance_charge, a.credit_limit
FROM customers c, accounts a
WHERE c.account_id = a.account_id WITH READ ONLY;

Which type of SQL command can be issued on the CUST_CREDIT_V view?
                                                          
                                               
                SELECT (*)

                                               
                DELETE

                                               
                INSERT

                                               
                UPDATE

                                                                               
The CUSTOMER_FINANCE table contains these columns:
CUSTOMER_ID NUMBER(9)
NEW_BALANCE NUMBER(7,2)
PREV_BALANCE NUMBER(7,2)
PAYMENTS NUMBER(7,2)
FINANCE_CHARGE NUMBER(7,2)
CREDIT_LIMIT NUMBER(7)

You execute this statement:

SELECT ROWNUM "Rank", customer_id, new_balance
FROM (SELECT customer_id, new_balance FROM customer_finance)
WHERE ROWNUM <= 25
ORDER BY new_balance DESC;

What statement is true?
                                                           
                                               
                The statement failed to execute because an inline view was used.

                                               
                The 25 greatest new balance values were displayed from the highest to the lowest.

                                               
                The statement will not necessarily return the 25 highest new balance values, as the inline view has no ORDER BY clause. (*)

                                               
                The statement failed to execute because the ORDER BY clause does NOT use the Top-n column.

                                                                               
A Top-N Analysis is capable of ranking a top or bottom set of results. True or False?      
                                                                               
                                               
                True (*)

                                               
                False

                                                                               
When you drop a table referenced by a view, the view is automatically dropped as well. True or False?             
                                                                               
                                               
                True

                                               
                False (*)

                                                                               
Which of the following describes a top-N query?      
                                                                               
                                               
                A top-N query returns the top 15 records from the specified table.

                                               
                A top-N query returns a result set that is sorted according to the specified column values.

                                               
                A top-N query returns the bottom 15 records from the specified table.

                                               
                A top-N query returns a limited result set, returning data based on highest or lowest criteria. (*)

                                                                               
                               

No comments:

Post a Comment

Final Exam Java Programming 2019 Learner - English

Final Exam