Databases - Exam questions Flashcards

1
Q

Describe what is meant by a primary key

A

A unique identifier for every record in a tbale

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

Write an SQL query that finds the name and presenter from all videos on the topic “the CPU”

A

Select Name, Presenter From Video Where Topic = The CPU

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

Give an advantage and a disadvantage of indexing a field

A

ADV: Searches in that field can be preformed more quickly
DIS: The index takes up more space in the database

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

Write an SQL statement that will remove all songs by an artist from the table Song

A

Delete From Song Where Artist = “Example”

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