Final Prep Multiple Choice CIST1220-Structured Query Language-SQL

Final Prep Multiple Choice CIST1220-Structured Query Language-SQL

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

Non-transferable relationships can only be mandatory, not optional. True or False?

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

4 years ago

Date created

Mar 1, 2020

Cards (172)

Section 1

(50 cards)

Non-transferable relationships can only be mandatory, not optional. True or False?

Front

B) False

Back

If a relationship can be moved between instances of the entities it connects, it is said to be: A) Recursive B) Transferable C) Committed D) Implicit

Front

B) Transferable

Back

Which of the following is the definition for Third Normal Form? A) All attributes are single valued B) All attributes are uniquely doubled and independent C) An attribute must be dependent upon the entity's entire UID D) No non-UID attribute can be dependent on another non-UID attribute

Front

D) No non-UID attribute can be dependent on another non-UID attribute

Back

Audit trail attributes cannot be placed in the entities they are auditing, they must be placed in separate, new entities, created just for that purpose. True or False?

Front

B) False

Back

Which of the following are examples of data vs. information: A) Student age vs. average age of all students in class B) Bank deposit amount vs. total account balance C) Winning time for a race vs. length of race D) Price of a computer vs. total sales of all computers for a company E) A, B, and D

Front

E) A, B, and D A) Student age vs. average age of all students in class B) Bank deposit amount vs. total account balance D) Price of a computer vs. total sales of all computers for a company

Back

If you are tracking employment dates for an employee, do you need to have an "End Date" attribute? A) No, not if the company likes the employee. B) No, because an end date is usually redundant. C) Yes, if the company wants to track multiple start dates and insure that multiple employment dates for an employee do not overlap. D) Yes, because you always need an end date when you have a start date.

Front

C) Yes, if the company wants to track multiple start dates and insure that multiple employment dates for an employee do not overlap.

Back

A unique identifier can only be made up of one attribute. True or False?

Front

B) False

Back

Examine the following entity and decide which attribute breaks the 2nd Normal Form rule: ENTITY: CLASS ATTRIBUTES: A) CLASS ID B) DURATION C) SUBJECT D) TEACHER NAME AND ADDRESS

Front

D) TEACHER NAME AND ADDRESS

Back

This diagram could also be expressed as a supertype/subtype construction. True or False?

Front

B) False

Back

Which of the following represents the correct sequence of steps in the Database Development Process? A) Analyze, Design, Build B) Build, Analyze, Design C) Design, Build, Analyze D) Analyze, Build, Design

Front

A) Analyze, Design, Build

Back

Which of the following is a logical constraint that could result from considering how time impacts the storage of data? A) End Date must be before the Start Date. B) An ASSIGNMENT may only refer to a COUNTRY that is valid at the Start Date of the ASSIGNMENT. C) Dates have value only with a time component. D) ASSIGNMENT periods can overlap causing the database to crash.

Front

B) An ASSIGNMENT may only refer to a COUNTRY that is valid at the Start Date of the ASSIGNMENT.

Back

Many-to-Many relationships are perfectly acceptable in a finished ERD. There is no need to do any more work on them. True or False?

Front

False

Back

Which of the following would best be represented by an arc? A) STUDENT ( University, Trade School) B) STUDENT (graduating, non-graduating) C) STUDENT (senior, junior) D) STUDENT (will-attend-university, will-not-attend-university)

Front

A) STUDENT ( University, Trade School)

Back

The following entity is in 1st normal form: True or False? ENTITY: VEHICLE ATTRIBUTES: REGISTRATION MAKE MODEL COLOR DRIVER PASSENGER 1 PASSENGER 2 PASSENGER 3

Front

B) False

Back

If the entity CD has the attributes: #number, title, producer, *year, o store name, o store address, this entity is in 3rd Normal Form ("no non-UID attribute can be dependent on another non-UID attribute). True or False?

Front

B) False

Back

All instances of the supertype are also instances of one of the subtypes. True or False

Front

A) True

Back

Relationships can be either mandatory or optional. True or False?

Front

A) True

Back

Changes in computing have affected many of our day-to-day activities. Are all of the following activities examples of this change? Yes or No? In the past you used to use the phone system to call directory assistance to get a phone number. Today you can use your PC to look up a phone number online. In the past you used to have to go to the shoe store to buy shoes. Today you can use your PC to order shoes online. In the past you had to use your PC to send a person an email. Today you can use your phone to send a text message. A) No B) Yes

