A relational view has which of the following characteristics

Assignment Help Database Management System
Reference no: EM131558133

1. Suppose that a PRODUCT table contains two attributes, PROD_CODE and VEND_CODE. Those two attributes have values of ABC, 125, DEF, 124, GHI, 124, and JKL, 123, respectively. The VENDOR table contains a single attribute, VEND_CODE, with values 123, 124, 125, and 126, respectively. (The VEND_CODE attribute in the PRODUCT table is a foreign key to the VEND_CODE in the VENDOR table.) Given that information, what would be the query output for a INTERSECT query based on these two tables?

a. The query output will be: 125,124,123,126

b. The query output will be: 123

c. The query output will be: 125,124,124,123,123,124,125,126

d. The query output will be: 123,124,125

2. What is the difference between UNION and UNION ALL?

a. A UNION ALL operator will yield all rows of both relations, including duplicates

b. UNION yields unique rows

c. UNION eliminates duplicates rows

d. All of these choices are correct.

3. A(n) ______________ is a block of PL/SQL code that is automatically invoked by the DBMS upon the occurrence of a data manipulation event (INSERT, UPDATE or DELETE.)

a. stored procedure

b. trigger

c. view

d. function
4. __________________ means that the relations yield attributes with identical names and compatible data types.

a. duplicated

b. Set comparable

c. Union compatible

d. compatible-oriented

5. Which of the following a parts of the definition of a trigger?

a. The triggering level

b. The triggering action

c. The triggering timing

d. All of these choices are correct.

6. Which of the following relational set operators does NOT require that the relations are union-compatible?

a. INTERSECT

b. PROJECT

c. MINUS

d. UNION

7. Suppose that you have two tables, EMPLOYEE and EMPLOYEE_1. The EMPLOYEE table contains the records for three employees: Alice Cordoza, John Cretchakov, and Anne McDonald. The EMPLOYEE_1 table contains the records for employees John Cretchakov and Mary Chen. Given that information, what is the query output for the INTERSECT query?

a. The query output will be: John Cretchakov and Mary Chen

b. The query output will be: Alice Cordoza, John Cretchakov, Anne McDonald and Mary Chen

c. The query output will be: John Cretchakov

d. The query output will be: Alice Cordoza, John Cretchakov, Anne McDonald, John Cretchakov and Mary Chen

8. A _____________________ is a join that performs a relational product (or Cartesian product) of two tables.

a. CROSS JOIN

b. DUPLICATE JOIN

c. OUTER JOIN

d. INNER JOIN

9. What Oracle function should you use to calculate the number of days between the current date and January 25, 1999?

a. SELECT SYSDATE()-#25-JAN-1999#;

b. SELECT SYSDATE - TO_DATE('25-JAN-1999', 'DD-MON-YYYY') FROM DUAL;

c. SELECT SYSDATE FROM DUAL;

d. SELECT SYSDATE()-JAN-#25-1999#;

10 . Using tables named T1 and T2, write a query example for a LEFT OUTER JOIN, assuming that T1 and T2 share a common column named C1.

a. SELECT * FROM T1 OUTER JOIN T2 ON T1.C1 = T2.C2;

b. SELECT * FROM T1 JOIN T2 ON T2.C1 = T2.C1;

c. SELECT * FROM T1 LEFT JOIN T2 ON T1.C1 = T2.C1;

d. SELECT * FROM T1 LEFT OUTER JOIN T2 ON T1.C1 = T2.C1;

11. Suppose that you have two tables, EMPLOYEE and EMPLOYEE_1. The EMPLOYEE table contains the records for three employees: Alice Cordoza, John Cretchakov, and Anne McDonald. The EMPLOYEE_1 table contains the records for employees John Cretchakov and Mary Chen. Given that information, what is the query output for the MINUS query (specifically, SELECT * FROM EMPLOYEE MINUS SELECT * FROM EMPLOYEE_1)?

