F453 - databases Flashcards

1
Q

What is the use of the primary key?

A

unique identifier of each record

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

What is the use of the foreign key?

A

primary key from one table…
…used as an attribute in another…
…to link tables/provide relationship between tables

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

What is the use of the secondary key

A

used to search for a group of records

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

What is a data dictionary?

A

a file containing descriptions of data in database
used by database managers…
…then altering database structure
Uses metadata to define the tables

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

What are the benefits of a relational database compared with a flat file database?

A
avoid data duplication/save storage
data consistency
data integrity
easier to change data
easier to change data format
data can be added easily
data security/easier to control access to data.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Explain why a foreign key is also a primary key, but a primary key need not be a foreign key

A

foreign key links tables (to represent many to one relationship)…
…so that only one record is accessed/to avoid duplicate data
eg primary key from B used as foreign key in C from (a)
primary key is in a table that may contain data not required in another table
eg primary key from C is not used in B and hence cannot be a foreign key

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

What’s the difference between char and varchar data types

A

CHAR is fixed length

VARCHAR is variable length

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

Why are different views of data made available to users in a database?

A

so users can access the data they need
users do not need specialist knowledge
to protect data
to prevent unauthorised access.

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

What are the consequences of a many-to-many relationship?

A

not allowed/not in 3NF
needs another table between Student & Subject…
…to avoid duplication of data/to change to 3NF

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

What is a report, and what are the key features?

A

presentation of selected data…
…usually in the form of a table/specific layout
may be defined in advance…
…so the user does not need to set it up
Features of report definition: a query, a display order

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