Section 1 Flashcards

(36 cards)

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

CREATES, ALTERS, and DROPS tables

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

DQL (Data Query Language)

A

SELECTS data from table

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

(DML) Data Manipulation Language

A

INSERTS, UPDATES, and DELETES data in a table.

17
Q

DCL (Data Control Language)

A

grants and revokes permissions to and from users.

18
Q

DTL (manages database transactions)

A

commits data to a database, ROLLS BACK from a database, and creates savepoints.

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

25
INT
4 bytes
26
BIGINT
8 bytes
27
DECIMAL (M,D)
Exact decimal number where M = number of significant digits, D = number of digits after decimal point
28
FLOAT
4 Bytes
29
DOUBLE
8 Bytes
30
join
A SELECT statement that combines data from 2 tables, known as the LEFT Table and RIGHT table, into a single result.
31
TINYINT UNSIGNED
Integer value between 0 and 100.
32
Data Definition Language (DDL)
CREATES, ALTERS, and DROP tables
33
Data Query Language (DQL)
SELECTS data from the database
34
Data Manipulation Language (DML)
INSERTS, UPDATES and DELETES data in a table
35
Data Control Language (DCL)
grants and revokes permissions to and from users.
36
DTL
commits data to a database, ROLLS BACK data from a database and creates savepoints.