COSCI 186 CH 7-11 MIDTERM

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Which of the following search patterns would find dates occurring only in the year 2003?​ ​%03% ​*03 %03 _03%

%03

The maximum number of columns that can be specified for sorting data is ____. 25 52 225 255

255

​A table alias can consist of a maximum of ____ characters. 12 225 255 30

30

​To instruct Oracle12c to sort data in ascending order, enter ____ after the column name in the ORDER BY clause. ASC A ASCENDING either A or C

ASC

Which of the following SQL statements will create a new role named PRCLERK?​ CREATE prclerk; CREATE ROLE prclerk; CREATE ROLE prclerk ON payroll; CREATE ROLE prclerk WITH SELECT ANY TABLE PRIVILEGE;

CREATE ROLE prclerk;

​The ____ privilege will allow a user to connect to the Oracle12c database. CREATE CONNECT CREATE LOG CREATE SESSION CONNECT

CREATE SESSION

To instruct Oracle12c to sort data in descending order, enter ____ after the column name in the WHERE clause.​ D DES DESC none of the above

DESC

Which command will remove an existing role from a database?​ DROP rolename; DROP ROLE rolename; DELETE ROLE rolename; DELETE rolename;

DROP ROLE rolename;

A NULL value is the same as a blank space.​

False

A column qualifier is separated from the column name with a colon.

False

A role can only be granted to other roles.​

False

A system privilege can be taken away from a user through the UNGRANT command

False

A user can be granted both system and object privileges in the same GRANT command.

False

A(n) outer join can be created by not including a joining condition in a SELECT statement.

False

An inequality join refers to a join that is used to link a table to a copy of itself.

False

An outer join only lists rows that contain a match in both tables.

False

An outer join operator can be included in a FROM clause to list all rows from one table that do not have a corresponding row in the other table.

False

An outer join operator consists of a minus sign enclosed in parentheses, (-).

False

Equality, non-equality, and self-joins are broadly categorized as outer joins.

False

Even if a set of privileges have been assigned to a role, it does not make it any easier for the DBA since the privileges will still need to be granted individually to the users.​

False

If a Cartesian join is used to link table A which contains five rows to table B which contains eight rows, there will be 13 rows in the results.

False

If a table alias is assigned in the SELECT clause, it must be used any time the table is referenced in that SQL statement. ​

False

In a WHERE clause, logical operators are evaluated before comparison operators.

False

Once a privilege has been granted to a role, it cannot be revoked without re-creating the role.​

False

Oracle12c uses a process known as selection to ensure that users are who they say they are. ​

False

The IN comparison operator is used when searching for a pattern of characters.

False

The JOIN keyword must be used in the WHERE clause of a SELECT statement.

False

The NATURAL JOIN keywords can be used to create non-equality joins.

False

The ON clause can be used only if the tables being joined have a common column with the same name.

False

The ON clause of the GRANT command is used to specify which objects can be altered by the system privilege(s) specified in the command.​

False

The SORT BY clause is used to present query results in a specific order.​

False

The maximum number of columns that can be used to sort data is 25. ​

False

The maximum number of columns that can be used to sort the results of a query is 52.​

False

When combining the results of two SELECT statements with the MINUS keyword, duplicate rows are suppressed in the results.

False

When two conditions are joined by the AND keyword, both conditions must be FALSE for a record to be included in the results.

False

When using a search pattern, a(n) ? symbol is used to indicate exactly one character in that position.

False

​Comparison operators are used to combine search conditions.

False

​Data stored in multiple tables can be combined through the use of an ORDER BY clause.

False

​To find rows containing a NULL value in a specified column, you must use the search condition of = NULL.

False

Which command will grant a system privilege to a user?​ ​GRANT systemprivilege USERNAME username GRANT PRIVILEGE systemprivilege TO username GRANT systemprivilege TO username GRANT systemprivilege ON username

GRANT systemprivilege TO username

Partial list of privileges. Which of the following SQL statements would most likely be used to generate the partial output shown above? SELECT name FROM SYSTEM_PRIVILEGE_MAP; SELECT * FROM USER_CURRENT_PRIVILEGES; SELECT * FROM SESSION_PRIVS; SELECT name FROM SESSION_PRIVS;

SELECT name FROM SYSTEM_PRIVILEGE_MAP;

Which of the following SQL statements will allow a user to enable the DBA role? ENABLE dba; SET ROLE dba; SET dba; none of the above

SET ROLE dba;

Which of the following commands will enable a role for a user?​ ENABLE ROLE rolename; ENABLE rolename; SET ROLE rolename; ROLE rolename;

SET ROLE rolename;

A role can be created with the CREATE ROLE command.​

True

A table alias is assigned in the FROM clause.

True

A user can be assigned a default role that is automatically enabled whenever the user logs in to the database.

True

A(n) Cartesian Join replicates each row from the first table with every row from the second table.

True

An object privilege cannot be granted to a role with the WITH GRANT OPTION.​

True

Both system and object privileges can be granted with the GRANT command.​

True

By default, the JOIN keyword creates an inner join.

True

By default, use of the JOIN keyword creates an inner join.​

True

Column qualifiers must be included in the WHERE clause if the columns used to join the tables have the same column names.​

True

Equality, non-equality, and self-joins are all categorized as inner joins.

True

If a Cartesian join is used to link table A which contains two rows to table B which contains eight rows, there will be sixteen rows in the results.

