Search Header Logo
N5 Computing Database Revision Part 2

N5 Computing Database Revision Part 2

Assessment

Presentation

Computers

9th - 12th Grade

Practice Problem

Hard

Created by

Tracy Mutter

FREE Resource

5 Slides • 16 Questions

1

N5 Computing Science

DATABASE REVISION - PART 2

2

media

Countries Database

For this lesson we will look at a geographical database holding
information about cities and countries.

3

Multiple Choice

Question image

What is the primary / foreign key join between these tables?

1

Country.countryName = City.cityName

2

Country.countryCode = City.cityID

3

Country.countryCode = City.countryCode

4

Country.cityID = City.CityID

4

Data Dictionary

This is a plan for the data base and lists the tables, field names and their attributes.

5

Multiple Choice

Question image

What is missing in part (b)?

1

PK

2

FK

3

Text

4

4

5

Yes

6

Multiple Choice

Question image

What is missing in part (a)?

1

PK

2

FK

3

Text

4

4

5

Yes

7

Multiple Choice

Question image

What is missing in part (c)?

1

PK

2

FK

3

Text

4

4

5

Yes

8

Multiple Choice

Question image

What is missing in part (d)?

1

PK

2

FK

3

Text

4

4

5

Yes

9

Multiple Choice

Question image

What is missing in part (a)?

1

PF

2

FK

3

Text

4

Number

5

No

10

Multiple Choice

Question image

What is missing in part (b)?

1

PF

2

FK

3

Text

4

Number

5

No

11

Multiple Choice

Question image

What is missing in part (c)?

1

PF

2

FK

3

Text

4

Number

5

No

12

Multiple Choice

Question image

What is missing in part (d)?

1

PF

2

FK

3

Text

4

Number

5

No

13

Multiple Choice

Question image

What is missing in part (e)?

1

PF

2

FK

3

Text

4

Number

5

No

14

E-R diagram

Entity relationship diagrams are graphical representations of the link between the tables in a database.

They can be 1:1, 1:m or M:M

15

Draw

Draw the relationship that exists between City and Country

16

Dropdown

Question image
Write the code that will produce the output shown - Select ​
, ​


FROM ​


ORDER BY ​
;

17

Dropdown

Question image
Write the code that will produce the output shown -

Select ​ ​
, ​ ​


FROM ​ ​ ​


ORDER BY ​ ​ ;​

18

Dropdown

Question image
Write the code to produce to produce an alphabetical list of all cities names,
their countries and their population for all countries with
​ , ​ ​ ​
, ​


FROM ​ ​ ​ City ​ , ​ Country

WHERE ​ ​


19

media

SQL Queries

Write an SQL query to produce a list of all
cities names and populations for cities
with a population greater than 2,152,423
(the population of Paris)
Copy your working query into
the message chat
https://www.db-fiddle.com/f/qYUKpr2Rdv
3LSLAETbZRnH/5

20

Dropdown

Question image
Write the code to produce a list of all cities names and populations for cities

with a population greater than 2,152,423

(the population of Paris)

Select ​ ​
​ , ​ ​


FROM ​ ​ ​


WHERE ​


21

Dropdown

Question image
Write the code to find the names of all cities, and the
country they are in for all cities further north than Amsterdam

Select ​ ​


FROM ​ ​ ​ ​


WHERE ​ ​


N5 Computing Science

DATABASE REVISION - PART 2

Show answer

Auto Play

Slide 1 / 21

SLIDE