The Relational Model Flashcards

1
Q

describe a relational model

A

represents the database as a collection of relations

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

what is a relation

A

a table of values
row= related data values
column= attribute

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

what is a tuple

A

a single record- a row

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

what is a relation schema

A

name of a relation with attributes

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

what is the degree of a relation

A

the number of attributes

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

what is the cardinality of a relation

A

the number of rows

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

what is a relation instance

A

a set of tuples related only to the key of the relation

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

what is the attribute domain

A

the predefined value and scope of an attribute

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

what is a relational integrity constraint

A

a condition that must be present for a valid relation

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

what are the three categories of integrity constraint

A

domain

key

referential integrity

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

what are the four main operations performed on a relational model

A

insert

delete

modify

select

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

what are the possible violations by insert

A

all three
key- if the key value already exists
domain- if the tuple breaks the domain
referential integrity- if the FK isn’t valid

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

what are the possible violations by update

A

domain

unless modifying a P or F K

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

what are the possible violations by delete

what can you do to fix it

A

referential integrity

restrict- don’t allow it
cascade- delete all references
set null- set FKs to null

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

what are the advantages of a relational model (6)

A

simplicity

structural independence

ease of use

queries

data independence

scalable

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

what are the disadvantages of a relational model (3)

A

limits on field length

complexity as data grows

isolation- complex systems are too complicated to share information

17
Q

what is SQL

A

a relational language based on relational calculus