Exam 2 Flashcards

1
Q

Popular DBMS systems?

A

DB2 from IBM Oracle from Oracle Sybase DBMS from SAP SqlServer from Microsoft MySql (Open Source) PostgreSQL (Open Source)

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

What is a flat file?

A

Each relation in the database has a flat structure

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

What is a table?

A

Each row in the table represents a collection of related data values

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

What does a tuple represent in a database?

A

a row

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

What is an attribute in a database?

A

a column header

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

What does a table represent?

A

a relation

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

What is a domain?

A

A domain D is a set of atomic values

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

What is an atomic value?

A

Each value in the domain is indivisible

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

Example domains?

A

Usa_phone_numbers: the set of 10 digit phone numbers valid in the United States Academic_department_names: The set of academic department names in a university (Computer Science, Economics, Physics)

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

What is a data type / format?

A

data type for the domain: Usa_phone_numbers can be declared as a character string of the form (ddd)ddd-dddd, where each d is a numeric (decimal) digit and the first three digits form a valid telephone area code

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

What is relation schema?

A

Made up of a relation name R and a list of attributes A1, A2, … An Used to describe a relation Denoted as R

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

Attribute in relation schema

A

Each attribute Ai is the name of a role played by a domain D in the relation schema R

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

Domain in relation schema

A

D is called the domain of Ai and is denoted by dom(Ai)

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

what is a degree (arity)

A

Number of attributes n in the relation schema

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

Relation of degree 7 example:

A

STUDENT(Name, Ssn, Home_phone, Address, Office_phone, Age, Gpa) Also sometimes written as… STUDENT(Name: string , Ssn: string , Home_phone: string , Address: string , Office_phone: string , Age: integer , Gpa: real )

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

What is a Relation state?

A

A relation state of schema R(A 1 , A 2 , … , A n ) is a set of tuples: r = {t 1 , t 2 , … , t m } Also called relational intention or relation extension:

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

Cartesian product (x)

A

Specifies all possible combinations of values from the underlying domains

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

Current relation state

A

Only the valid tuples that represent a particular state of the real world

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

Subset (⊆)

A

A smaller part of a larger set

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

Cardinality

A

Total number of values in a domain

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

Ordering of tuples in a relation. How does that work?

A

Elements in a set have no order. Tuples in a mathematical relation have no order However in programming, tuples do have an order There is no preference for one ordering over another

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

Alternative definition of a relation

A

Each tuple ti is a mapping from one R to D. D is a union of the attribute domains Tuple is a set of attribute value pairs Tuples list has no order

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

Self describing data

A

When a description of each value (like the attribute name) is included in the tuple

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

Flat relational model

A

Each value in a tuple is an atomic value that is not divisible Composite and multivalued attributes are now allowed Also called first normal form assumption

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

Null values

A

Null can mean value unknown, not available, or does not apply We cannot compare null values. For instance, 2 customers with null addresses do not have the same address! It’s best to avoid null values as much as possible in database design

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

Assertion

A

Assertion is a predicate expressing a condition we wish the database to always satisfy Predicate The values in each tuple are values that satisfy the predicate

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

Closed world assumption

A

The only true facts in the universe are those present within the extension of the relation

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

Relational notation

A

A relation schema R of degree n is denoted by R(A 1 , A 2 , … , A n ). The uppercase letters Q, R, S denote relation names. The lowercase letters q, r, s denote relation states. The letters t, u, v denote tuples.

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

Constraints

A

Restrictions on values in the database state Derived from rules in the miniworld

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

Inherent constraints

A

Constraints that are inherent in the data model Also called implicit constraints Example: can’t have duplicate tuples

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

Schema-based constraints

A

Constraints directly expressed in the schema Also called explicit constraints Domain constraints, key constraints, constraints on ulls, entity integrity, etc

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

Application-based constraints

A

Constraints that can’t be expressed in schema but is enforced by the application programs Also called semantic constraints or business rules

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

Domain constraints

A

Within each tuple, the value of each attribute must be an atomic value from the domain

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

Candidate key

A

A key that can possibly be a primary key in a table Each attribute for a row is unique

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

Primary Key

A

The key chosen to maintain uniqueness in a table A candidate key that is used to identify tuples in a relation

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

Superkey

A

