Unit 6 Flashcards
What is the cardinality of the set derived from the list of integers [4, 6, 8, 12, 6].
4
The cardinality of a set is the number of members within that set. In this case, we would ignore the second 6 when creating the set, leaving us with 4 members in total.
Suppose that:
A is the set {john, mary, anil}
B is the set {anil, mary}
C is the set ∅.
Which of the following is true?
Select one or more:
- A U B = A
- A C B
- A n C = ∅
- C - B = {anil, mary}
- {anil, mary} ∊ A n B
- A U B = A
- A n C = ∅
Using the attached tables, what would be the result of the following SQL query?
SELECT *
FROM student
Using the attached tables, what would be the result of the following SQL query?
SELECT FirstName, LastName
FROM student
WHERE ModuleCode = ‘M269’
Using the attached tables, what would be the result of the following SQL query?
SELECT FirstName, LastName, Level
FROM student CROSS JOIN module
WHERE Module = ModuleCode
What is a set?
A set is an unordered collection of distinct entities.
For example, the list of numbers [4, 5, 8, 6, 4, 3, 4, 5, 8, 3, 7, 5, 7] would be formed into the following set (the order of the set is unimportant):
{3, 4, 5, 6, 7, 8}
What is a set enumeration?
A set enumeration is when a set is written with all elements explicitly listed, for example, {3, 4, 5, 6, 7, 8}.
What is a set comprehension?
A set comprehension is used to describe a set where the enumeration would be too complicated, or too lengthy to write down.
For example, the set comprehension {x : x is a whole number between 3 and 8} would describe the set enumeration {3, 4, 5, 6, 7, 8}.
What would the set be for the following list of numbers:
5, 2, 8, 3, 5, 6, 2, 5, 9, 4, 6, 7
{2, 3, 4, 5, 6, 7, 8, 9}
What would be the set enumeration described by the following set comprehension:
{x : x is a whole number between 23 and 34}
{23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34}
How would you write an empty set?
ø or {}.
Remember that the set of an empty set is not the same as the empty set itself, so the set {ø} is not the same as ø.
What do the following expressions mean?
- x is a member of the set ‘S’, or x is an element of the set ‘S’
- x is not a member of the set ‘S’, or x is not an element of the set ‘S’
What do the following expressions mean?
- The empty set is a subset of set ‘A’
- Set ‘A’ is a subset of itself
- Set ‘A’ is a proper subset of set ‘B’
What does the following expression mean, when dealing with sets?
A = B
Set ‘A’ is equal to set ‘B’.
Equality of sets can also be defined in terms of subsets:
A = B if A is a proper subset of B, and B is a proper subset of A.
What do the following expressions mean, and what would be the resulting sets?
- The union of sets {1, 2, 3} and {3, 4, 5}. The resulting set would be {1, 2, 3, 4, 5}
- The union of the empty set and set ‘A’. The resulting set would be set ‘A’