Front

B) Yes

Back

How would you model a business rule that states that on a student's birthday, he does not have to attend his classes? A) Use a supertype B) Use a subtype C) You cannot model this. You need to document it D) Make the attribute Birthdate mandatory

Front

C) You cannot model this. You need to document it

Back

All instances of a subtype must be an instance of the supertype. True or False?

Front

A) True

Back

A non-transferable relationship is represented by which of the following symbols? A) Heart B) Triangle C) Circle D) Diamond

Front

D) Diamond

Back

An entity can only have one UID. True or False?

Front

B) False

Back

Secondary UID's are A) Always comprised of numbers B) Mandatory in data modeling C) Useful as an alternative means of identifying instances of an entity D) Not permitted in data modeling

Front

C) Useful as an alternative means of identifying instances of an entity

Back

How do you know when to use the different types of time in your design? A) It depends on the functional needs of the system. B) The rules are fixed and should be followed. C) Always model time; you can take it out later if it is not needed. D) You would first determine the existence of the concept of time and map it against the Greenwich Mean Time.

Front

A) It depends on the functional needs of the system.

Back

People are not born with "numbers", but a lot of systems assign student numbers, customer IDs, etc.ᅠA shoe has a color, a size, a style, but may not have a descriptive "number". To be able to uniquely and efficiently identify one instance of the entity SHOE, a/an ______________ UID can be created. A) Unrealistic B) Identification C) Artificial D) Structured

Front

C) Artificial

Back

Personal computers (PCs) have been in existence since 1950. True or False? A) True B) False

Front

B) False

Back

No database in the world is ever truly on 3rd Normal Form. Everyone always stops after 2nd Normal Form. True or False?

Front

B) False

Back

What is the function of logging or journaling in conceptual data models? A) Allows you to track the history of attribute values, relationships, and/or entire entities B) Creates a fixed time for all events in a data model. C) Represents entities as time in the data model. D) Gives a timestamp to all entities.

Front

A) Allows you to track the history of attribute values, relationships, and/or entire entities

Back

Business rules are important to data modelers because: A) They capture all of the needs, processes, and required functionality of the business B) They are easily implemented in the ERD diagram C) The data modeler must focus on structural rules, because they are easily represented diagrammatically and eliminate other rules that involve extra procedures or programming D) Both A and C are true

Front

A) They capture all of the needs, processes, and required functionality of the business

Back

In the grid computing model, resources are pooled together for efficiency. True or False? A) True B) False

Front

A) True

Back

Which of the following is true about supertypes and subtypes? A) Two subtypes from the same supertype have a one-to-one relationship between them B) Subtypes inherit the relationships and attributes of the supertype C) Subtypes may have no more than 2 levels of nesting D) Supertype and subtype entities must mutually exclude one another

Front

B) Subtypes inherit the relationships and attributes of the supertype

Back

As a database designer, you have a responsibility to store data in only one place and in the best possible place. True or False?

Front

A) True

Back

Many to many relationships between entities usually hide what? Mark for Review A) Another entity B) Another relationship C) Uniqueness D) More attributes

Front

A) Another entity

Back

When you resolve a M:M by creating an intersection entity, this new entity will always inherit: A) The UID's from the entities in the original M:M. B) Nothing is inherited from the original entities and relationship. C) A relationship to each entity from the original M:M. D) The attributes of both related entities.

Front

C) A relationship to each entity from the original M:M.

Back

What are the major content areas covered in the Oracle Academy? A) SQL, database configuration, and performance tuning. B) Data Modeling, PJava and C+ C) Data Modeling, SQL, and PL/SQL D) Database programming, and Computer repair

Front

C) Data Modeling, SQL, and PL/SQL

Back

Two entities can have one or more relationships between them. True or False?

Front

A) True

Back

In this simple diagram, what comprises the unique identifier for the student class entity? A) student id and class id B) student id, class id, and course id C) course id D) student id and course id

Front

D) student id and course id

Back

What is the rule of Second Normal Form? A) All non-UID attributes must be dependent upon the entire UID. B) Some non-UID attributes can be dependent on the entire UID. C) No non-UID attributes can be dependent on any part of the UID. D) None of the above

Front

