Oracle Database Fundamentals

Covers Oracle database concepts including SQL syntax, indexes, views, constraints, user privileges, and database administration

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which constraint can be defined only at column level?

  1. unique
  2. not null
  3. check
  4. primary key
Question 2 Multiple Choice (Single Answer)

Which SELECT statement will get the result 'elloworld' from the string 'HelloWorld'?

  1. SELECT SUBSTR ('HelloWorld',1) FROM dual;
  2. SELECT LOWER (TRIM ('H' FROM 'Hello World')) FROM dual
  3. SELECT LOWER (SUBSTR('HellowWorld', 2,1) FROM dual
  4. SELECT INITCAP(TRIM('HellowWorld', 1,1) FROM dual
Question 3 Multiple Choice (Single Answer)

Which substitution variable would you use if you want to reuse the variable without prompting the user each time

  1. &
  2. accept
  3. prompt
  4. &&
Question 4 Multiple Choice (Single Answer)

CREATE USER sh IDENTIFIED BY sh; GRANT CREATE ANY MATERIALIZED VIEW CREATE ANY DIMENSION , DROP ANY DIMENSION , QUERY REWRITE , GLOBAL QUERY REWRITE TO dw_manager WITH ADMIN OPTION; GRANT dw_manager TO sh WITH ADMIN OPTION; Which action the user SH cannot perform?

  1. Create and drop a materialized view
  2. Grant and revoke the role to and from other users
  3. Enable the role and exercise any privileges in the role's privilege domain
  4. Select from a table
Question 5 Multiple Choice (Single Answer)

Which type of index does this syntax create? CREATE INDEX hr.employees_last_name_idx ON hr.employees(last_name) PCTFREE 30 STORAGE(INITIAL 200K NEXT 200K PCTINCREASE 0 MAXEXTENTS 50) TABLESPACE indx;

  1. Bitmap
  2. B-Tree
  3. Partitioned
  4. Reverse key
Question 6 Multiple Choice (Single Answer)

You need to create an index on the PASSPORT_RECORDS table. It contains 10 million rows of data. The key columns have low cardinality. The queries generated against this table use a combination of multiple WHERE conditions involving the OR operator. Which type of index would be best for this type of table?

  1. Bitmap
  2. Btree
  3. Unique
  4. partitioned
Question 7 Multiple Choice (Single Answer)

Which statement about the shared pool is true?

  1. The shared pool CANNOT be dynamically resized.
  2. The shared pool contains only fixed structures
  3. The shared pool consists of the library cache and buffer cache.
  4. The shared pool stores the most recently executed SQL statements and the most recently
Question 8 Multiple Choice (Single Answer)

Which action will cause a log switch?

  1. A transaction completes.
  2. The instance is started.
  3. The instance is shut down
  4. The current online redo log group is filled
Question 9 Multiple Choice (Single Answer)

You examine the alert log file and notice that errors are being generated from a SQL*Plus session. Which files are best for providing you with more information about the nature of the problem?

  1. Control file
  2. User trace files
  3. Background trace files
  4. Initialization parameter files
Question 10 Multiple Choice (Single Answer)

Which is a valid CREATE TABLE statement?

  1. CREATE TABLE EMP9$# AS (empid number(2));
  2. CREATE TABLE EMP*123 AS (empid number(2));
  3. CREATE TABLE PACKAGE AS (packid number(2));
  4. CREATE TABLE 1EMP_TEST AS (empid number(2));
Question 11 Multiple Choice (Single Answer)

A SELECT statement can be to perform these three functions: -Choose rows from a table -Choose columns from a table -Bring together data that is stored in different tables by creating a link between them. Which set of keywords describe these capabilities?

  1. difference,projection,join
  2. selection.projection,join
  3. selection,intersection,join
  4. intersection,projection,join
  5. difference,projection,product
Question 12 Multiple Choice (Multiple Answers)

Which four are types of functions available in SQL?

  1. string
  2. character
  3. integer
  4. numeric
  5. date
  6. conversion
Question 13 Multiple Choice (Single Answer)

Which object privileges can be granted on a VIEW?

  1. DELETE,INSERT,SELECT
  2. ALTER,DELETE,INSERT,SELECT
  3. DELETE,INSERT,SELECT,UPDATE
  4. none
Question 14 Multiple Choice (Single Answer)

Which iSQL*PLUS feature can be used to replace values in the WHERE clause?

  1. Substitution variables
  2. Replacement variables
  3. Prompt variables
  4. Instead-of variables
  5. This feature cannot be implemented through iSQL*PLUS
Question 15 Multiple Choice (Single Answer)

You want to display the titles of books that meet these criteria: 1. Purchased before January 21,2001 2. Price is less than $500 and greater than $900 You want to sort the results by thier date of purchase, starting with the most recently bought book. Which statement should you use?

  1. SELECT book_title FROM books WHERE price between 500 and 900 AND puchase_date < '21-JAN-2001' ORDER BY purchase_date;
  2. SELECT book_title FROM books WHERE price IN (500,900) AND puchase_date < '21-JAN-2001' ORDER BY purchase_date ASC;
  3. SELECT book_title FROM books WHERE price <500 or >900 AND puchase_date < '21-JAN-2001' ORDER BY purchase_date DESC;
  4. SELECT book_title FROM books WHERE (price<500 OR price>900) AND puchase_date < '21-JAN-2001' ORDER BY purchase_date DESC;
Question 16 Multiple Choice (Multiple Answers)

Examine the SQL statements that creates ORDERS table: CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL, STATUS VARCHAR2(10) CHECK (status IN('CREDIT','CASH')), PROD_ID NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order_id,order_date)); For which column would an index be automatically created when you execute the above SQL statement?(Choose two)

  1. SER_NO
  2. ORDER_ID
  3. STATUS
  4. PROD_ID
  5. ORD_TOTAL
  6. Composite index on ORDER_ID and ORDER_DATE
Question 17 Multiple Choice (Single Answer)

In a SELECT statement that includes a WHERE clause, where is teh GROUP BY clause placed in the SELECT statement?

  1. Immediately after the SELECT clause
  2. Before the WHERE clause
  3. Before the FROM clause
  4. After the ORDER BY clause
  5. After the WHERE clause
Question 18 Multiple Choice (Single Answer)

In which case would you use a FULL OUTER JOIN?

  1. Both tables have NULL values
  2. You want all unmatched data from one table
  3. You want all matched data from both tables
  4. You want all unmatched data from both tables
  5. One of the tables has more data than the other
  6. You want all matched and unmatched data from only one table
Question 19 Multiple Choice (Multiple Answers)

Which two statements accurately describes a role?(Choose two)

  1. A role can be given to a maximum of 1000 users
  2. A user can have access to a maximum of 10 roles
  3. A role can have a maximum of 100 privileges contained in it
  4. Privileges are given to a role by using the CREATE ROLE statement
  5. A role is a named group of related privileges that can be granted to the user
  6. A user can have access to several roles, and several users can be assigned to the same role
Question 20 Multiple Choice (Multiple Answers)

what are the three main components in Hibernate architecture?

  1. Connection Management
  2. Bean Management
  3. Transaction Management
  4. Object relational mapping
  5. Relational Management