Databases

πŸ“ PRACTICE QUESTIONS β€” Clean Version

Question 1 β€” Multiple Choice

'surname' is not an appropriate column to select as a primary key. Why?

β€’ A βœ… Primary keys need to contain unique values and multiple people might share the same surname

β€’ B surname is a good column for a primary key

β€’ C because it uses text and primary keys should be numbers

β€’ D some people may have very long surnames

Answer: A

Question 2 β€” True/False

A table can have only one primary key, although that key may be made up of more than one column.

β€’ βœ… True

β€’ False

Answer: True

Question 3 β€” Matching: Data Types

# Column Answer

1 phone_number VARCHAR / VARCHAR2

2 house_no VARCHAR / VARCHAR2

3 date_of_birth DATE

4 SALARY NUMBER(X,X)

5 no_of_staff NUMBER(X)

6 postcode VARCHAR / VARCHAR2

7 Registration Number VARCHAR / VARCHAR2

8 room_number NUMBER(X)

9 no_of_tickets NUMBER(X)

10 price NUMBER(X,X)

Question 4 β€” Fill in the Blank

What does DDL stand for?

Answer: Data Definition Language

Question 5 β€” Fill in the Blank

What does UDT stand for?

Answer: User Defined Type

Question 6 β€” Multiple Choice

What is a primary key in another table called?

β€’ A βœ… Foreign Key

β€’ B Functional Key

β€’ C Compound Key

β€’ D Surname

β€’ E student_id

Answer: A

Question 7 β€” Multiple Choice (Select 4)

Which are the 4 new UDTs we're covering in this module?

β€’ A βœ… Object Columns

β€’ B βœ… Object Tables

β€’ C βœ… VArrays

β€’ D βœ… Nested Tables

β€’ E Strings

β€’ F Bytes

β€’ G Primitive

β€’ H int

Answer: A, B, C, D

Question 8 β€” Multiple Choice

What type(s) of data is stored in a purely relational database?

β€’ A Simple single data

β€’ B Complex types

β€’ C βœ… varchar, number and date only

Answer: C

All formatted nicely for you! 😊 Ready for more? πŸ’›