A) All non-UID attributes must be dependent upon the entire UID.

Back

When data is stored in more than one place in a database, the database violates the rules of ___________. A) Decency B) Normalcy C) Normalization D) Replication

Front

C) Normalization

Back

What uncommon relationship is described by the statements: "Each LINE must consist of many POINTS and each POINT must be a part of many LINES" A) Many to Many Mandatory B) One to Many Optional C) One to Many Mandatory D) Many to Many Optional

Front

A) Many to Many Mandatory

Back

The overall mission of the Oracle Corporation is to use the internet and fast processing servers to build its own network. A) True B) False

Front

B) False

Back

If an intersection entity is formed that contains no attributes of its own, its uniqueness may be modeled by A) Creating new attributes. B) Barring the relationships to the original entities. C) Placing the UID attributes from the original entities into the intersection entity. D) None of the above.

Front

B) Barring the relationships to the original entities.

Back

An entity can be on 2nd Normal Form even if it has repeated values. True or False? A) True B) False

Front

B) False

Back

If the same relationship is represented twice in an Entity Relationship Model, it is said to be: A) Resourceful B) Removable C) Redundant D) Replicated

Front

C) Redundant

Back

Oracle was one of the first relational database systems available commercially. True or False? A) True B) False

Front

A) True

Back

Which of the following is an example of a structural business rule? A) All employees must belong to at least one department B) All overdue payments will have an added 10 % late fee C) All products will have a selling price no less than 30 % greater than wholesale D) Buildings to be purchased by the business must be current with earthquake building code

Front

A) All employees must belong to at least one department

Back

All attributes that are part of the UID are mandatory. True or False?

Front

A) True

Back

A Matrix Diagram will help you with all of the following except: A) Naming Relationships B) Defining Instances of Entities C) Identifying Entities D) Verifying Relationships Between Entities

Front

B) Defining Instances of Entities

Back

In an ERD, it is a good idea to group your entities according to the expected volumes. By grouping high volume entities together, the diagrams could become easier to read. True or False?

Front

A) True

Back

Modeling historical data can produce a unique identifier that includes a date. True or False? A) True B) False

Front

A) True

Back

Section 2

(50 cards)

If you want to see just a subset of the columns in a table, you use what symbol? A) & B) % C) * D) instead of using a symbol, you name the columns for which you want to see data.

Front

D) instead of using a symbol, you name the columns for which you want to see data.

Back

In a physical data model, an entity becomes a/an _____________. A) Constraint B) Table C) Column D) Attribute

Front

B) Table

Back

Personal computers (PCs) have been in existence since 1950. True or False?

Front

B) False

Back

Which of the following terms represents a collection of fields? A) field B) record C) character D) file

Front

B) record

Back

A table does not have to have a primary key. True or False?

Front

A) True

Back

A foreign key is usually found on which side of a relationship? A) one B) many C) unnormalized D) primary entity

Front

B) many

Back

The transformation from an ER diagram to a physical design involves changing terminology. Entities in the ER diagram become __________ , and attributes become ____________. A) Foreign Keys, Columns B) Columns, Tables C) Tables, Columns D) Tables, Foreign Keys

Front

C) Tables, Columns

Back

A column represents a field in the physical database table. A) True B) False

Front

A) True

Back

A database is a physical storage device for data. A) True B) False

Front

B) False

Back

Column integrity refers to A) Columns always having values B) Columns always containing positive numbers C) Columns always containing values consistent with the defined data format D) Columns always containing text data less than 255 characters

Front

C) Columns always containing values consistent with the defined data format

Back

Foreign keys cannot be null when A) It is part of a primary key B) It refers to another table C) It contains three or more columns

Front

A) It is part of a primary key

Back

One or more columns in a primary key can be null. True or False?

Front

B) False

Back

Data Modeling is the last step in the database development process. True or False?

Front

B) False

Back

All attributes that are part of the UID are mandatory. True or False? A) True B) False

Front

A) True

Back

Which of the following may contain transitive dependencies, but not partial dependencies? A) unnormalized data B) first normal form (1NF) C) second normal form (2NF) D) third normal form (3NF)

Front

C) second normal form (2NF)

Back

The data model can be used to __________. A) Communicate and group B) Describe and specify C) Analyze and copy D) All of the Above

Front

D) All of the Above

Back