a. The query output will be: Alice Cordoza, John Cretchakov, Anne McDonald and Mary Chen

b. The query output will be: Alice Cordoza, John Cretchakov, Anne McDonald, John Cretchakov and Mary Chen

c. The query output will be: Mary Chen

d. The query output will be: Alice Cordoza and Anne McDonald

12. What Oracle function should you use to return the current date?

a. TODAY

b. SYSDATE

c. NOW

13. Suppose that a PRODUCT table contains two attributes, PROD_CODE and VEND_CODE. Those two attributes have values of ABC, 125, DEF, 124, GHI, 124, and JKL, 123, respectively. The VENDOR table contains a single attribute, VEND_CODE, with values 123, 124, 125, and 126, respectively. (The VEND_CODE attribute in the PRODUCT table is a foreign key to the VEND_CODE in the VENDOR table.) Given that information, what would be the query output for a UNION ALL query based on these two tables?

a. The query output will be: 125,124,124,123,123,124,125,126

b. The query output will be: 125,124,124,123

c. The query output will be: 125,124,123,126

d. The query output will be: 123

14. _________________is a term used to refer to SQL statements that are contained within an application programming language such as COBOL, C++, ASP, Java, or ColdFusion.

a. NoSQL

b. Embedded SQL

c. Dynamic SQL

15. The order of the operands (tables) matter in a _______ query.

a. PROJECT

b. MINUS

c. UNION

d. INTERSECT

16. Which of the following is true of Oracle sequences?

a. You can have as many sequences as you want and they are not tied to any particular table.

b. A sequence is a completely independent object.

c. The sequence-generated value is not tied to any field in any table and can, therefore, be used on any attribute in any table.

17. Which of the following is true of Oracle sequences?

a. You can have as many sequences as you want and they are not tied to any particular table.

b. A sequence is a completely independent object.

c. The sequence-generated value is not tied to any field in any table and can, therefore, be used on any attribute in any table.

d. All of these choices are correct.

18. A(n) ______________ is a named collection of procedural and SQL statements that are stored in the database and that can be used to encapsulate and represent business transactions.

a. trigger

b. stored procedure

c. view

19. Suppose that you have two tables, EMPLOYEE and EMPLOYEE_1. The EMPLOYEE table contains the records for three employees: Alice Cordoza, John Cretchakov, and Anne McDonald. The EMPLOYEE_1 table contains the records for employees John Cretchakov and Mary Chen. Given that information, what is the query output for the UNION query?

a. The query output will be: Alice Cordoza, John Cretchakov, Anne McDonald and Mary Chen

b. The query output will be: John Cretchakov and Mary Chen

c. The query output will be: Alice Cordoza, John Cretchakov, Anne McDonald, John Cretchakov and Mary Chen

d. The query output will be: John Cretchakov

20. A subquery can appear in which of the following places in a SQL statement?

a. as part of a FROM clause,

b. to the right of a HAVING clause conditional operator,

c. in a EXISTS operator,

d. All of these choices are correct.

21. A __________ is a query (expressed as a SELECT statement) that is located inside another query and is normally executed first.

a. multi-query

b. subquery

c. outside query

d. special query

22. What string function (in Oracle) should you use to list the first three characters of a company's EMP_LNAME values using a table named EMPLOYEE?

a. SELECT STR(EMP_LNAME, 1, 3) FROM EMPLOYEE;

b. SELECT STRING(EMP_LNAME, 1, 3) FROM EMPLOYEE;

c. SELECT SUBSTRING(EMP_LNAME, 1, 3) FROM EMPLOYEE;

d. SELECT SUBSTR(EMP_LNAME, 1, 3) FROM EMPLOYEE;

23. _____________ is a term used to describe an environment in which the SQL statement is not known in advance; instead, the SQL statement is generated at run time.

a. PL/SQL

b. Embedded SQL

c. Dynamic SQL

d. NoSQL

