L7 Integrity Contraints Flashcards

1
Q

What are integrity contraints?

A

Integrity constraints are logical statements that restrict the set of allowable relations in a database.

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

What is the relationship between Keys and Functional Dependencies (FD)?

A

Keys are special cases of Functional Dependencies (FDs).

for instance: Stating that DNAME is a key of DEPT, means that no two distinct tuples in r2 have the same DNAME.

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

What are inclusion dependencies?

A

The existence of attributes in a table R whose values must be a subset of the values of the corresponding attributes in another table S

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

What is the relationship between Foreign Keys and Inclusion Dependencies?

A

Foreign keys are special cases of Inclusion dependencies (IND).

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

What is a foreign key?

A

A foreign key is a field (or collection of fields) in one table that uniquely identifies a row of another table

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

What are data dependencies?

A

Constraints that depend on the equality or inequality of values in tuples of relations are called data dependencies.

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

Name two examples of data dependencies.

A

FDs and INDs are data dependencies

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

What are domain dependencies?

A

Constraints that restrict the allowable domain values are called domain dependencies (DDs)

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

Name an example of a domain dependency (DD).

A
  • An example of a DD is that SALARY ranges between 15 and 40.
  • Another example of a DD is that ENAME is a string of at most 25 characters.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are cardinality constraints?

A

Constraints that restrict the cardinality of a projection of a relation onto a set of attributes are called cardinality constraints (CCs)

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

What are cardinality contstraints (CC)?

A

Constraints that restrict the cardinality of a projection of a relation onto a set of attributes are called cardinality constraints (CCs)

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

Name an example of a cardinality constraint (CC)?

A
  • An example of a CC is that there should not be more managers than employees.
  • Another example of a CC is that the number of students doing the MSc course should not exceed 100.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a functional dependency?

A

An FD over R is a statement of the form R: X →Y where X and Y are subsets of schema(R).

We say that X functionally determines Y .

An FD X → Y is satisfied in a relation r, if whenever two rows in r have the same X -value they also have the same Y -value.

An FD X → Y is satisfied in a relation r , if for each X -value of r there is at most one Y -value.

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