Types Flashcards
Rows in a database are aka …?
Tuples
Columns in a database are aka …?
Attributes
What is an atomic type?
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 do you write the type of an ordered pair, and what is it called?
A⊗B; Product Type
Example
(John, 28) has the type String⊗Number
Formally written:
(John, 28) : String⊗Num
Write the type of the following labelled tuple:
(name: John, age: 28, address: Colchester)
[name: String, age: Num, address: String]
True/False - A finite set may contain elements of different types.
False
All elements in a finite set must be of the same type.
Give the type of the set
{1, 2, 3, 4, 5}
Set(Num)
Formally written
{1, 2, 3, 4, 5} : Set(Num)