24. Suppose that a PRODUCT table contains two attributes, PROD_CODE and VEND_CODE. Those two attributes have values of ABC, 125, DEF, 124, GHI, 124, and JKL, 123, respectively. The VENDOR table contains a single attribute, VEND_CODE, with values 123, 124, 125, and 126, respectively. (The VEND_CODE attribute in the PRODUCT table is a foreign key to the VEND_CODE in the VENDOR table.) Given that information, what would be the query output for a MINUS query (VENDOR MINUS PRODUCT) based on these two tables?

a. The query output will be: 124

b. The query output will be: 125,124,123,126

c. The query output will be: NULL

d. The query output will be: 126

25. In the relational model, SQL operators are ________________ because they operate over entire sets of rows and columns (or tables) at once.

a. set-oriented

b. table-oriented

c. completeness-oriented

26. Which of the followings explains the difference between a regular subquery and a correlated subquery?

a. A correlated subquery will execute once for each row evaluated by the outer query

b. A regular subquery executes only once and the result is held for use by the outer query

c. A regular subquery executes before the outer query

d. All of these choices are correct.

27. If you do not specify a join condition when joining tables, the result will be a ______________ or PRODUCT operation.

a. CROSS JOIN

b. DUPLICATE JOIN

c. INNER JOIN

d. OUTER JOIN

28. A ______________ is a subquery that executes once for each row in the outer query; it will run the outer query first, and then it will run the inner subquery once for each row returned in the outer subquery.

a. outside subquery

b. uncorrelated subquery

c. correlated subquery

29. A relational view has which of the following characteristics?

a. views are dynamically updated

b. views may be used as the basis for reports or queries, just like tables

c. views provide a level of security in the database

30. A(n) ______________ is a special type of object that generates unique numeric values in ascending or descending order; it can be used to assign values to a primary key field in a table and it provides functionality similar to the Autonumber data type in MS Access.

a. sequence

b. key

c. instance

d. view

31. which of the following is NOT considered an advantage of a stored procedure?

a. Increase performance

b. Help reduce code duplication through code isolation and code sharing

c. Reduce network traffic

d. None of these choices are correct.

32. What are the types of results a subquery can return?

a. a list of values only

b. a single value, a list of values, or a virtual table

c. a single value only

d. a virtual table only

33. The SQL standard prescribes three different types of __________ operations: LEFT, RIGHT, and FULL.

a. OUTER join

b. INNER join

c. DUPLICATE join

34. A(n) __________________ is a type of JOIN operation that yields all rows with matching values in the join columns as well as all unmatched rows ( those without matching values in the join columns).

a. INNER JOIN

b. OUTER JOIN

c. CROSS JOIN

d. DUPLICATE JOIN

35. Suppose that a PRODUCT table contains two attributes, PROD_CODE and VEND_CODE. Those two attributes have values of ABC, 125, DEF, 124, GHI, 124, and JKL, 123, respectively. The VENDOR table contains a single attribute, VEND_CODE, with values 123, 124, 125, and 126, respectively. (The VEND_CODE attribute in the PRODUCT table is a foreign key to the VEND_CODE in the VENDOR table.) Given that information, what would be the query output for a UNION query based on these two tables?

a. The query output will be: 123,124,125,126

b. The query output will be: 125,124,124,123

c. The query output will be: 125,124,123,126

d. The query output will be: 123

36. Triggers are critical to proper database operation and management in which of the following ways?

a. add functionality by automating critical actions and providing appropriate warnings for remedial action.

b. used to enforce constraints that cannot be enforced at the DBMS design and implementation levels.

c. can be used to enforce referential integrity, to update table values, insert records in tables, and call other stored procedures.

d. All of these choices are correct.

37. A(n) ________ is a virtual table based on a SELECT query.

a. view

b. copy

c. schema

38. Suppose that you have two tables, EMPLOYEE and EMPLOYEE_1. The EMPLOYEE table contains the records for three employees: Alice Cordoza, John Cretchakov, and Anne McDonald. The EMPLOYEE_1 table contains the records for employees John Cretchakov and Mary Chen. Given that information, what is the query output for the UNION ALL query?

