Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

MySQL for PHP

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

What is the process of separating your data into tables and creating relationships among them?

a)

Normalization

b)

Simplification

c)

Tabulation

d)

Structuring

2.

How many forms does normalization have?

(a)  

3.

What kind of index is used to identify the unique identity of a data set?

a)

Foreign key

b)

Primary key

c)

Singular key

d)

Index

4.

I want to create an authors table with a foreign key that points to the book they authored. Where should I create that relationship?

a)

Books Table

b)

Authors table

c)

Both

d)

All answers are correct

5.

Normally, how should we create the on delete and on update premise in a foreign key relationship?

a)

RESTRICT

b)

SET DEFAULT

c)

SET NULL

d)

CASCADE

6.

I want to store information about my employees. What should the primary key be?

a)

FirstName

b)

EmployeeID

c)

FirstName + LastName

d)

Age

7.

What type of DB is MySQL?

a)

Distributed

b)

Relational

c)

NoSQL

d)

In the Cloud

8.

What modifier should we use to add a column in SQL?

a)

UPDATE

b)

SELECT

c)

ALTER

d)

DELETE

9.

A type of SQL data which contains text values.

a)

NULL

b)

VARCHAR

c)

INTEGER

d)

BOOLEAN

10.

What does "SQL" stand for?

a)

Structured Question Language

b)

Structured Query Language

c)

Simple Query Language

d)

Simple Question Language

11.

How do we select all rows for the "Designer" table?

a)

SELECT * FROM Designer

b)

SELECT [All] FROM Designer

c)

SELECT Designer.*

d)

SELECT FROM Designer

12.

How can you change “Hansen” into “Nilsen” in the “LastName” column in the Persons table?

a)

UPDATE Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’

b)

MODIFY Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’

c)

MODIFY Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’

d)

UPDATE Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’

13.

Find the names of these cities with temperature and condition whose condition is neither sunny nor cloudy.

a)

SELECT city, temperature, condition FROM weather WHERE condition NOT IN (‘sunny’, ‘cloudy’)

b)

SELECT city, temperature, condition FROM weather WHERE condition NOT BETWEEN (‘sunny’, ‘cloudy’)

c)

SELECT city, temperature, condition FROM weather WHERE condition IN (‘sunny’, ‘cloudy’)

d)

SELECT city, temperature, condition FROM weather WHERE condition BETWEEN (‘sunny’, ‘cloudy’);

14.

A primary key can be NULL in the table? TRUE or FALSE

a)

TRUE

b)

FALSE

15.

If you don’t specify ASC or DESC after a SQL ORDER BY clause, the following is used by default

a)

ASC

b)

DESC

c)

There is no default value

d)

None of the mentioned