Relational Model Flashcards

1
Q

What is a relational model?

A

A logical model which consists of relations(tables) to store data.
- made of a set of named relations in a 2d table of attributes and tuples.

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

What is an entity?

A

the name of a table
must be distinct

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

What is an attribute?

A

the names of the columns
must be distinct in relation
e.g. EMP_ID

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

What is a tuple?

A

A record. A row of a table.
A single occurrence of an entity

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

What is an attribute value?

A

The values that fill out a table

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

What is a degree?

A

the number of attributes in a table (columns)

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

What is the cardinality?

A

The number of tuples at one time (can change)

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

What must relational tables have?

A

no duplicate attributes/tuples
attributes/tuples inherently unordered

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

What is a relational?

A

A set of unordered tuples

e.g.
EMPLOYEE ( (1234, Sam Smith, 25), (1235, Joe Ball, 40))

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

What is a domain?

A

set of all permissable values for a column
e.g. ____ must be NOT NULL, or INTEGER

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

What is a primary key?

A

uniquely identify a tuple
can be made of more than one attribute

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

What is a Foriegn key?

A

attribute matches PK in another table

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

What is a constraint?

A

Restrict the data values that can be inserted to enforce consistency
e.g. column cannot be null

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

What is a relational database schema?

A

A database is a collection of relations as made up of all the database relations.

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