The demand for Information Technology professionals in today's market is increasing. A) True B) False

Front

A) True

Back

Relationships on an ERD can only be transformed into UIDs in the physical model? True or False?

Front

B) False

Back

When reading a relationship between 2 entities, the relationship is only read from left to right. True or False?

Front

B) False

Back

What do you create when you transform a Many-to-Many relationship from your ER diagram into a physical design? A) Intersection table B) Foreign key constraints C) Intersection entity D) Primary key constraints

Front

A) Intersection table

Back

Which of the following are reasons we create conceptual models? A) It facilitates discussion; a picture is worth a thousand words B) It forms important ideal system documentation C) It takes into account government regulations and laws D) It forms a sound basis for physical database design E) All of the above

Front

E) All of the above

Back

During which phases of the System Development Life Cycle would you roll out the system to the users? A) Build and Transition B) Strategy and Analysis C) Design and Production D) Transition and Production

Front

D) Transition and Production

Back

The simplest approach to remove a partial dependency is to use each portion of the primary key to create separate tables. A) True B) False

Front

A) True

Back

A ____ is a group of interrelated files. A) record B) character C) field D) database

Front

D) database

Back

Creating a Matrix Diagram is a mandatory step in Data Modeling. True or False?

Front

B) False

Back

In an Oracle database, why would the following table name not be allowed 'EMPLOYEE JOBS'? A) The database does not understand all capital letters B) You cannot have spaces between words in a table name C) JOBS is a reserved word D) EMPLOYEE is a reserved word

Front

B) You cannot have spaces between words in a table name

Back

A unique identifier can only be made up of one attribute. True or False? A) True B) False

Front

B) False

Back

In a physical data model, a relationship is represented as a: A) Foreign Key B) Unique Identifier C) Column D) Primary Key

Front

A) Foreign Key

Back

Why would you want to model a time component when designing a system that lets people buy bars of gold? A) You would not want to model this; it is not important. B) The price of gold fluctuates and, to determine the current price, you need to know the time of purchase. C) Sales people must determine where the gold is coming from. D) The Government of your country might want to be notified of this transaction.

Front

B) The price of gold fluctuates and, to determine the current price, you need to know the time of purchase.

Back

Data is in second normal form (2NF) if it contains no repeating groups and has a primary key to uniquely identify each record. A) True B) False

Front

B) False

Back

When you add the concept of time to your data model, you are: A) Adding complexity to your model. B) Just changing the model, but this does not change the complexity of it. C) Simplifying your model. D) None of these answers.

Front

A) Adding complexity to your model.

Back

When are relationships unnecessary? A) When the relationships connect 2 entities and they each have distinct meanings B) When the information does not relate to the model C) When they have the same visual structure but different meaning D) When you can derive the relationship from other relationships in the model

Front

D) When you can derive the relationship from other relationships in the model

Back

A foreign key always refers to a primary key in the same table. True or False?

Front

B) False

Back

How do you turn "data" into "information"? A) By testing it B) By storing it on a server C) By querying it or accessing it D) By storing it in a database

Front

C) By querying it or accessing it

Back

No formal rules exist for drawing ERD's. The most important thing is to make sure that all entities, attributes, and relationships are documented on the diagram. The Layout is insignificant. True or False?

Front

B) False

Back

Which of the following is the best scenario for using supertype/subtype entities: A) A grocery store that gives customers a choice of plastic or paper bags B) An ice cream store that sells ice cream in sugar cones and regular cones C) A pet store that sells small animals that need different sized cages and different food D) A vehicle dealership that sells boats on trailers, cars, and trucks

Front

D) A vehicle dealership that sells boats on trailers, cars, and trucks

Back

A field in the logical design of a database is represented by what in the physical database? A) column B) row C) field D) row

Front

A) column

Back

What is the benefit to the users of a system that includes "time"; e.g. Start Date and End Date for Employees? A) System becomes 100% unstable; allows users to log on and log off at will. B) Reporting becomes nearly impossible; users enjoy this. C) Increased usability and flexibility of a system; e.g., we can the trace the different managers an employee had over time. D) Users are able to create complex programs in support of this component.

Front

C) Increased usability and flexibility of a system; e.g., we can the trace the different managers an employee had over time.

Back

Two tables can be linked or joined together through a common field. A) True B) False

Front

A) True

Back

