1.3.2 databases Flashcards

1
Q

What is database?

A

database is an organised collection of data that can be accessed, managed and updated easily.

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

field

A

single piece of data in a record

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

record

A

a group of related fields

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

table

A

collection of records

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

primary key

A

a unique identifier for each record in a table

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

foreign key

A

is an attribute that links two tables together. It acts as the primary key in one table and as the foreign key in the other.

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

secondary key

A

used to search for data in a database

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

relational database

A

a type of database that organises data in multiple tables.
it uses a primary key to link tables together and reduce data redundancy.
making efficient use of storage.

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

what is referential integrity?

A
  • it ensures consistency between related tables in a rational database.
  • maintain a valid relationship between the primary key and foreign key.
  • a foreign key must only exist if a corresponding primary key is in the related/linked table.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

benefits and drawbacks of referential integrity.

A

benefits:
- ensure data consistency and accuracy.
- prevent orphaned records

drawbacks:
- can impact the performance as more checks need to be done (to ensure consistency)
- may require additional planning and designing.

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

how to maintain referential integrity:

A
  • use a DBMS with a built-in support.
  • regular checkups and clean data to ensure inconsistency.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly