Types Flashcards

1
Q

Rows in a database are aka …?

A

Tuples

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

Columns in a database are aka …?

A

Attributes

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

What is an atomic type?

A

A type with no structure (i.e. a single thing, like a number, string or alphanumeric)

i.e. like an atom was originally thought, cannot be broken down further

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

How do you write the type of an ordered pair, and what is it called?

A

A⊗B; Product Type

Example

(John, 28) has the type String⊗Number

Formally written:

(John, 28) : String⊗Num

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

Write the type of the following labelled tuple:

(name: John, age: 28, address: Colchester)

A

[name: String, age: Num, address: String]

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

True/False - A finite set may contain elements of different types.

A

False

All elements in a finite set must be of the same type.

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

Give the type of the set

{1, 2, 3, 4, 5}

A

Set(Num)

Formally written

{1, 2, 3, 4, 5} : Set(Num)

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