Relationships always exist between A) 3 or more attributes B) 3 or more entities C) 2 attributes D) 2 entities (or one entity and itself)

Front

D) 2 entities (or one entity and itself)

Back

A customized hat sitting on your friend's head is an example of which model--the conceptual model or the physical model? A) Conceptual Model B) Physical Model

Front

B) Physical Model

Back

Data redundancy is created through a process known as normalization. A) True B) False

Front

B) False

Back

One-to-One relationships are transformed into Foreign Keys in the tables created at either end of that relationship. True or False?

Front

B) False

Back

The explanation below is an example of which constraint type? If the value in the balance column of the ACCOUNTS table is below 100, we must send a letter to the account owner which will require extra programming to enforce. A) Entity integrity B) Referential integrity C) Column integrity D) User-defined integrity

Front

D) User-defined integrity

Back

If subtypes are listed, a supertype should have at least two subtypes. True or False? A) True B) False

Front

A) True

Back

Unique Identifiers: A) Distinguish one entity from another B) Distinguish one instance of an entity from all other instances of that entity C) Distinguish nothing D) Distinguish all entities in a database

Front

B) Distinguish one instance of an entity from all other instances of that entity

Back

One-to-Many Optional to Mandatory becomes a _______________ on the Master table. A) Mandatory Foreign Key B) Nothing (There are no new columns created on the Master table) C) Optional Foreign Key D) Primary Key

Front

B) Nothing (There are no new columns created on the Master table)

Back

A recursive relationship should not be part of a UID. True or False?

Front

A) True

Back

Which of the following would be a logical constraint when modeling time for a country entity? A) Daily traffic patterns must be monitored to determine which countries are overcrowded. B) People have births and deaths in their countries that must be tracked by the system. C) If you are doing a system for France or Germany, you would need security clearance. D) Countries may change their names and/or borders over a period of time.

Front

D) Countries may change their names and/or borders over a period of time.

Back

SELECT *FROM employees;This statement will retrieve all the rows in the employees table. True or False?

Front

A) True

Back

Section 3

(50 cards)

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

Front

A) True

Back

Search conditions for data contained in non-numeric columns must be enclosed in double quotation marks. A) True B) False

Front

B) False

Back

Insignificant zeros are displayed for numeric columns by default to show two decimal places. A) True B) False

Front

B) False

Back

The SOUND function is used to determine the phonetic representation of a character string. A) True B) False

Front

B) False

Back

Analyzing historical sales data stored in a database is commonly referred to as ____. A) data storage B) data mining C) data manipulation D) archived data

Front

B) data mining

Back

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? A) SELECT * FROM books WHERE profit > .6; B) SELECT * FROM books WHERE (retail-cost)/cost > .60; C) SELECT * FROM books WHERE (retail-cost)/cost > 60%; D) SELECT * FROM books WHERE (retail-cost)/cost > '60';

Front

B) SELECT * FROM books WHERE (retail-cost)/cost > .60;

Back

Which of the following will display the new retail price of each book as 20 percent more than it originally cost? A) SELECT title, cost+.20 "New Retail Price" FROM books; B) SELECT title, cost*.20 "New Retail Price" FROM books; C) SELECT title, cost*1.20 "New Retail Price" FROM books; D) none of the above

Front

C) SELECT title, cost*1.20 "New Retail Price" FROM books;

Back

Functions that return one result per group of rows are called ____ functions. A) group B) multiple-row C) aggregate D) all of the above

Front

D) all of the above

Back

The LTRIM function can be used to remove a specific number of characters from the left side of a set of data. A) True B) False

Front

B) False

Back

A(n) ____ has a predefined meaning in Oracle11g. A) keyword B) statement C) syntax D) clause

Front

A) keyword

Back

Retrieving only specific rows from a table is a process known as selection. A) True B) False

Front

A) True

Back

Which of the following is true? A) Character values are not case-sensitive B) Character strings must be enclosed in double quotation marks C) Date values are enclosed in single quotation marks D) Date values are not format-sensitive

Front

C) Date values are enclosed in single quotation marks

Back

Which of the following can be used to replace a specific set of characters with another set of characters? A) SUBSTR B) REPLACE C) FNDRPLCE D) none of the above

Front

B) REPLACE

Back