True

If you are joining four tables in a SELECT statement, three joining conditions will be required.

True

Tables can be joined in the FROM clause or the WHERE clause of a SELECT statement.

True

The <>, !=, or ^= operators can be used to search for values that are not equivalent to the specified search condition. ​

True

The NATURAL JOIN keywords can be used to link two tables that have a commonly named and defined column.

True

The most common type of join is an equijoin, which joins two or more tables together based upon the tables having equivalent data values in a common column.

True

User names can consist of up to 30 characters and include the _, #, and $ symbols

True

When a role is removed from the database, users will lose any privileges assigned to them through that role.​

True

When sorting data, the values will be sorted in ascending order by default

True

Which of the following clauses is used to restrict the rows returned by a query? SELECT FROM WHERE ORDER BY

WHERE

Which of the following keywords must be included with the GRANT command to allow the user to grant object privileges to other users? WITH GRANT OPTION; WITH ADMIN OPTION; WITH SYSADMIN OPTION; WITH DBA OPTION;

WITH GRANT OPTION;

Which of the following can be considered potential threats to an organization's data? natural disaster disgruntled employees computer criminals all of the above

all of the above

Which of the following is a valid logical operator?​ NOT AND OR all of the above

all of the above

When the WHERE clause contains multiple types of operators, which of the following is resolved first? ​arithmetic operations ​comparison operators ​logical operators union operators

arithmetic operations

The order in which NULL values appear in the results can be overridden by which of the following keywords?​ NULLS FIRST NULLS LAST NSEQ both A and B

both A and B

Which of the following search patterns could be used to find the word HELLO in Oracle12c?​ ​%H% HEL* _EL* %HEL?O

​%H%

Which of the following SQL statements will change the password for user RTHOMAS to ANEW5PASSWORD​ ​ALTER USER rthomas PASSWORD TO anew5password; ​CHANGE USER rthomas IDENTIFIED BY anew5password; MODIFY USER rthomas PASSWORD TO anew5password; ​ALTER USER rthomas IDENTIFIED BY anew5password;

​ALTER USER rthomas IDENTIFIED BY anew5password;

Which of the following search conditions can be used to identify records that have data stored in a column named ColB?​ ​ColB IS NOT NULL ​ColB ^= NULL ​ColB != NULL All of the above

​ColB IS NOT NULL

The ____ command is used to revoke a role.​ ​REVOKE rolename FROM username; ​ALTER rolename REVOKE username; DROP rolename FROM username; DROP rolename REVOKE FROM username;

​REVOKE rolename FROM username;

Contents of BOOKS table Based upon the contents of the BOOKS table in the accompanying figure, which of the following queries will display all books stored in the BOOKS table that generate more than 60 percent profit?​ ​SELECT * FROM booksWHERE profit > .6; ​SELECT * FROM booksWHERE (retail-cost)/cost > .60; ​SELECT * FROM booksWHERE (retail-cost)/cost > 60%; SELECT * FROM booksWHERE (retail-cost)/cost > '60';

​SELECT * FROM booksWHERE (retail-cost)/cost > .60;

Structure of the ORDERS table Structure of the CUSTOMERS table ​Which SQL statement will return the same results as the following SQL statement? SELECT * FROM orders, customers; ​SELECT * FROM orders CROSS JOIN customers; SELECT * FROM orders, customers WHERE orders.customer# = customers.customer#; SELECT * FROM orders, customers WHERE orders.customer# > customers.customer#; SELECT * FROM o orders , c customers WHERE o.customer# = c.customer#;

​SELECT * FROM orders CROSS JOIN customers;

Structure of the CUSTOMERS table Structure of the ORDERS table Structure of the ORDERITEMS table Structure of the BOOKS table Which of the following SQL statements will display the title of all books that have had multiple copies requested in a single order?​ ​SELECT title FROM books NATURAL JOIN orderitems WHERE qty > 1; ​SELECT title FROM books JOIN orderitems WHERE qty > 1; SELECT title FROM books JOIN orderitems ON (isbn) JOIN orders ON (order#) WHERE qty>1; SELECT title FROM books JOIN orderitems USING(isbn);

​SELECT title FROM books NATURAL JOIN orderitems WHERE qty > 1;

Which of the following is not a method used by the Oracle 12c database to prevent illegal access into the software? ​automatic encryption of all user input ​limiting user privileges to access data authentication through user name and password​ ​support for third-party security software and hardware devices

​automatic encryption of all user input

In regards to sorting, if a DISTINCT option is used in the SELECT clause of a query then ____.​ an ORDER BY clause can not be added ​only columns in the SELECT clause can be used for sorting ​only a primary sort is allowed none of the above

​only columns in the SELECT clause can be used for sorting

Which of the following symbols is a wildcard character that can represent any number of characters in a WHERE clause?​ ​asterisk (*) ​underscore (_) ​question mark (?) ​percent sign (%)

​percent sign (%)


Set pelajaran terkait

BADM 710 Final Exam (Connect Quizzes)

View Set

Add a Little Spice (& Herbs) to your Life Packet

View Set

Chapter 2 - Money & the Monetary System: Practice Questions

View Set

MOLECULAR SHAPES: NO LONE PAIRS ON CENTRAL ATOM CK12

View Set

Government Review #2 for Chapter 8

View Set

FIN 370 Final Exam- Chapter 11-12

View Set