This is basically a combination of multiple keys that form a primary key Specifies a uniqueness constraint that no two distinct tuples in any state r of R can have the same value for SK Similar to a primary key? Can be used to uniquely identify each tuple

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

Unique key

A

Other candidate keys that are not chosen to be a primary key

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

Relational database schema

A

A relational database schema S is a set of relation schema and a set of integrity constraints IC The tables and the columns

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

Relational database state

A

The rows of a table Also called snapshot or instance

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

A database that does not obey all its integrity constraints…

A

A database that does not obey all its integrity constraints is considered not valid Otherwise it is called a valid state Integrity constraints are expected to hold for every valid database state

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

Entity integrity constraint

A

No primary key value can be NULL This means we can’t identify some tuples

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

Referential integrity constraint

A

Used to maintain the consistency among tuples in two relations For example, a department number in the EMPLOYEE tuple must match an actual department number in the DEPARTMENT table

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

Foreign key

A

If a relational schema R1 is a foreign key that references R2, it must have the same domain and must actually refer to a real value

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

Referencing relation

A

R1 is the referencing relation and R2 is the referenced relation If this holds, the referential integrity constraint holds

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

Semantic integrity constraints

A

Not part of DDL For example: age of child should not exceed age of parent

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

Constraint specification language

A

How to specify more general constraints

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

Trigger and assertions

A

Can specify some of the constraints in SQL However, more common to check in the actual application code itself

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

State constraints

A

Define constraints on a valid state of the database

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

Transaction constraint

A

Deal with changes to the database Typically enforced by application programs

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

Result relation

A

The answer to a user’s query

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

Database modification or update

A

3 basic mechanics: insert, delete, update (modify)

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

How does an insert work when talking about tuples and schemas?

A

A new tuple t gets inserted into relation R Can potentially violate constraints Violate domain constraint Attribute value isn’t in domain Violate key constraints New tuple t is already in the relation Violate entity integrity If any part of the primary key is NULL Violate referential integrity If the foreign key is bad The default action is to reject an insert if it violates something

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

How does a delete work when talking about tuples and schemas?

A

Removing a tuple Can only violate referential integrity if it’s being referenced from other tuples in the database Several ways to fix this: Restrict Reject the deletion Cascade Propagate the deletion by deleting tuples that reference the tuple being deleted Set null / set default Modify the referencing attribute instead Can cause a violation if part of primary key

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

How does update work when talking about tuples and schemas?

A

Change value or one or more attributes in a tuple Only need to check if data type and domain are correct Modifying a primary key can cause problems similar to Delete

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

What is a transaction?

A

Executing a database operation Can include any number of retrieval operations or update operations

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

Relational calculus

A

Higher level declarative language for specifying relational queries No order of operations to specify how to retrieve the query result

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

Unary operations (relational algebra)

A

SELECT and PROJECT operate on single relations

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

Binary operations (relational algebra)

A

Operate on two tables by combining related tuples based on join conditions

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

Aggregate functions (relational algebra)

A

Conditions that can summarize data from the tables

60
Q

SELECT operation (relational algebra)

A

Choose a subset of the tuples from a relation that satisfies a selection condition σ Salary > 30000 ( EMPLOYEE ) σ (sigma) is used to denote the SELECT operator Each select is unary applying to a single relation and each tuple individually Degree is the number of attributes is the same as R for the relation Selectivity Fraction of tuples selected by a selection condition

61
Q

PROJECT operation (relational algebra)

A

Selects certain columns from the table and discards other columns π Lname, Fname, Salary ( EMPLOYEE ) π (pi) is the symbol used to represent the PROJECT operation Degree is equal to the number of attributes in the list Project operation removes any duplicate tuples (known as duplicate elimination) since the result is a set (if duplicates weren’t removed it would be a multiset or bag) Similar to SELECT DISTINCT in SQL

62
Q

How to do a sequence of events in relational algebra

A

In-line expression for relational algebra π Fname, Lname, Salary (σ Dno = 5 ( EMPLOYEE )) assignment operation DEP5_EMPS ← σ Dno = 5 ( EMPLOYEE ) RESULT ← π Fname, Lname, Salary ( DEP5_EMPS ) Rename TEMP ← σ Dno = 5 ( EMPLOYEE ) R ( First_name, Last_name, Salary ) ← π Fname, Lname, Salary ( TEMP )

