Relational DBMS Flashcards

1
Q

How are data stored in a relational database?

A

In predefined tables that have attributes and relations

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

What are tables also called?

A

Entities and relations

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

What does the tables look like?

A

The tables are made up of columns and rows.

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

What can we say about a row in a DB?

A

It is a tuple of data.
There are no duplicate rows.
Their order is irrelevant.

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

What can we say about a column in a table in a relational database?

A

It contains a value for an attribute

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

How can we uniquely define the rows

A

With Id’s: primary and composite keys

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

What is a primary key

A

It is an attribute that uniquely identifies a tuple (row)

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

What is a composite key?

A

It is a primary key that consist of two attributes.

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

What is the Entity integrity rule?

A

The primary key or the attributes making up the composite key should not be null!

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

What is a candidate / alternate key

A

attributes that also can uniquely identify a row in a table - are referred to as candidate keys or alternate keys

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

What is a foreign key?

A

it is an attribute that refers to a parent table. They are required to match the primary key of the parent table

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

What is referential integrity constraints?

A

It is constraints that are in place to achieve referential integrity

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

What is an example of referential integrity constraints?

A

For example that a primary key or a foreign key can’t be null.

Or if a key refers to a record, that record cannot be deleted.

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

What is cascade?

A

It is something you put on a foreign key to decide what happens on events like: update, delete

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

What cascade options are there?

A

NO ACTION
SET NULL
SET DEFAULT
CASCADE: On update, on delete

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