Lecture 8: Relational Database Model Flashcards

(44 cards)

1
Q

Table in formal relational model term is

A

relation

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

Column header in formal relational model term is

A

attribute

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

All possible column values in formal relational model term is

A

domain

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

row in formal relational model term is

A

tuple

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

in formal relational model the term table definition is

A

schema of a relation

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

in formal relational model the term populated table

A

state of relation

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

T or F

a relation can have no key

A

false

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

Key of a relation identifies what ?

A

identifies a row in the table

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

schema of a relation is denoted as

A

R(A1,A2,A3…)

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

T or f

each attribute has a domain or a set of valid values

A

true

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

t or f

domain has only the logical definition

A

false, it has a logical definition and also has a datatype or a format

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

a tuple is represented by

A

enclosed in angled brackets

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

schema of a database is denoted by

A

S(R1,R2,R3…)

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

t or f

tuples are ordered

A

false

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

t or f

attributes in a relation schema R and of the values with the tuple are ordered

A

true

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

t or f

tuple values can be a group of values

A

false, tuple values must be atomic

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

t or f

each value must be from the domain off the attribute for that column

A

true

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

t or f

null values represents values that are unknown or inapplicable

19
Q

name three main constraints types

A
  • Key constraint
  • Entity integrity constraint
  • Referential integrity constraint
20
Q

Super key is a

A

is a set of attributes that are taken collectively and can identify all other attribute uniquely

21
Q

t or f

two tuples can have the same value for their super key

22
Q

t or f

a super key can be one or more key

23
Q

a key is a minimal

24
Q

t or f

any super key is a key

25
t or f any set of attributes that includes a key is a superkey
true
26
entity integrity is
primary key can't be null values in any tuple
27
referential integrity is
if a relation is referencing another using foreign keys then it can't use values other than one in the relation it's referencing
28
t or f a value of a foreign key can be null
true
29
t or f a value of a foreign key can be a value that doesn't exist in the referenced relation
false
30
t or f a foreign key can be a part of its primary key
false
31
semantic integrity is
based on the application and cannot be expressed by the model per se
32
what language is used in sql 99 to allow triggers and assertion
a constraint specification
33
t or f the relational database state is union of all individual relation states
true
34
t or f if a database is changed the state remain the same
false, if a database changed a new state arises
35
actions that can be taken in integrity constraints violations
- Cancel : the operation that causes the violation - Perform : the operation but inform the user of the violation - Trigger additional updates : so the violation is corrected (Cascade or null) - Execute a user-specified error-correction routine
36
t or f insert may violate the domain constraint
true
37
t or f insert doesn't violate the key constraint
false
38
t or f insert doesn't violate the referential integrity constraint
false
39
t or f insert may violates the entity integrity constraint
true
40
t or f it's legal if a primary key is deleted
false, If a primary key is being deleted is referenced from other tuples in the database
41
if delete is trying to remove a PK what actions can be performed
Restrict: reject the deletion Cascade: to attempt to cascade the deletion by deleting tuples that reference the tuple that is being deleted Set Null or Set Default: set the FK of the referencing tuples to NULL or changed to reference another default valid tuple
42
update may violate .... and ....
domain constraint, and not-null constraint
43
t or f it is legal to update a foreign key
false, may violate referential integrity
44
t or f updating ordinary attributes, doesn't violate any constraints
false, it can violate domain constraint