63
Q

Rename (relational algebra)

A

ρ S ( B1, B2, … , Bn ) ( R ) the symbol ρ (rho) is used to denote the RENAME operator

64
Q

Binary set operators (relational algebra)

A

Union, intersection, set difference

65
Q

Union (relational algebra)

A

R ∪ S Includes tuples that are in R or S or both

66
Q

Intersection (relational algebra)

A

R ∩ S Includes tuples that are in both R and S

67
Q

Set Difference (relational algebra)

A

R – S Includes tuples that are in R but not in S Not commutative

68
Q

Cross Product (cartesian product, cross join) (relational algebra)

A

Denoted by × Concatenates all possible combination of tuples in the two relations (tables)

69
Q

Join operation (relational algebra)

A

JOIN operation, denoted by ⋈ Used to combine related tuples from two relations Cartesian product followed by a select Where two id numbers match

70
Q

Equijoin and natural join (relational algebra)

A

A join with an = is an equijoin For equijoins we have extra attributes with identical values Natural join is basically an EQUIJOIN followed by the removal of superfluous attributes Natural join is denoted by * Join attribute (which attribute to join on) Join selectivity: expected size of join result divided by maximum size These are types of Inner joins

71
Q

Division operator (relational algebra)

A

The DIVISION operation, denoted by ÷ Retrieve the names of employees who work on all the projects that “john smith” works on Can be expressed as sequence: T1 ← π Y (R) T2 ← π Y ((S × T1) – R) T ← T1 – T2 Confusing Produces a relation R(X) that includes all tuples t[X] in R 1 (Z) that appear in R 1 in combination with every tuple from R 2 (Y), where Z = X ∪ Y.

72
Q

Query tree (relational algebra)

A

Data structure that corresponds to a relational algebra expression The result for each step needs to be done before the next one can execute

73
Q

Generalized projection (relational algebra)

A

Allows functions of attributes to be included in the projection list For example, tax * 0.5

74
Q

Aggregate functions and grouping (relational algebra)

A

Sum, maximum, minimum, count F in cursive is used

75
Q

Recursive closure operations (relational algebra)

A

Joining on the attributes of the same type

76
Q

Outer join (relational algebra)

A

Used to keep leftover attributes in R or S or both after joining Left outer join ⟕ Keeps every tuple in first relation Right outer join ⟖ Keeps every tuple in second relation Full Outer join ⟗ Keeps every tuple in both relations

77
Q

Tuple relational calculus

A

There is no order given how to evaluate a query This is a nonprocedural language Expressive power is identical SQL is based on tuple relational calculus

78
Q

Tuple variables

A

{t | COND(t)} T is a tuple variable and COND(t) is a conditional expression that’s either true or false {t | EMPLOYEE(t) AND t.Salary > 50000 } {t.Fname, t.Lname | EMPLOYEE(t) AND t.Salary > 50000 } Range relation We need to specify a range relation R of t, otherwise it will pick tuples from everything in the universe Condition A condition to select a particular combination of tuples. Requested attributes A set of attributes to be retrieved

79
Q

Expression in tuple relational calculus

A

{t 1 .A j , t 2 .A k , … , t n .A m | COND (t 1 , t 2 , …, t n , t n+1 , t n+2 , …, t n+m )} COND is condition or formula Formula is made up of atoms Atoms can be A relation and tuple variable A comparison operator between two attributes A comparison between an attribute and a regular number Truth value: a relation that yields true or false Every atom is a formula

80
Q

What are quantifiers?

A

Universal quantifier ∀ Existential quantifier ∃

81
Q

Free or bound?

A

A tuple variable in F that is an atom is free in F The free variables [hereafter abbreviated to FV] in a statement stand for objects that the statement says something about…The fact that you can plug in different values for a free variable means that it is free to stand for anything. Bound variables [hereafter abbreviated to BV], on the other hand, are simply letters that are used as a convenience to help express an idea and should not be thought of as standing for any particular object. A bound variable can always be replaced by a new variable without changing the meaning of the statement, and often the statement can be rephrased so that the bound variables are eliminated altogether.

82
Q

Existential quantifier:

A

There exists some tuple that makes F true

83
Q

Universal quantifier

A

For all situations To make the quantified formula TRUE , the inner formula must be TRUE for all tuples in the universe.

84
Q

Select project join queries (tuple relational calculus)

A

Don’t involve complex quantification

85
Q

Query graph (tuple relational calculus)

A

Graph of how the query is structured Represented by relation nodes Constant nodes

86
Q

Safe expresion (tuple relational calculus)

A

Guaranteed to yield a finite number of tuples If not, it is unsafe {t | NOT (EMPLOYEE(t)) } is unsafe

87
Q

Domain relational calculus

A

While SQL was being developed by IBM Research, another language QBE was being developed based on domain relational calculus Instead of variables ranging over tuples, the variables range over single values from domains of attributes {x 1 , x 2 , …, x n | COND (x 1 , x 2 , …, x n , x n+1 , x n+2 , …, x n+m )}

88
Q

Logical database design

A

Also known as data model mapping How to create a relational schema from an EER diagram

89
Q

Logical Database Design Step 1: Mapping regular entity types

A

For each entity type, create a relation R that has all the simple attributes of E. Include only the simple component attributes of a composite attribute Entities created from this are called entity relations because each tuple is an instance

90
Q

Logical Database Design Step 2: Mapping of weak entity types

A

For each weak entity type W, create a relation R and include all simple attributes of W as attributes of R Add a key to point to the parent attribute

91
Q

Logical Database Design Step 3: Mapping of binary 1:1 relationship types

A

3 approaches 1: foreign key approach Choose 1 relation and include it as a foreign key of the other 2: merge relation approach Merge the two entity types into a single relation 3: cross-reference / relationship relation approach Set up a third relation for cross referencing the primary keys of the two relations S and T

92
Q

Logical Database Design Step 4: Mapping of binary 1:N relationship types

A

Two approaches: 1: foreign key approach Identify the relation S that specifies the participating entity type at the N side of the relationship. Include a foreign key for the other relation 2: relationship relation approach Create a cross reference table including primary keys and foreign keys to tie

93
Q

Logical Database Design Step 5: Mapping of binary M:N relationship types

A

The only option here is to use a relationship relation (cross reference) option

94
Q

Logical Database Design Step 6: Mapping of multivalued attributes

A

For each multivalued attribute A, create a new relation R Include foreign key and the name in the new table. The primary key can be listed multiple times

95
Q

Logical Database Design Step 7: Mapping of n-ary relationship types

A

Use the relationship relation (cross reference) option For each n-ary relationship where n > 2, create a new cross reference table S to represent the relation. Add foreign keys to tie things together

96
Q

Mapping of specialization or generalization

A

Two main options: Map the specialization into a single table Map into multiple tables

97
Q

Logical Database Design Step 8: options for mapping specialization or generalization

A

Multiple relations: superclass and subclass Multiple relations: subclass relations only Single relation with one TYPE attribute Single relation with multiple TYPE attributes

98
Q

Mapping of shared subclass

A

Must all have the same key

99
Q

Logical Database Design Step 9: mapping of union types (categories)

A

Add a new surrogate key to correspond to the union type

100
Q

How to map a normal entity with attributes?

A

The identifying attribute, A, becomes the primary key of the ET table. All the attributes become keys in the table

101
Q

How to map composite attributes?

A

Map each part of the composite attribute (C is composed of D and E, so only map D and E). The relational model is flat.

102
Q

How to map multi-value property types?

A

ET table with attribute A for primary key ET-F table with A and F as part of the primary key. BOTH ARE UNDERLINED!

103
Q

How to map 1 - 1 relationship?

A

ET1 with primary key A and foreign key B ET2 with primary key B OR ET1 with primary key A ET2 with primary key B and foreign key B

104
Q

How to map 1 - 1 relationship when one part of the relationship is mandatory?

A

If ET2 has a mandatory link to relationship R: ET1 with primary key A ET2 with primary key B and foreign key B since B can never be NULL in ET2

105
Q

How to map 1 to many relationship types:

A

If ET2 is on the many side: ET1 with primary key A ET2 with primary key B and foreign key B

106
Q

How to map many to many relationship types:

A

Add new table for R with A and B underlined together as foreign keys as part of the primary key to tie everything together.

107
Q

How to map weak entity types with identifying relationships

A

