Ask DBMS Expert


Home >> DBMS

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

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M92366850

Have any Question?


Related Questions in DBMS

Data mining assignment -in this assignment you are asked to

Data Mining Assignment - In this assignment you are asked to explore the use of neural networks for classification and numeric prediction. You are also asked to carry out a data mining investigation on a real-world data ...

Sql query assignment -for this assignment you are to write

SQL Query Assignment - For this assignment you are to write your answers in a word document. This assignment is in three parts: Part A (reporting queries), Part B (query performance), Part C (query design). For this assi ...

The groceries datasetimagine 10000 receipts sitting on your

The groceries Dataset Imagine 10000 receipts sitting on your table. Each receipt represents a transaction with items that were purchased. The receipt is a representation of stuff that went into a customer's basket. That ...

You are in a real estate business renting apartments to

You are in a real estate business renting apartments to customers. Your job is to define an appropriate schema using SQL DDL in MySQL. The relations are Property(Id, Address, NumberOfUnits), Unit(ApartmentNumber, Propert ...

Objectivethe objective of this lab is to be familiar with a

OBJECTIVE: The objective of this lab is to be familiar with a process in big data modeling. You're required to produce three big data models using the MS PowerPoint software. This tool is available on UMUC Virtual Deskto ...

The relation memberstudentid organizationid roleid stores

The relation Member(StudentId, OrganizationId, RoleId) stores the membership information of student joining organization. For example, ('S1', 'O2', 'R3') indicates that student with Id 'S1' joined the organization with i ...

Relational database exerciseyou have been assigned to a new

Relational Database Exercise: You have been assigned to a new development team. A client is requesting a relational database system to manage their present store with the anticipation of adding more stores in the future. ...

Relational database design a given the following business

Relational Database Design A) Given the following business rules, identify entity types, attributes (at least two attributes for each entity, including the primary key) and relationships, and then draw an Entity-Relation ...

We can represent a data set as a collection of object nodes

We can represent a data set as a collection of object nodes and a collection of attribute nodes, where there is a link between each object and each attribute, and where the weight of that link is the value of the object ...

Data model development and implementationpurpose of the

Data model development and implementation Purpose of the assessment (with ULO Mapping) The purpose of this assignment is to develop data models and map Database System into a standard development environment to gain unde ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As