a. The query output will be: Alice Cordoza, John Cretchakov, Anne McDonald and Mary Chen

b. The query output will be: John Cretchakov and Mary Chen

c. The query output will be: John Cretchakov

d. The query output will be: Alice Cordoza, John Cretchakov, Anne McDonald, John Cretchakov and Mary Chen

39. The ______________________ will yield all rows with matching values in the join columns, plus all of the unmatched rows from the right table.

a. CENTER OUTER JOIN

b. RIGHT OUTER JOIN

c. LEFT OUTER JOIN

d. FULL OUTER JOIN

Attachment:- Document.rar

Reference no: EM131558133

Questions Cloud

Why is it important to know variables within research study : Why is it important to know the variables within your research study? What type of measurement instrument might you use for your study?
Discuss how the applications mentioned are good choices : Choose two of the questions and discuss how the applications mentioned are good choices or how they may not bring about the expected results.
Verify probability distribution for an experiment : What is the probability that a U.S. user who downloads music, selected at random, does not obtain it from Italy, the United Kingdom (U.K.), or France?
How and why was the art produced by the ashcan school : How and why was the art produced by the Ashcan School different from that of the Gilded Age? To what changes in social history were artists reacting?
A relational view has which of the following characteristics : Triggers are critical to proper database operation and management in which of the following ways?
Research how nature is represented through art : Research how nature is represented through art. You will select three pieces and explain their meaning. You may choose the artworks for this presentation.
Verify that the table does give a probability distribution : DOWNLOADING MUSIC The following table, compiled in 2004, gives the percentage of music downloaded from the United States and other countries by U.S. users.
Describe the industry for your proposed new business : Describe the industry for your proposed new business. Describe the size, and sales projections of the industry associated with the proposed new business.
How the normal distribution is used in the example : This example may be from your own experience. Be sure to explain how the normal distribution is used in the example you provide.

Reviews

Write a Review

Database Management System Questions & Answers

  Draw an entity relationship diagram (erd)

Draw an entity relationship diagram (ERD) for the following situation: A company has a number of employees.  Each employee is identified by an Employee_Id.  The company wants to store Employee_Name, Employee_Address, and Employee_BirthDate in the dat..

  Display the final contents of each object''s field.

Write a program the instantiates a RealEstateSalesperson and a Girlscout object.

  Estimated costs and expected activity

Abel Company uses activity-based costing. The company has two products - estimated costs and expected activity

  Briefly summarize the results of the process

Import your data into IBM SPSS software using your assigned data set. Save the data file for future use, and use IBM SPSS software to compute frequencies on all appropriate variables. Briefly summarize the results of the process in 50 to 70 words

  Debugging the speed issue

A controller action is taking 10 seconds to run. Most of the time is being spent in a view which is a large file.(1000 lines). How will you go about debugging the speed issue?

  Write a program stored in a file named rain

Write a program, stored in a file named rain.py, that performs the following task. If there is no file with that name in the working directory, then the program outputs an (arbitrary) error message and exits.

  Define denormalization of a database schema be used

Under what situations would denormalization of a database schema be used? Give examples of denormalization.

  Design update trigger on part table which raises error

Design the Update trigger on Part table which raises an error string if Count field of updated row has a higher value than value prior to Update.

  Use oracle, list all system privileges assigned to user hr

Use Oracle, list ALL system privileges assigned to user HR. Please show screen shot if you can make it!

  Write-up thoughts on the tutorial

Write-up thoughts on the tutorial on given tutorials: 2005 Tutorials

  A uml class diagram to describe the ordering system class

a UML class diagram to describe the ordering system class

  What suppliers have sold more than 10000 euros

Define main key and foreign key. Represent graphically the relational data base, with its tables and connections of foreign keys. Follow this rule: 1:N connections is represented table with just one line above and table with multiple lines below.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd