WorksheetsMySQL for PHP
Total questions: 15
Worksheet time: 8mins
What is the process of separating your data into tables and creating relationships among them?
Normalization
Simplification
Tabulation
Structuring
How many forms does normalization have?
(a)
What kind of index is used to identify the unique identity of a data set?
Foreign key
Primary key
Singular key
Index
I want to create an authors table with a foreign key that points to the book they authored. Where should I create that relationship?
Books Table
Authors table
Both
All answers are correct
Normally, how should we create the on delete and on update premise in a foreign key relationship?
RESTRICT
SET DEFAULT
SET NULL
CASCADE
I want to store information about my employees. What should the primary key be?
FirstName
EmployeeID
FirstName + LastName
Age
What type of DB is MySQL?
Distributed
Relational
NoSQL
In the Cloud
What modifier should we use to add a column in SQL?
UPDATE
SELECT
ALTER
DELETE
A type of SQL data which contains text values.
NULL
VARCHAR
INTEGER
BOOLEAN
What does "SQL" stand for?
Structured Question Language
Structured Query Language
Simple Query Language
Simple Question Language
How do we select all rows for the "Designer" table?
SELECT * FROM Designer
SELECT [All] FROM Designer
SELECT Designer.*
SELECT FROM Designer
How can you change “Hansen” into “Nilsen” in the “LastName” column in the Persons table?
UPDATE Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’
MODIFY Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’
MODIFY Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’
UPDATE Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’
Find the names of these cities with temperature and condition whose condition is neither sunny nor cloudy.
SELECT city, temperature, condition FROM weather WHERE condition NOT IN (‘sunny’, ‘cloudy’)
SELECT city, temperature, condition FROM weather WHERE condition NOT BETWEEN (‘sunny’, ‘cloudy’)
SELECT city, temperature, condition FROM weather WHERE condition IN (‘sunny’, ‘cloudy’)
SELECT city, temperature, condition FROM weather WHERE condition BETWEEN (‘sunny’, ‘cloudy’);
A primary key can be NULL in the table? TRUE or FALSE
TRUE
FALSE
If you don’t specify ASC or DESC after a SQL ORDER BY clause, the following is used by default
ASC
DESC
There is no default value
None of the mentioned