If Et2 is the weak attribute: ET 1 table has A as the primary key ET2 has a table with A and B underlined together as the primary key

108
Q

How to map a mandatory disjoint?

A

Two tables for each of the two types. ET1 has all the attributes specific to ET1, and all the attributes in its parent type ET ET2 has all the attributes specific to ET2, and all the attributes in its parent type ET

109
Q

How to map a mandatory overlap?

A

For parent class: ET: Primary Key A, B ET1: Foreign Key A, C ET2: Foreign Key A, D

110
Q

How to map a non-mandatory overlap?

A

For parent class: ET: Primary Key A, B ET1: Foreign Key A, C ET2: Foreign Key A, D

111
Q

How to map a non-mandatory overlap?

A

For parent class: ET: Primary Key A, B ET1: Foreign Key A, C ET2: Foreign Key A, D

112
Q

How to map a union type?

A

Make new primary key ET-ID for parent type with key B Table for ET1: Primary Key C with ET-ID foreign key Table for ET2: Primary Key D with ET-ID foreign key

113
Q

R * S in relational algebra?

A

natural join

114
Q

What does p looking thing in relational algebra do?

A

rename

115
Q

(o looking thing) in relational algebra

A

selection

116
Q

What is selecting?

A

Finding rows

117
Q

What is projection?

A

Finding columns

118
Q

What symbol for selection?

A

o looking thing

119
Q

What symbol for projection?

A

pi

120
Q

What is OR in relational algebra?

A

union

121
Q

What is AND in relational algebra?

A

intersection

122
Q

What does \ mean in relational difference?

A

Set difference in one set but not the other

123
Q

Symbol for natural join in relational algebra?

A

*

124
Q

What is the difference between theta and natural join?

A

theta works with less than and greater than natural join only works with =

125
Q

symbol for theta join?

A

bowtie

126
Q

bowtie symbol?

A

theta join

127
Q

inner vs outer join?

A

inner join doesn’t add extra values

128
Q

left outer join

A

preserve left operand tuples even if it doesn’t match the join conditions (leave as NULL)

129
Q

Cartesian product?

A

combines each combination of tuples!

130
Q

Divide By in relational algebra?

A

For A divided by B Return rows of A that match all of B must match up with every single value in divisor

131
Q

p looking operator for relational algebra?

A

rename

132
Q

symbol for range expression?

A

∈ t∈R means that t is a tuple of relation R

133
Q

attribute value?

A

t.A`

134
Q

symbol for comparison operator in relational calculus

A

theta

135
Q

list of atoms for relational calculus?

A

range expression, attribute, comparing two constants

136
Q

predicate

A

an atom is a predicate

137
Q

Selection in tuple calculus

A

{r | r ∈ Regular User)

138
Q

projection in tuple calculus

A

{r.Email, r.BirthYear, r.Sex | r ∈ RegularUser and r.HomeTown = ‘Atlanta’)}

139
Q

union in tuple calculus

A

{s.City | there exists(r ∈ RegularUser)(s.City = r.CurrentCity) or there exists (t ∈ RegularUser)(s.City = t.HomeTown)

140
Q

basic idea of tuple calculus?

A

instead of a series of operations, you’re describing the result (there exists something that fulfills these rules)

141
Q

intersection in tuple calculus

A

{s.City | there exists(r ∈ RegularUser)(s.City = r.CurrentCity) and there exists (t ∈ RegularUser)(s.City = t.HomeTown)

142
Q

set difference in tuple calculus

A

“and not”

143
Q

natural join in tuple calculus

A

r.Year = s.Year and t.Email = r.Email and t.Year = r.Year r ranges over regular user s ranges over major 60s events t is output

144
Q

cartesian product in tuple calculus

A

{r, s | r ranges over regular user and s ranges over user interests} remember this creates a combination of all combinations in both tables {t | ∃ p ∈ r ∃ q ∈ s (t[A] = p[A] ∧ t[B] = p[B] ∧ t[C] = q[C] ∧ t[D] = q[D])}

145
Q

divide by in tuple calculus

A

find email for all users with at least all of the interests of user 1 written manually just like cartesian product there must be a tuple that matches all of these other tuples {t | ∃ p ∈ r ∀q ∈ s (p[B] = q[B] ⇒ t[A] = p[A])}