Details of this Paper

basic SQL statements

Description

solution


Question

;;Question 1 3ptsIf introduced as follows, the subquery can return which of the values listed below?;WHERE vendor_id NOT IN (subquery);a single value;a column of one or more rows;a table;asubquery can't be introduced in this way;Question 2 3 pts If introduced as follows, the subquery can return which of the values listed below?;WHERE (subquery);If introduced as follows, the subquery can return which of the values listed below?;WHERE (subquery);a single value;a column of one or more rows;a table;asubquery can't be introduced in this way;Question 3 3 pts You can use the AS keyword with the CREATE TABLE statement to create a copy of a table from a ____________________ statement.;You can use the AS keyword with the CREATE TABLE statement to create a copy of a table from a ____________________ statement.;FROM;WHERE;SELECT;NONE OF THE THESE CHOICES;Question 4 3pts Skip to Question text.;Assuming that all of the table and column names are spelled correctly, what's wrong with the INSERT statement that follows?;INSERT INTO invoices;(vendor_id, invoice_number, invoice_total, payment_total, credit_total;terms_id, invoice_date, invoice_due_date);VALUES;(97, '456789', 8344.50, 0, 0, 1, '31-AUG-08');The column names in the column list are in the wrong sequence.;There are too many items in the column list.;There are too few items in the VALUES list.;The number of items in the column list doesn't match the number in the VALUES list.;Question 5 3pts By default, the INSERT, UPDATE, and DELETE statements that you issue don't make permanent changes to an Oracle database until you issue a _____________________ statement.;By default, the INSERT, UPDATE, and DELETE statements that you issue don't make permanent changes to an Oracle database until you issue a _____________________ statement.;Commit;Rollback;Save;Save Changes;Question 6 3 pts A subquery can be coded in a WHERE, FROM, SELECT, or ______________ clause.;A subquerycan be coded in a WHERE, FROM, SELECT, or ______________ clause.;Having;Order By;group By;None of these choices;Question 7 3pts If first_name contains Edward and last_name contains Williams, what will the Solution column contain when this code is executed? LOWER(LEFT(first_name,1) + LEFT(last_name,7)) AS solution;If first_name contains Edward and last_name contains Williams, what will the Solution column contain when this code is executed? LOWER(LEFT(first_name,1) + LEFT(last_name,7)) AS solution;EWilliams;EWilliam;ewilliams;ewilliam;Question 8 3 ptsWhich uses the least amount of storage?;Which uses the least amount of storage?;example' stored in a column of type CHAR(20);exam' stored in a column of type CHAR(20);ex' stored in a column of type CHAR(20);they all use the same amount of storage;Question 9 3pts The _____________________ of a numeric data type indicates the total number of digits that can be stored in the data type.;The _____________________ of a numeric data type indicates the total number of digits that can be stored in the data type.;magnitude;type;scale;precision;Question 10 1 pts All of the following values can be stored in a column that's defined as NUMBER(6,2), except;All of the following values can be stored in a column that's defined as NUMBER(6,2), except;32492.05;-246.29;0;2479.95;Question 11 3 pts The DATE data type can store;The DATE data type can store;dates only;dates and times;times only;dates and numbers;Question 12 3 ptsWhich uses the least amount of storage?;Which uses the least amount of storage?;example' stored in a column of type VARCHAR2(20);exam' stored in a column of type VARCHAR2(20);ex' stored in a column of type VARCHAR2(20);they all use the same amount of storage;Question 13 3pts To store an integer with an Oracle data type (not one of the ANSI standard synonyms), you use the ____________________ data type. Pick the best answer.;To store an integer with an Oracle data type (not one of the ANSI standard synonyms), you use the ____________________ data type. Pick the best answer.;DATE;NUMBER;VARCHAR2;CHAR;Question 14 3 pts Which of the following statements best describes what this INSERT statement does?;INSERT INTO invoices_copy;SELECT *;FROM invoices;WHERE terms_id = 1;Which of the following statements best describes what this INSERT statement does?;INSERT INTO invoices_copy;SELECT *;FROM invoices;WHERE terms_id = 1;Adds one row from the Invoices table to the Invoices_Copy table.;Adds all of the rows in the Invoices table that have 1 in the terms_id column to the Invoices_Copy table.;Adds all of the rows in the Invoices table to the Invoices_Copy table and sets the terms_id column to 1 in each row.;Updates all of the rows in the Invoices_Copy table that have 1 in the TermsID column to the rows in the Invoices table.;Question 15 3 pts When you identify the data elements in a new database, you typically subdivide data elements into;When you identify the data elements in a new database, you typically subdivide data elements into;the largest practical components;the smallest practical components;components that can be easily parsed each time you use them;None of these choices;Question 16 3 ptsWhich of the following does not violate the referential integrity of a database?;Which of the following does not violate the referential integrity of a database?;inserting a new row into a table with a foreign key that doesn't match a primary key in the related table;updating a foreign key with a value that doesn't match a primary key in the related table;updating a primary key in a primary key table without also updating the foreign keys for the related rows in all related tables;deleting a row in a foreign key table without deleting the related row in the related primary key table;Question 17 3ptsDenormalization typically results in all but one of the following. Which one is it?;Denormalization typically results in all but one of the following. Which one is it?;larger tables;redundant data;more complicated SQL coding;reduced performance;Question 18 3pts Skip to Question text.;If expiration_date contains a value that's equivalent to November 2, 2008 and the SYSDATE function returns a value that's equivalent to December 17, 2008, what will the exp_days column contain when this code is executed?;expiration_date - SYSDATE AS exp_days;1.5;-1.5;-45;45;Question 19 3pts To apply the second normal form, you move columns that don't depend on the entire primary key to another table and establish a relationship between the two tables. This;To apply the second normal form, you move columns that don't depend on the entire primary key to another table and establish a relationship between the two tables. This;reduces redundancy and makes maintenance easier;reduces redundancy but makes maintenance more difficult;increases redundancy but makes maintenance easier;increases redundancy but makes the data more consistent;Question 20 3pts You can't code which one of the following as part of a CREATE TABLE statement;You can't code which one of the following as part of a CREATE TABLE statement;not null constraints;column-level constraints;table-level constraints;function-based indexes;Question 21 3 ptsWhich of the following is the best way to sort a VARCHAR2 column that contains numbers in numeric sequence? In the ORDER BY clause;Which of the following is the best way to sort a VARCHAR2 column that contains numbers in numeric sequence? In the ORDER BY clause;use the TO_NUMBER function to convert the column values to numbers;use the RPAD function to add zeros to the column values;use the TO_CHAR function to format the all the numbers in the column the same way;use the TRIM function to trim off any leading zeros in the column so all the numbers will be formatted the same way;Question 22 3pts To model a database on a real-world system, you typically represent each real-world entity as a/an ____________________________.;To model a database on a real-world system, you typically represent each real-world entity as a/an ____________________________.;table;view;diagram;row;Question 23 3 pts If two tables have a one-to-many relationship, you need to add a _______________________ column to the table on the "many" side.;If two tables have a one-to-many relationship, you need to add a _______________________ column to the table on the "many" side.;primary key;unique key;foreign key;None of these choices;Question 24 3pts Typically, most database designers consider a database structure normalized if it's in the ________________________ normal form.;Typically, most database designers consider a database structure normalized if it's in the ________________________ normal form.;first;second;third;fourth;Question 25 3pts Which of the following are reasons we create conceptual models?;Which of the following are reasons we create conceptual models?;It facilitates discussion. A picture is worth a thousand words.;It forms important ideal system documentation.;It forms a sound basis for physical database design.;All of these choices;Question 26 3 ptsTo be in the first normal form, each cell in a table must contain;To be in the first normal form, each cell in a table must contain;a unique value;a non-unique value;a single, scalar value;a non-redundant value;Question 27 3pts Each table in a database should have a _____________________________ that uniquely identifies each row.;Each table in a database should have a _____________________________ that uniquely identifies each row.;Unique key;Primary key;Foreign key;Check key;Question 28 3 pts Which of the following is not a valid way to avoid search problems when you want to search for rows that have a specific date in a column that's defined with the DATE data type?;Which of the following is not a valid way to avoid search problems when you want to search for rows that have a specific date in a column that's defined with the DATE data type?;use the TRUNC function to truncate the time values from the date value in the column that you're searching;search for date values that fall between the day and the day after the date you want;use the TO_DATE function to remove the time values from the dates in each column;Question 29 3 pts.;Which of the following statements best describes what this SELECT statement does?;SELECT invoice_number, invoice_date;CASE;WHEN (SYSDATE - invoice_date) >= 30 AND (SYSDATE - invoice_date) = 60 AND (SYSDATE - invoice_date) 90 THEN invoice_total;ELSE 0;END AS "Over 90";FROM invoices;Displays three columns for each invoice with a value in the third column that indicates how many days have elapsed between the invoice date and the current date.;Displays five columns for each invoice with the invoice total in one of the last three columns based on how many days have elapsed between the invoice date and the current date.;Displays three columns for each invoice with one of these messages in the third column: 30-60, 60-90, or Over 90.;Displays five columns for each invoice with a message in one of the last three columns based on how many days have elapsed between the invoice date and the current date.;Question 30 3 pts To be in the third normal form;To be in the third normal form;each non-key column must depend only on the primary key;each non-key column must not depend on the primary key;each non-key column must contain repeating values;all of these choices;Question 31 3 pts In a physical data model, an attribute is represented as a/an;In a physical data model, an attribute is represented as a/an;Foreign Key;column;row;instance;Question 32 3pts In a business that sells computers, choose the best relationship name from CUSTOMER to ITEM (computer, in this case).?;In a business that sells computers, choose the best relationship name from CUSTOMER to ITEM (computer, in this case).?;Each CUSTOMER must be the buyer of one or more ITEMS.;Each CUSTOMER may be the maker of one or more ITEMS.;Each CUSTOMER may be the producer of one or more ITEMS.;Each CUSTOMER must be the seller of one or more ITEMS.;Question 33 3 pts When you resolve a M-M (many-to-many) relationship by creating an intersection entity, this new entity will always inherit;When you resolve a M-M (many-to-many) relationship by creating an intersection entity, this new entity will always inherit;The attributes of both related entities.;A relationship to each entity from the original M-M.;The UID's from the entities in the original M-M.;Nothing is inherited from the original entities and relationship.;Question 34 3pts What is a NULL value?;What is a NULL value?;A perfect zero;A known value less than zero;An unknown value;A blank space

 

Paper#68250 | Written in 18-Jul-2015

Price : $34
SiteLock