IB A3 Flashcards

(13 cards)

1
Q

What is a database?

A

A database refers to an organized collection of structured information or data that can be accessed in different ways.

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

What is a table?

A

structure
of rows and columns
for storing a group of
similar data.

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

What is an entity?

A

a living or
non-living thing that can
have data stored about
it that can be described

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

What is a tuple/record?

A

one instance of an entity; a row in
a table.

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

What is an attribute/field?

A

attribute: a data
item or a characteristic
of an entity; a column in
a table.

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

What is the primary key?

A

Primary key: a field
that uniquely identifies a
record in a table.

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

What is the foreign key?

A

Foreign key: an
attribute in a table that
refers to the primary key
in another table.

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

What is the composite key?

A

Composite key: a set
of attributes that form a
primary key.

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

What is a relationship?

A

4 Relationship: a
relation established
between different
tables, where the
foreign key in one table
refers to the primary key
in another table

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

What are the different types of relationships?

A

one-to-one (1:1)
one-to-many (1:m)
many-to-one (m:1)
many-to-many (m:m).

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

How does a one-to-one relationship work?

A

When there is a one-to-one relationship between two tables, that means that one record in a
table is associated with exactly one record in another table: the primary key corresponds to
one or no data in another table. For example, each staff member of a school has one single
staff ID; each country has exactly one capital city; or a user on a social media platform has a
single user profile. Those are very rare types of relationships, which you will not frequently
encounter when dealing with databases.

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

How does a One-to-many relationship work?

A

This is a frequently used type of relationship, and it refers to one record in a table being
associated with one or more records in another table: the toreign key of one table references
the primary key of another table. Examples of one-to-many relationships are where one teacher
teaches many subjects; one tourist visits many countries; one person owns many properties;
one person has many bank accounts.

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