Lesson 6 Flashcards

1
Q

alias

A

An alternative name for a column or table in a SQL statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

ALTER TABLE

A
  1. The SQL command used to make changes to table structure.
  2. When the command is followed by a keyword ADD or MODIFY, it adds a column or changes column characteristics.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

AND

A
  • The SQL logical operator used to link multiple conditional expressions in a WHERE or HAVING clause.
  • It requires that all conditional expressions evaluate to true.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

AVG

A

A SQL aggregate function that outputs the mean average for a specified column or expression.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

BETWEEN

A

In SQL, a special comparison operator used to check whether a value is within a range of specified values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Boolean algebra

A

A branch of mathematics that uses the logical operators OR, AND, and NOT.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

cascading order sequence

A

A nested ordering sequence for a set of rows.

“Such as a list in which all last names are alphabetically ordered and, within the last names, all first names are ordered.”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

COMMIT

A

The SQL command that permanently writes data changes to a database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

COUNT

A

A SQL aggregate function that outputs the number of rows containing not null values for a given column or expression

sometimes used in conjunction with the DISTINCT clause.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

CREATE INDEX

A

A SQL command that creates indexes on the basis of a selected attribute or attributes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

CREATE TABLE

A

A SQL command that creates a table’s structures using the characteristics and attributes given.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

DELETE

A
  1. The SQL DELETE command can delete entire rows from a table.
  2. If you use it with a WHERE clause, it deletes only the rows matching your condition.
  3. Without a WHERE clause, it deletes all rows from the table.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

DISTINCT

A

A SQL clause that produces only a list of values that are different from one another.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

DROP INDEX

A

A SQL command that permanently deletes an index.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

DROP TABLE

A

A SQL command that permanently deletes a table and its data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

EXISTS

A

In SQL, a comparison operator that checks whether a subquery returns any rows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

FROM

A

A SQL clause that specifies the table or tables from which data is to be retrieved.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

GROUP BY

A

A SQL clause used to create frequency distributions when combined with any of the aggregate functions in a SELECT statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

HAVING

A

A clause applied to the output of a GROUP BY operation to restrict selected rows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

IN

A

In SQL, a comparison operator used to check whether a value is among a list of specified values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

inner query

A
  • A query that is embedded or nested inside another query.
  • Also known as a nested query or a subquery.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

INSERT

A

A SQL command that allows the insertion of one or more data rows into a table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

IS NULL

A

In SQL, a comparison operator used to check whether an attribute has a value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

LIKE

A

In SQL, a comparison operator used to check whether an attribute’s text value matches a specified string pattern.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

MAX

A

A SQL aggregate function that yields the maximum attribute value in a given column.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

MIN

A

A SQL aggregate function that yields the minimum attribute value in a given column.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

nested query

A

In SQL, a query that is embedded in another query.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

NOT

A

A SQL logical operator that negates a given predicate.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

OR

A
  • The SQL logical operator used to link multiple conditional expressions in a WHERE or HAVING clause.
  • It requires only one of the conditional expressions to be true.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

ORDER BY

A

A SQL clause that is useful for ordering the output of a SELECT query

for example, in ascending or descending order.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

ROLLBACK

A

A SQL command that restores the database table contents to the condition that existed after the last COMMIT statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

rules of precedence

A
  • Basic algebraic rules that specify the order in which operations are performed.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

subquery

A

A query that is embedded (or nested) inside another query. Also known as a nested query or an inner query.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

SUM

A

A SQL aggregate function that yields the sum of all values for a given column or expression.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

UPDATE

A

A SQL command that allows attribute values to be changed in one or more rows of a table.

36
Q

WHERE

A

A SQL clause that adds conditional restrictions to a SELECT statement.

limits the rows returned by the query

37
Q

wildcard character

A

A symbol that can be used as a general substitute for:

  1. All columns in a table (*) when used in an attribute list of a SELECT statement
  2. zero or more charactersin a SQL LIKE clause condition ( % and _ ).
38
Q

SQL commands can be divided into two overall categories: _______ and ______ commands.

A
  • Data definition languauge (DDL)
  • Data manipulation language (DML)
39
Q

The basic DML commands are:

A
  • SELECT
  • INSERT
  • UPDATE
  • DELETE
  • COMMIT
  • ROLLBACK
40
Q
  1. The basic data definition commands allow you to create tables and indexes.
  2. Many SQL constraints can be used with columns. The commands are:
A
  • CREATE TABLE
  • CREATE INDEX
  • ALTER TABLE
  • DROP TABLE
  • DROP INDEX
41
Q

The ANSI prescribes a standard SQL-the current fully approved version is known as SQL 07. (T/F)

A

False

42
Q
  1. How can you select specific contents from a table?
  2. What methods can you use to restrict the rows included in the output?
A
  1. You can select specific contents from a table by naming the desired fields and applying restrictions to the rows you want to include in the output.
  2. You can restrict the rows included in the output by using conditions such asfiltering based on specific values, setting limits, or applying criteria that meet certain requirements.
43
Q

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

A

SELECT

44
Q

The conditional LIKE should be used in conjunction with wildcard characters. (T/F)

