Databases & SQL (paper 2) Flashcards

1
Q

what is a database

A

a way of holding data in an organised way so that searching for data items meeting certain criteria is quick and easy

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

What is the order of tables fields and records inside a database

A

Tables are inside a database
There are field (columns) in a table
Records are rows in a database

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

what is A on this diagram

A

the unique ID

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

whats is B on this diagram

A

the table

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

what is C on this diagram

A

a field

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

what is B on this diagram

A

a record

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

what does SQL stand for

A

structures query language

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

what is used to search records in a database

A

SQL

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

What is the structure of SQL code

A

SELECT … , … , …
FROM (table name)
WHERE (condition)
ORDER BY (field name) ASC / DESC;

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

what is the code used to count the number of records with a condition

A

SELECT COUNT(…)
FROM (table name)
WHERE …;

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

whats is the code used to find the total of all records in a field

A

SELECT SUM(…)
FROM (table name)
WHERE …;

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

What is a unique Id

A

A unique identifier which is different for each record of a table

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