Which of the following SQL statements will display the title of the books ordered by customer# 1003? A) SELECT title FROM customers NATURAL JOIN books WHERE customer# = 1003; B) SELECT title FROM customers JOIN orders USING (customer#) JOIN orderitems USING (order#) JOIN books USING (isbn) WHERE customer# = 1003; C) SELECT title FROM customers JOIN orders ON (customer#) JOIN orderitems ON (order#) JOIN books ON (isbn) WHERE customer# = 1003; D) both a and b

Front

B) SELECT title FROM customers JOIN orders USING (customer#) JOIN orderitems USING (order#) JOIN books USING (isbn) WHERE customer# = 1003;

Back

Which of the following SQL statements will display the gift that should be sent to any customer who orders the book titled SHORTEST POEMS? A) SELECT gift FROM promotion WHERE gift = minretail; B) SELECT gift FROM promotion, books WHERE retail >= minretail AND title = 'SHORTEST POEMS'; C) SELECT gift FROM promotion, books WHERE retail BETWEEN minretail AND maxretail AND title = 'SHORTEST POEMS'; D) none of the above

Front

C) SELECT gift FROM promotion, books WHERE retail BETWEEN minretail AND maxretail AND title = 'SHORTEST POEMS';

Back

A group function can be nested inside a(n)____. A) group function B) single-row function C) order function D) both a and b

Front

D) both a and b

Back

Which of the following is a valid comparison operator? A) != B) IN C) ^= D) all of the above

Front

D) all of the above

Back

Which of the following functions is used to determine the number of months between two date values? A) MONTH_BETWEEN B) MONTHS_BETWEEN C) MTH_BETWEEN D) MNTH_BETWEEN

Front

B) MONTHS_BETWEEN

Back

The optional keyword AS can be used to indicate that the subsequent string of characters is a column alias. A) True B) False

Front

A) True

Back

The TO_CHAR function can be used to add a dollar sign ($) to a numeric value. A) True B) False

Front

A) True

Back

Which statement will return a listing of last names, salaries, and a rating of 'Low', 'Medium', 'Good' or 'Excellent' depending on the salary value? A) SELECT last_name,salary, (CASE WHEN salary<5000 THEN 'Low' WHEN sal <10000 THEN 'Medium' WHEN sal <20000 THEN 'Good' ELSE 'Excellent' END) qualified_salary FROM employees; B) SELECT last_name,salary, (RATING WHEN salary<5000 THEN 'Low' WHEN salary<10000 THEN 'Medium' WHEN salary<20000 THEN 'Good' ELSE 'Excellent' END) qualified_salary FROM employees; C) SELECT last_name,salary, (CASE WHEN salary<5000 THEN 'Low' WHEN salary<10000 THEN 'Medium' WHEN salary<20000 THEN 'Good' ELSE 'Excellent' END) qualified_salary FROM employees; D) SELECT last_name,sal, (CASE WHEN sal<5000 THEN 'Low' WHEN sal<10000 THEN 'Medium' WHEN sal<20000 THEN 'Good' ELSE 'Excellent' END) qualified_salary FROM employees;

Front

C) SELECT last_name,salary, (CASE WHEN salary<5000 THEN 'Low' WHEN salary<10000 THEN 'Medium' WHEN salary<20000 THEN 'Good' ELSE 'Excellent' END) qualified_salary FROM employees;

Back

In which of the following examples is the ORDERS table used as a column qualifier? A) o.order# B) orders.order# C) order#.o D) order#.orders

Front

B) orders.order#

Back

The DIST or UNIQ keywords can be used to suppress duplicate data in the results of a SELECT statement. A) True B) False

Front

B) False

Back

The MAX function can be used with character data. A) True B) False

Front

A) True

Back

The ____ function calculates the standard deviation for a specific set of data. A) STDDEVIATION B) STD C) STDDEV D) STANDARDDEV

Front

C) STDDEV

Back

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

Front

D) both a and b

Back

If a SELECT statement contains HAVING, GROUP BY, and WHERE clauses, the ____ clause will be processed first. A) HAVING B) GROUP BY C) WHERE D) ORDER BY

Front

C) WHERE

Back

The NATURAL JOIN keywords can be used to create non-equality joins. A) True B) False

Front

B) False

Back

