Relational Algebra, Optimization, and more Flashcards

1
Q

Selection condition

A

sigma, allows us to specify the subset of tuples we’re interested in (similar to SQL WHERE)

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

Project condition

A

pi, select a subset of attributes to be returned (similar to SQL SELECT)

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

Relation expressions

A

allow us to combine selection and projection together

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

Union

A

U, finds the set of tuples that belong to one set, the other, or both

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

Set difference

A

-, remove a set of tubles from a second set

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

Union-compatible relations

A

two relations must have the same number of attributes, same names of the attributes, and same data type for each matching attribute

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

Cartesian product

A

x, produces the set of all tuples by concatenating each tuple (same as cross product), computationally the most expensive operator

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

Joins

A

bowtie, join two tables based on some conditions

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

View

A

psuedo-table used to hold a result set

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

Stored Procedures

A

query you can store in database to be executed, similar to a function

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

SQL Injection

A

common attack by entering malicious data via user input

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

Query optimizer

A

chooses the most efficient way to execute a query

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

Logical optimization

A

rearranges the query via relational algebra (performed first), want to reduce the number of tuples as quickly as possible

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

Physical optimization

A

chooses indexes/types of joins (performed second)

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

Database index

A

data structure stored separately in memory for improving query operations

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

Covering index

A

index that contains all search terms as well as the output attributes

17
Q

Non-covering index

A

index that points you to information, but does not store it

18
Q

Distributed database

A

databases spread across multiple machines, in either the same or separate locations, approached via replication or duplication

19
Q

Replication

A

looks for changes in any database and pushed changes as necessary (NoSQL approach)

20
Q

Duplication

A

assigns one database as the master and duplicates that database on the the others any time changes are made to it (RDBMS approach)

21
Q

CAP

A

Consistency, Availability, Partition tolerance

22
Q

CAP - Consistency

A

all clients see the same data at the same time

23
Q

CAP - Availability

A

any client making a request for data gets a response, even if one or more nodes are down

24
Q

CAP - Partition tolerance

A

the cluster must continue to work despite any number of communication breakdowns (partitions) between nodes in the system