Tag: databases

Questions Related to databases

  1. Backup and Recovery

  2. Transactions

  3. Security

  4. Queries


Correct Option: D

Which of the following is a typical data warehouse query?

  1. What is this customer’s address?

  2. Does this customer have any unpaid bills?

  3. What is the balance in this customer’s account?

  4. What is the total sales for each of the last 6 months?


Correct Option: D

Which of the following best describes the age of the data in an OLTP system?

  1. Current

  2. Projected

  3. Historical

  4. Current and Projected


Correct Option: A
  1. Encrypt the table's data

  2. Create a view that does not contain the AVG_SALARY column

  3. Revoke SELECT access for the AVG_SALARY column from users who should not see AVG_SALARY data

  4. Store AVG_SALARY data in a separate table and grant SELECT privilege for that table to the appropriate users


Correct Option: B

Assuming USER1 has no authorities or privileges, which of the following will allow USER1 to create a view named VIEW1 that references two tables named TAB1 and TAB2?

  1. CREATEIN privilege on the database

  2. REFERENCES privilege on TAB1 and TAB2

  3. CREATE_TAB privilege on the database

  4. SELECT privilege on TAB1 and TAB2


Correct Option: D

AI Explanation

To answer this question, you need to understand the different privileges and authorities needed to create a view that references tables.

Let's go through each option to understand why it is correct or incorrect:

Option A) CREATEIN privilege on the database - This option is incorrect because the CREATEIN privilege allows the user to create objects within a specified schema, but it does not grant the user the ability to reference tables or create views.

Option B) REFERENCES privilege on TAB1 and TAB2 - This option is incorrect because the REFERENCES privilege allows the user to create foreign key constraints that reference the specified tables, but it does not grant the user the ability to create views.

Option C) CREATE_TAB privilege on the database - This option is incorrect because the CREATE_TAB privilege does not exist in the context of creating views. It may be a made-up privilege or a misrepresentation of the actual privilege required.

Option D) SELECT privilege on TAB1 and TAB2 - This option is correct because the SELECT privilege allows the user to query the specified tables and retrieve data. When creating a view, the user needs to reference the tables and retrieve data from them, which requires the SELECT privilege.

Therefore, the correct answer is Option D. This option is correct because the SELECT privilege on TAB1 and TAB2 allows USER1 to create a view named VIEW1 that references the two tables.

A user wishing to invoke an SQL stored procedure that queries a table must have which of the following privileges?

  1. CALL privilege on the procedure; SELECT privilege on the table

  2. CALL privilege on the procedure; REFERENCES privilege on the table

  3. EXECUTE privilege on the procedure; SELECT privilege on the table

  4. EXECUTE privilege on the procedure; REFERENCES privilege on the table


Correct Option: C
  1. DELETE privilege on the table

  2. DELETE privilege on the alias

  3. DELETE privilege on the alias; REFERENCES privilege on the table

  4. REFERENCES privilege on the alias; DELETE privilege on the table


Correct Option: A