Chapter 07: Introduction to Structured Query Language (SQL)

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/69

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

70 Terms

1
New cards

TRUE

A database language enables the user to perform complex queries designed to transform the raw data into useful information.

2
New cards

FALSE

SQL is considered difficult to learn; its command set has a vocabulary of more than 300 words.

3
New cards

TRUE

The ANSI SQL standards are also accepted by the ISO.

4
New cards

FALSE

The COMMIT command does not permanently save all changes. In order to do that, you must use SAVE.

5
New cards

FALSE

All SQL commands must be issued on a single line.

6
New cards

TRUE

Although SQL commands can be grouped together on a single line, complex command sequences are best shown on separate lines, with space between the SQL command and the command's components.

7
New cards

FALSE

An alias cannot be used when a table is required to be joined to itself in a recursive query.

8
New cards

FALSE

Oracle users can use the Access QBE (query by example) query generator.

9
New cards

TRUE

You can select partial table contents by naming the desired fields and by placing restrictions on the rows to be included in the output.

10
New cards

FALSE

Comparison operators cannot be used to place restrictions on character-based attributes.

11
New cards

TRUE

String comparisons are made from left to right.

12
New cards

TRUE

Date procedures are often more software-specific than other SQL procedures.

13
New cards

TRUE

SQL allows the use of logical restrictions on its inquiries such as OR, AND, and NOT.

14
New cards

FALSE

You cannot insert a row containing a null attribute value using SQL.

15
New cards

TRUE

ANSI-standard SQL allows the use of special operators in conjunction with the WHERE clause.

16
New cards

TRUE

The conditional LIKE must be used in conjunction with wildcard characters.

17
New cards

FALSE

Most SQL implementations yield case-insensitive searches.

18
New cards

TRUE

Some RDBMSs, such as Microsoft Access, automatically make the necessary conversions to eliminate case sensitivity.

19
New cards

TRUE

The COUNT function is designed to tally the number of non-null 'values' of an attribute, and is often used in conjunction with the DISTINCT clause.

20
New cards

TRUE

Numeric functions take one numeric parameter and return one value.

21
New cards

restricts the selection of grouped rows based on a condition

The SQL data manipulation command HAVING:

22
New cards

COMMIT

The SQL command that allows a user to permanently save data changes is _.

23
New cards

DEFAULT

The _ command defines a default value for a column when no value is given.

24
New cards

HAVING

The _ command restricts the selection of grouped rows based on a condition.

25
New cards

SELECT

A(n) _ query specifies which data should be retrieved and how it should be filtered, aggregated, and displayed.

26
New cards

alias

A(n) _ is an alternate name given to a column or table in any SQL statement.

27
New cards

Operations within parentheses

According to the rules of precedence, which of the following computations should be completed first?

28
New cards

SELECT DISTINCT V_CODE FROM PRODUCT;

Which query is used to list a unique value for V_CODE, where the list will produce only a list of those values that are different from one another?

29
New cards

inner

When using a(n) _ join, only rows from the tables that match on a common value are returned.

30
New cards

natural

A(n) _ join will select only the rows with matching values in the common attribute(s).

31
New cards

JOIN ON

If a designer wishes to create an inner join, but the two tables do not have a commonly named attribute, he can use a(n) _ clause.

32
New cards

outer

A(n) _ join returns not only the rows matching the join condition (that is, rows with matching values in the common columns) but also the rows with unmatched values.

33
New cards

SELECT column-list FROM table1 LEFT [OUTER] JOIN table2 ON join-condition

The syntax for a left outer join is _.

34
New cards

cross

A(n) _ join performs a relational product (also known as the Cartesian product) of two tables.

35
New cards

144

How many rows would be returned from a cross join of tables A and B, if A contains 8 rows and B contains 18?

36
New cards

<>

Which comparison operator indicates a value is not equal?

37
New cards

old-style' join

What type of command does this SQL statement use? SELECT PCODE, PDESCRIPT, PPRICEVNAME FROM PRODUCT, VENDOR WHERE PRODUCT.VCODE=VENDOR. V_CODE

38
New cards

BETWEEN

The special operator used to check whether an attribute value is within a range of values is _.

39
New cards

LIKE

The special operator used to check whether an attribute value matches a given string pattern is _.

40
New cards

COUNT

The SQL aggregate function that gives the number of rows containing non-null values for a given column is _.

41
New cards

subquery

A(n) _ is a query that is embedded (or nested) inside another query.

42
New cards

outer

In subquery terminology, the first query in the SQL statement is known as the _ query.

43
New cards

EXISTS

The special operator used to check whether a subquery returns any rows is _.

44
New cards

The outer subquery initiates the process of execution in a subquery

Which is a feature of a correlated subquery?

45
New cards

DATE()

The _ function returns the current system date in MS Access.

46
New cards

MON

When using the Oracle TODATE function, the code represents a three-letter month name.

47
New cards

LENGTH

_ is a string function that returns the number of characters in a string value.

48
New cards

DECODE

The Oracle _ function compares an attribute or expression with a series of values and returns an associated value or a default value if no match is found.

49
New cards

TO_CHAR()

In Oracle, the _ function converts a date to a character string.

50
New cards

EXCEPT

_ is a relational set operator.

51
New cards

100

The basic SQL vocabulary has fewer than _words.

52
New cards

UNIQUE

The _ specification is used to avoid having duplicated values in a column.

53
New cards

query

In the SQL environment, the word _ covers both questions and actions.

54
New cards

wildcard

A(n) _ character is a symbol that can be used as a general substitute for other characters or commands.

55
New cards

join

The _ condition is generally composed of an equality comparison between the foreign key and the primary key of related tables.

56
New cards

cascading

A(n) _ order sequence is a multilevel ordered sequence that can be created easily by listing several attributes, separated by commas, after the ORDER BY clause.

57
New cards

recursive

An alias is especially useful when a table must be joined to itself in a(n) _ query.

58
New cards

SELECT

The _ command, coupled with appropriate search conditions, is an incredibly powerful tool that enables a user to transform data into information.

59
New cards

Boolean

A specialty field in mathematics, known as _ algebra, is dedicated to the use of logical operators.

60
New cards

conditional

In SQL, all _ expressions evaluate to true or false.

61
New cards

GROUP BY

Rows can be grouped into smaller collections quickly and easily using the _ clause within the SELECT statement.

62
New cards

HAVING

The _ clause of the GROUP BY statement operates very much like the WHERE clause in the SELECT statement.

63
New cards

subquery

A(n) _, also known as a nested query or an inner query, is a query that is embedded (or nested) inside another query.

64
New cards

Oracle

DATE() and SYSDATE are special functions that return today's date in MS Access and _, respectively.

65
New cards

Conversion

_ functions allow you to take a value of a given data type and convert it to the equivalent value in another data type.

66
New cards

Union-compatible

_' means that the names of the relation attributes must be the same and their data types must be alike.

67
New cards

EXCEPT

The _ statement in SQL combines rows from two queries and returns only the rows that appear in the first set but not in the second.

68
New cards

IN

The _ operator could be used in place of INTERSECT if the DBMS does not support it.

69
New cards

NOT IN

The _ operator could be used in place of EXCEPT (MINUS) if the DBMS does not support it.

70
New cards

query EXCEPT query

The syntax of the EXCEPT statement in Oracle is _.