Based upon the contents of the ORDERS table, which of the following SQL statements will display only those orders shipped to the zip code zone that begins with 323? A) SELECT order#, SUBSTR(shipzip, 1, 323) FROM orders; B) SELECT order#, SUBSTR(shipzip, 1, 323) FROM orders WHERE shipzip = 323; C) SELECT order# FROM orders WHERE shipzip = SUBSTR(shipzip, 1, 323); D) SELECT order# FROM orders WHERE SUBSTR(shipzip, 1, 3) = 323;

Front

D) SELECT order# FROM orders WHERE SUBSTR(shipzip, 1, 3) = 323;

Back

A(n) ____ clause cannot include a group function. A) WHERE B) HAVING C) SELECT D) both a and c

Front

A) WHERE

Back

Which of the following operators can be used to combine search conditions? A) AND B) = C) IS NOT NULL D) none of the above

Front

A) AND

Back

SELECT *FROM employees;This statement will retrieve all the rows in the employees table. True or False? A) True B) False

Front

A) True

Back

In an E-R Model a person, place, or thing with characteristics to be stored in the database are referred to as? A) entity B) row C) attribute D) file

Front

A) entity

Back

A NATURAL JOIN is based on: A) Columns with the same name B) Columns with the same name and datatype C) olumns with the same datatype and width D) Tables with the same structure

Front

B) Columns with the same name and datatype

Back

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

Front

B) False

Back

Each section of a SQL command that begins with a keyword is known as a statement. A) True B) False

Front

B) False

Back

Which of the following is a valid SQL statement based upon the contents of the CUSTOMERS table? A) SELECT INITCAP(firstname, lastname) FROM customers; B) SELECT LENGTH (city, state, zip) FROM customers; C) SELECT customer#, NVL2(referred, 'Referred', 'Not Referred') FROM customers; D) SELECT INITCAP((firstname),( lastname)) FROM customers; Note: The ST column name is truncated, this represents the STATE column.

Front

C) SELECT customer#, NVL2(referred, 'Referred', 'Not Referred') FROM customers;

Back

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

Front

B) False

Back

The SELECT clause of the SELECT statement is used to identify which rows are to be retrieved from a specified table. A) True B) False

Front

B) False

Back

An ORDER BY clause can reference a column to be used for sorting based upon its position in the database table. A) True B) False

Front

B) False

Back

A(n) ____ is used to indicate how data should relate to a given search condition. A) comparison operator B) logical operator C) search pattern D) criteria

Front

A) comparison operator

Back

The HAVING clause specifies which groups will be displayed in the results, while the WHERE clause restricts the records that are retrieved from the table for processing. A) True B) False

Front

A) True

Back

A column qualifier indicates the column containing the data being referenced. A) True B) False

Front

B) False

Back

The ORDER BY clause is used to group data. A) True B) False

Front

B) False

Back

If the results of a SELECT statement include more than one column of data, the column names must be separated in the SELECT clause by which of the following symbols? A) , B) " " C) ' ' D) *

Front

A) ,

Back

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

Front

B) False

Back

Which of the following are examples of comparison operators used in the WHERE clause? A) =, >, <, <=, >=, <> B) between ___ and ___ C) in (..,..,.. ) D) like E) is null F) All of the above

Front

F) All of the above

Back

Based upon the contents of the CUSTOMERS table, which of the following will display the shipping location as: City, State Zip A) SELECT INITCAP(CONCAT(city, CONCAT(', ', CONCAT(state, CONCAT(' ', zip))))) FROM customers; B) SELECT CONCAT(city, CONCAT(', ', CONCAT(state, CONCAT(' ', CONCAT(zip))))) FROM customers; C) SELECT INITCAP(CONCAT(city, ', ', state, ' ', zip)) FROM customers; D) none of the above

Front

A) SELECT INITCAP(CONCAT(city, CONCAT(', ', CONCAT(state, CONCAT(' ', zip))))) FROM customers;

Back

The ALL option can be used in the SELECT clause to indicate that all columns should be retrieved. A) True B) False

Front

B) False

Back

A positive number is used in the ROUND function to indicate that numeric data should be rounded to the indicated position to the right of the decimal point. A) True B) False

Front

A) True

Back

Section 4

(22 cards)

You can include multiple subqueries in a SELECT statement. A) True B) False

Front

A) True

Back

Which constraint ensures that the data in a view cannot be changed? A) WITH CHECK OPTION B) WITH READ OPTION C) WITH READ ONLY D) NO WRITE OPTION

