MIS-180 SQL Chapters 1-4

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Chapter 1

--

Chapter 2

--

Chapter 3

--

Chapter 4

--

The aggregate function that is used to find the average of a set of numbers is the ______ function.

AVG

The From clause can contain a second name for a table. This name is called a(n) _____.

Alias

Conditions connected by OR will be true when _____ is/are true (either/both/none/all -- choose the best)

All

The aggregate function that is used to find out how many total customers Red Cat has is the _______ function.

Count

What is DBMS Data Security concerned with?

Enforcing restrictions about who is able to access what data

!= means "is not equal to" in the Where clause (T/F)

False

A clause that contains the condition for linking different tables is the Order by clause (T/F)

False

A phone number would be considered a fact and not information (T/F)

False

Knowledge about databases and how they function is only required for technical careers (T/F)

False

Only very large and complex databases are required to have a schema (T/F)

False

String functions can only be used in the Select clause.

False

The From clause can contain a second name for a table. This name is called an alternate (T/F)

False

The aggregate function that is used to find the average of a set of numbers is the "AVE" function.

False

The core of every type of information system is an intuitive and easy to use User Interface (T/F)

False

The order in which SQL Select clauses are executed is From, Select, Where, Order by

False

When using Aggregate functions because WHERE applies to individual records, it is not used; the HAVING clause is used instead.

False

When using Aggregate functions in the Select clause, a scalar function is not allowed, such as SQRT(AVG(x)).

False

The link between a particular Product and the Manufacturer that produces that product is maintained in the database through the use of a(n) ___________.

Foreign key

The clause that identifies the tables the query should access is the ______ clause.

From

The process of linking records in different tables to execute a query is called a(n) _____.

Join

A column whose value is always unique in every row in a table is called a(n) _____.

Key

The Where clause operator that is used to do pattern matching is the "______" operator.

Like

The clause that says how the rows in the query result should be sorted is the _____ clause.

Order by

A string function that can be used to find and replace a substring within a larger string is the "_____ (x,f,t)" function.

Replace

It is not allowed to include a HAVING clause unless there is also a GROUP BY clause.

True

The CONCAT function will work on string data, numeric data, and literals.

True

The From clause can contain a second name for a table. This name is called an alias.

True

To sort the result in reverse alphabetical order you use the key word Desc.

True

The String function that changes the value in a column to be all capital letters is called "_______(x)".

Upper

SQL Built-in functions that work across multiples rows are called what? a. Aggregate functions b. Row functions c. Group by functions d. Combination functions

a. Aggregate functions

What is the best phrase to use in the COUNT function to determine how many customers bought shoes during on May? Select COUNT( _____) from Customer C join Sale S on C.CustomerID = S.CustomerID where .... (month is May). a. COUNT (distinct CustomerID) b. COUNT (distinct * ) c. COUNT (CustomerID) d. COUNT (*)

a. COUNT (distinct CustomerID)

When using an aggregate function in the Select statement, what is the order of execution of the clauses? a. From, Where, Select b. Select, From, Where c. Select, Where, From d. From, Select, Where

a. From, Where, Select

Which of the following do you use to override the normal precedence of AND, OR, and NOT? a. Parentheses b. Square brackets c. Curly braces d. Angle brackets

a. Parentheses

In the syntax of a query which uses Aggregate functions, what is the sequence of the clauses for correct syntax? a. SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY b. SELECT, FROM, GROUP BY, WHERE, HAVING, ORDER BY c. SELECT, FROM, WHERE,, GROUP BY, ORDER BY, HAVING d. SELECT, FROM, WHERE, ORDER BY, GROUP BY, HAVING

a. SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY

The standard language used for querying an RDBMS is what? a. SQL b. PHP c. HTML d. JAVA

a. SQL

Typical relational DBMS in use today include all of the following EXCEPT... a. Symantec b. MySQL c. DB2 d. PostgresQL

a. Symantec

The maximum number of tables that can be joined in an SQL Select statement is: a. There is no maximum b. 6 c. 4 d. 2

a. There is no maximum

The From clause can contain a second name for a table. This name is called a. an alias b. aka c. also known as d. an alternate