A

True

45
Q

What does a database language allow users to do?

A

A database language enables users to perform complex queries to transform raw data into useful information

46
Q

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

A

EXISTS

47
Q

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

A

Performing operations within parentheses

48
Q

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

A

COMMIT

49
Q

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

A

conditional or boolean

50
Q

database language

A

A database language enables the user to create database and table structures to perform basic data management chores.

51
Q

The SQL data manipulation command HAVING:

A
  • The HAVING clause in SQL is used to filter the results of an aggregate query
  • It works in conjunction with the GROUP BY clause.

A.query: a query that uses aggregate functions like SUM, AVG, COUNT, etc.

52
Q

How are String comparisons made.

A

String somparisons are made from left to right

53
Q

To make the output more readable, the SQL standard permits the use of aliases for any column in a ______ statement.

A

SELECT

54
Q

Which operator is used to check whether an attribute value lies within two bounds?

A

BETWEEN

55
Q

The SQL command that allows a user to list the contents of a table is _____.

A

SELECT

56
Q

Why are Date procedures often more software-specific than other SQL procedures?

A
  1. Different database systems (like MySQL, PostgreSQL, etc.) have their own ways of handling dates.
  2. This means functions for things like extracting the day from a date or adding days might be called different names or have different syntax.
  3. This makes it tricky to write date-related SQL code that works across all databases.
57
Q

A cascade order sequence is a multilevel ordered sequence created how?

A

Cascades happen by

  1. listing several attributes
  2. separating each by commas
  3. All after the ORDER BY clause.
58
Q

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

A

False

59
Q

The _____ special operator is used to check whether an attribute value is null.

A

IS NULL

60
Q

SQL allows the use of logical restrictions on its inquiries such as OR, AND, and NOT. (T/F)

A

True

61
Q

ANSI-standard SQL allows conjunction of?

A
  1. The use of special operators
  2. With the WHERE clause
62
Q

The basic SQL vocabulary has fewer than _____ words.

A

hundred

63
Q

What is the ISO and how does it correlate with the ANSI SQL standard?

A
  • ANSI develops the SQL standards, and ISO adopts them, making them internationally recognized.
  • This ensures that SQL databases worldwide can “speak” the same language and work together effectively. Learn More
64
Q

Why is SQL considered easier to learn?

A
  • Declarative language: You tell the database what you want, not how to get it. This simplifies the logic compared to procedural programming languages.
  • Readable syntax: Commands like SELECT, FROM, WHERE are easy to understand and remember.
  • Widely used: There are tons of resources, tutorials, and communities to help you learn.
65
Q

Give an example of how mathematical operators can be used with character-based attributes?

A

Mathematical operators can be used with character-based attributes in various ways, such as:

  • Equality (=): city = “New York” checks if the attribute “city” holds the value “New York”.
  • Inequality (!=): country != “USA” checks if the attribute “country” does not hold the value “USA”.
  • Pattern matching (LIKE): name LIKE “J%” checks if the attribute “name” starts with the letter “J”.
66
Q

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

A

Boolean

67
Q

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

A

alias

68
Q

The SQL command that allows a user to insert rows into a table is _____.

A

INSERT

69
Q

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

A

LIKE

70
Q

How do most SQL implementations handle case sensitivity in searches?

A

Most SQL implementations yield case-insensitive searches.

71
Q

Do all Relational Database Management Systems (RDBMSs) treat uppercase and lowercase letters the same way when comparing data?

A
  • Some, like Microsoft Access, automatically handle case sensitivity by performing necessary conversions, ensuring that ‘apple’ and ‘Apple’ are treated as equivalent.
  • Other RDBMSs might differentiate between uppercase and lowercase, requiring specific functions or techniques to achieve case-insensitive comparisons.
72
Q

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

A

query

73
Q

What does ISO stand for?

A

International Organization for Standardization

74
Q

What is the nature of the ISO?

A

An independent, non-governmental international organization

75
Q

What is the primary goal of ISO standards?

A

To ensure quality, safety, and efficiency across the globe

76
Q

What does ANSI stand for?

A

American National Standards Institute

77
Q

What is the role of ANSI?

A

Develops standards in the United States

American National Standards Institute

78
Q

What does SQL stand for?

A

Structured Query Language

79
Q

What is SQL used for?

A

Managing data in relational database management systems

80
Q

How does ANSI relate to SQL standards?

A

ANSI develops standards for SQL

81
Q

What is the relationship between ISO and ANSI SQL standards?

A

ISO recognizes and adopts ANSI SQL standards.

82
Q

What is the benefit of ISO adopting ANSI SQL standards?

A

Provides global recognition and acceptance

83
Q

What does the adoption of ANSI SQL standards by ISO promote?

A

Interoperability and consistency among SQL databases

(in ter-op-er a-bil-i-ty): the ability of computer systems/software to exchange and make use of information

84
Q

True or False: ISO is a governmental organization.

A

False

85
Q

Fill in the blank: ANSI develops the SQL standards, and ISO _______ them.

A

adopts

86
Q

What is the main purpose of developing SQL standards?

A

To ensure that different database systems can work together seamlessly