Section 1 Flashcards

1
Q

What are the 3 parts of a database model?

A
  1. Data structures that prescribe how data is organized.
  2. Operations that manipulate data structures.
  3. Rules that govern valid data.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What data base model is used in SQL?

A

Relational Model: A model based on tabular data structure.

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

Set

A

An unordered collection of elements enclosed in braces.

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

Tuple

A

An ORDERED collection of elements enclosed in parentheses.

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

What does a table consist of?

A

A name, a fixed tuple of columns, and a varying set of rows.

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

A column has what?

A

A name and a data type.

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

Row

A

is an unnamed tuple of values. Each value corresponds to a column and belongs to the column’s data type.

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

Data type

A

is a named set of values from which column values are drawn

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

What is another name for Table in mathematics and Files?

A

Relation and File

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

What is another name for column?

A

Attribute and Field

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

What is anothr name for row?

A

Tuple and Record

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

What is another name for Data Type?

A

Domain and Data Type (Files)

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

What are the relational rules?

A

-Unique primary key
-Unique column names
- No duplicate rows

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

DDL (Data Definition Language

A

Defines the structure of the database.

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

DQL (Data Query Language)

A

Retrieves data from the database.

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

(DML) Data Manipulation Language

A

manipulates data stored in a database.

17
Q

DCL (Data Control Language)

A

controls database user access.

18
Q

DTL (manages database transactions)

A

manages database transactions.

19
Q

Row

A

unnamed sequence of values

20
Q

Cell

A

a single column of a single row.

21
Q

Tables must follow these relational rules:

A
  1. Exactly one value per cell.
  2. No duplicate column names.
  3. No duplicate rows
  4. No row order.
22
Q

TINYINT

A

-1 byte
- Signed range: -128 to 127
- Unsigned range: 0 to 255

23
Q

SMALLINT

A
  • 2 bytes
    -Signed range: -32768 to 32767
    -Unsigned range: 0 to 65535
24
Q

MEDIUMINT

A

3 bytes

25
Q

INT

A

4 bytes

26
Q

BIGINT

A

8 bytes

27
Q

DECIMAL (M,D)

A

Exact decimal number where M = number of significant digits, D = number of digits after decimal point

28
Q

FLOAT

A

4 Bytes

29
Q

DOUBLE

A

8 Bytes

30
Q

join

A

A SELECT statement that combines data from 2 tables, known as the LEFT Table and RIGHT table, into a single result.

31
Q

TINYINT UNSIGNED

A

Integer value between 0 and 100.