Lecture 8: Relational Database Model Flashcards

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

A

true

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

A

false

22
Q

t or f

a super key can be one or more key

A

true

23
Q

a key is a minimal

A

superkey

24
Q

t or f

any super key is a key

A

false

25
Q

t or f

any set of attributes that includes a key is a superkey

A

true

26
Q

entity integrity is

A

primary key can’t be null values in any tuple

27
Q

referential integrity is

A

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
Q

t or f

a value of a foreign key can be null

A

true

29
Q

t or f

a value of a foreign key can be a value that doesn’t exist in the referenced relation

A

false

30
Q

t or f

a foreign key can be a part of its primary key

A

false

31
Q

semantic integrity is

A

based on the application and cannot be expressed by the model per se

32
Q

what language is used in sql 99 to allow triggers and assertion

A

a constraint specification

33
Q

t or f

the relational database state is union of all individual relation states

A

true

34
Q

t or f

if a database is changed the state remain the same

A

false, if a database changed a new state arises

35
Q

actions that can be taken in integrity constraints violations

A
  • 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
Q

t or f

insert may violate the domain constraint

A

true

37
Q

t or f

insert doesn’t violate the key constraint

A

false

38
Q

t or f

insert doesn’t violate the referential integrity constraint

A

false

39
Q

t or f

insert may violates the entity integrity constraint

A

true

40
Q

t or f

it’s legal if a primary key is deleted

A

false, If a primary key is being deleted is referenced from other tuples in the database

41
Q

if delete is trying to remove a PK what actions can be performed

A

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
Q

update may violate …. and ….

A

domain constraint, and not-null constraint

43
Q

t or f

it is legal to update a foreign key

A

false, may violate referential integrity

44
Q

t or f

updating ordinary attributes, doesn’t violate any constraints

A

false, it can violate domain constraint