Front

C) WITH READ ONLY

Back

A multiple-column subquery cannot be nested in a WHERE clause. A) True B) False

Front

B) False

Back

A(n) ____ subquery is one that can return several rows of results. A) correlated B) single-row C) multiple-row D) uncorrelated

Front

C) multiple-row

Back

The WITH READ ONLY option can be used to prevent changes from being made to the data displayed by the view. A) True B) False

Front

A) True

Back

A(n) ____ stores a query and is used to access data in the underlying tables. A) view B) constraint C) function D) argument

Front

A) view

Back

Which type of view is created with the following command? CREATE VIEW OR REPLACE outstanding AS SELECT customer#, order#, orderdate, shipdate FROM orders WHERE shipdate IS NULL WITH READ ONLY; A) simple B) complex C) derived D) inline

Front

A) simple

Back

What is the procedure for assigning new names for the columns that are displayed by a view? A) The new column names can be listed after the VIEW keyword, enclosed in parentheses. B) Column aliases can be used in the subquery, and Oracle11g will use the aliases as column names in the view that is created. C) all of the above D) none of the above

Front

C) all of the above

Back

Which of the following is a valid statement? A) A single-row function can be nested inside a group function. B) Group functions can be nested inside other group functions. C) Group functions can be nested inside single-row functions. D) all of the above

Front

D) all of the above

Back

A single-row subquery can return several columns, but only one row, of results to the outer query. A) True B) False

Front

B) False

Back

A multiple-column subquery nested in the SELECT clause of the outer query is known as an inline view. A) True B) False

Front

B) False

Back

If you want to create a view based upon a table or tables that do not yet exist, or are currently unavailable (e.g.,off-line), what keyword can you use to avoid receiving an error message? A) FORCE B) NOERROR C) OVERRIDE D) none of the above

Front

A) FORCE

Back

A(n) uncorrelated subquery is when the outer query is executed first, then the inner query is executed. A) True B) False

Front

B) False

Back

Which of the following types of views cannot include a group function? A) simple view B) inline view C) complex view D) all of the above

Front

A) simple view

Back

Based upon the contents of the CUSTOMERS table, which of the following would be the most appropriate use of a subquery? A) When searching for all customers who live in the same state as customer# 1007. B) When searching for all customers who were referred by customer# 1003. C) When searching for all customers with the last name of Thompson. D) When searching for all customers assigned customer# 1010.

Front

A) When searching for all customers who live in the same state as customer# 1007.

Back

The SUM function can only be used with ____ data. A) numeric B) character C) date D) alphanumeric

Front

A) numeric

Back

A complete query nested inside another query is called a(n) ____. A) inner view B) subquery C) child view D) all of the above

Front

B) subquery

Back

Which statement is true about the view created with the following command? CREATE VIEW OR REPLACE outstanding AS SELECT customer#, order#, orderdate, shipdate FROM orders WHERE shipdate IS NULL WITH READ ONLY; A) The order# of an order cannot be changed through the view. B) The shipping date of an order cannot be changed through the view. C) No DML operations are permitted through the view. D) all of the above

Front

D) all of the above

Back

When a multiple-column subquery is used in the WHERE clause of the outer query, the column names listed on the left side of the comparison operator must be enclosed in double-quotation marks. A) True B) False

Front

B) False

Back

Which statement about the view created from the following SQL command is correct, assuming ISBN from the BOOKS table is the primary key used by the view? CREATE OR REPLACE VIEW prices AS SELECT isbn, title, cost, retail, retail-cost profit, name FROM books NATURAL JOIN publisher; A) DML operations can only be performed on the columns belonging to the PUBLISHER table. B) No DML operations are allowed. C) DML operations are allowed on both the BOOKS and PUBLISHER tables. D) DML operations can only be performed on the columns belonging to the BOOKS table.

Front

D) DML operations can only be performed on the columns belonging to the BOOKS table.

Back

A(n) correlated subquery references one or more columns from the outer query. A) True B) False

Front

A) True

Back

Which of the following statements about complex views is incorrect? A) It is created with the same CREATE VIEW command as a simple view. B) It retrieves or derives data from one or more tables. C) All DML operations can be performed on complex views, just like simple views. D) It may contain functions or grouped data.

Front

C) All DML operations can be performed on complex views, just like simple views.

Back