Chapter 5 Flashcards

(22 cards)

1
Q

Aggregate Functions

A

For calculating and summarizing values in queries, SQL provides the following aggregate functions:

  • COUNT
  • SUM
  • AVG
  • MIN
  • MAX
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Alias

A

A name that is not one’s true name

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

COUNT

A

returns the number of cells in a range that contains numbers

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

CREATE TABLE

A

Used for creating and connecting relational tables

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

CREATE VIEW

A

In SQL, a view is a virtual table based on the result-set of an SQL statement. A view contains rows and columns, just like a real table. The fields in a view are fields from one or more real tables in the database. You can add SQL functions, WHERE, and JOIN statements to a view and present the data as if the data were coming from one single table.

CREATE VIEW view_name AS
SELECT column_name(s)
FROM table_name
WHERE condition

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

Data Control Language

A

Used for data access control

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

Data Manipulation Language

A

Used to insert, modify, delete, and retrieve data

  • Example commands
    • insert into
    • update
    • delete
    • select
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Data Definition Language

A

Used to create and modify the structure of the database:

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

DELETE

A

to erase, wipe out, cut out

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

DROP TABLE

A

Used to remove a table from the database

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

INSERT INTO

A

used to populate the created relations with data

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

SELECT

A

used for the retrieval of data from the database relations

  • most commonly issued SQL statement
  • Basic form:
    • SELECT <columns></columns>
    • FROM <table>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

DISTINCT

A

Can be used in conjunction with the SELECT statement

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

ORDER BY

A

Used to sort the results of the query by one or more columns (for expressions)

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

LIKE

A

Used for retrieval of records whose values partially match a certain criteria

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

Query

A

automatically execute SQL statements as soon as a page or widget loads

17
Q

SQL Data Types

A

Each column of each SQL created relation has a specified data type

  • CHAR
  • VARCHAR
  • INT
  • NUMERIC
  • DATE
18
Q

SQL Standard

A

SQL became the standard language for querying data contained in the relational database

19
Q

SUM

A

an Aggregate Function used to find the sum of all non-NULL values in a column

20
Q

UPDATE

A

allows you to change the values in records using the UPDATE SQL command

21
Q

VIEW

A

a SQLite statement that is stored in the database with an associated name

22
Q

WHERE

A

used to specify a condition while fetching the data from one table or multiple tables