The Relational Model Flashcards Preview

Comp23111- Databases > The Relational Model > Flashcards

Flashcards in The Relational Model Deck (17)
Loading flashcards...
1
Q

describe a relational model

A

represents the database as a collection of relations

2
Q

what is a relation

A

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

3
Q

what is a tuple

A

a single record- a row

4
Q

what is a relation schema

A

name of a relation with attributes

5
Q

what is the degree of a relation

A

the number of attributes

6
Q

what is the cardinality of a relation

A

the number of rows

7
Q

what is a relation instance

A

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

8
Q

what is the attribute domain

A

the predefined value and scope of an attribute

9
Q

what is a relational integrity constraint

A

a condition that must be present for a valid relation

10
Q

what are the three categories of integrity constraint

A

domain

key

referential integrity

11
Q

what are the four main operations performed on a relational model

A

insert

delete

modify

select

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

13
Q

what are the possible violations by update

A

domain

unless modifying a P or F K

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

15
Q

what are the advantages of a relational model (6)

A

simplicity

structural independence

ease of use

queries

data independence

scalable

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