a. an alias

Conditions connected by AND will be true a. only when both conditions are true b. when either condition is true c. when one condition is false d. when neither condition is true

a. only when both conditions are true

The purpose of the database schema is to a. Define the purpose of the database b. Define the structure of the database c. Define the data types allowed in the database d. Define the keys and indices required

b. Define the structure of the database

Which is NOT one of the responsibilities of a DBMS? a. Execute queries b. Display query results c. Ensure data integrity d. Define the data

b. Display query results

The clause that normally contains the condition for linking different tables is: a. Group by b. From c. Order by d. Select

b. From

The clause that says which columns to list in the query result is: a. Order by b. From c. Where d. Select

b. From

Which "Where" clause operator uses wild cards? a. Null b. Like c. Between d. In

b. Like

* in an SQL Select statement means: a. Many b. List all columns c. Exactly 1 character d. 0 or more characters

b. List all columns

The order of precedence for AND, OR, and NOT is: a. AND, OR, NOT b. NOT, AND, OR c. NOT, OR, AND d. AND, NOT, OR

b. NOT, AND, OR

The clause that says which columns to list in the query result is: a. Where b. Select c. Order by d. From

b. Select

The clause the gives the condition for selecting rows is: a. Select b. Where c. Order by d. From

b. Where

The minimum number of clauses in an SQL Select statement is: a. 8 b. 6 c. 2 d. 4

c. 2

What does the following statement return in Oracle: "EXTRACT(MONTH from PurchaseDate)"? a. An error because the syntax is incorrect b. An abbreviation of the description of the month, such as SEP c. An integer for the month of the purchase date such as 9 d. A description of the month of the purchase date, such as September

c. An integer for the month of the purchase date such as 9

Date functions can appear in which clauses? a. Where and Having b. Where and Order by c. Where and Select d. Where and From

c. Where and Select

How is a relationship between entities implemented in database tables? a. By duplicate attribute names b. With a line between tables c. With a foreign key attribute d. With attributes that have the same name

c. With a foreign key attribute

What does the following statement return In SQL for SQL Server: "MONTH(PurchaseDate)"? a. An abbreviation of the month of the purchase date, such as SEP b. This syntax will give an error because it is incorrect c. A description of the month of the purchase date, such as September d. An integer for the month of the purchase date such as 9

d. An integer for the month of the purchase date such as 9

The primary contributor to the availability of all kinds of information is what? a. Online libraries b. Internet availability c. Wikipedia d. Database technology

d. Database technology

What does the wild card "%" stand for in a Where clause operator? a. Match to zero or one characters b. Match to one or more characters c. Match to exactly one character d. Match to zero or more characters

d. Match to zero or more characters

In SQL Server, the string functions SUBSTRING(x,s,n) does the following: a. Returns the subsequent n characters starting at character location s in field s b. Returns the subsequent x characters starting at character location s in field n c. Returns the subsequent s characters starting at character location n in field x d. Returns the subsequent n characters starting at character location s in field x

d. Returns the subsequent n characters starting at character location s in field x

An SQL built-in function that operates on one field in a record is called a ______ function.

Scalar

The structure and organization of a database is defined by its ___________.

Schema

The clause that identifies the tables the query should access is the _____ clause.

Select

A query that accesses a single table is called a(n) ______ query.

Simple

A query that accesses a single table is called a(n) ________ query.

Simple

The aggregate function that is used to add up a set of numbers is the ______ function.

Sum

In a database a set of data that is organized in rows and columns is called a(n) _____________.

Table

A clause that contains the condition for linking different tables is the Where clause (T/F)

True

A course in database technology, such as this one, would benefit all business students (T/F)

True


Kaugnay na mga set ng pag-aaral

Practice RD Exam Questions from EatRight

View Set

Trigonometry - Find Side Lengths & Angle Measures, Trigonometry - Find Side Lengths, Trigonometric Functions

View Set

Chapter 2: Trade-offs, Comparative Advantage, and the Market System

View Set

Ch. 1,3,14 Foundation's Study Guide

View Set

Endocrinology Combined Practice Questions

View Set