In MySQL, data in a database are often stored in one or more tables.
true
false
In MySQL, what is a table column called?
a record
an object
a field
a relation
Which of the following statements is correct?
A database is used to create a DBMS
A DBMS is used to create a database
A DBMS is the same as a database
A DBMS and a database are not related
MySQL is a database
If the following connection is used in your PHP statement, what is the password for the account? $conn = mysqli_connect('a', 'b', 'c');
a
b
c
no password
In MySQL, which of the following statement is used to create a database?
CREATE DATABASE schoolDB
CREATE DATABASE
CREATE schoolDB
DATABASE schoolDB
In MySQL, suppose an SQL statement is stored in a variable called $query and the connection is stored in $conn, how do you execute the statement?
mysqli_query($conn, $query);
mysqli_query($query, $conn);
mysqli_execute_query($conn, $query);
mysqli_execute_query($query, $conn);
In MySQL, before executing an SQL CREATE TABLE statement, what must be done?
You must know how many records are in the table
You must know the data for the table
You must select a foreign key
You must select a database to add the table
What is the primary key of the a table?
One or more fields that contain familiar values
One or more fields that can uniquely identify each record
One or more fields that have meanings to the end users
One or more fields that are key to the success of the table
In MySQL, before you can execute any SQL statement, you must ____________ to the database.
connect
find a table
use primary key of a table
know how many tables are related
In SQL, what does the following statement do? INSERT INTO abc (field1Name, field2Name) VALUES (field1Value, field2Value)
Insert two rows into a database called abc
Insert two rows into a table called abc
Insert one row into a database called abc
Insert one row into a table called abc
In SQL, what does the following statement do? SELECT * FROM student;
Select asterisk from a table called student
Select asterisk from a database called student
Select all rows and columns from a table called student
Select all rows and columns from a database called student
In SQL, what does the following statement do? UPDATE student SET studentGpa = 4.0 WHERE studentId = 4;
Set all students' GPA to 4.0
Set the student's GPA to 4.0 whose student ID is 4 in the student table
Set all student's GPA to 4.0 where possible
Set the student's GPA to 4.0 whose student ID is 4 in the student database
In SQL, what does the following statement do? DELETE FROM student;
Delete one row in a database called abc
Delete one row in a table called abc
Delete all rows in a database called abc
Delete all rows in a table called abc
In MySQL, after all the SQL statements are executed, you must ______ to the database.
thank
close the connection
save the data
exit
In PHP, why should you use mysqli_real_escape_string () function?
You will get the real string from the HTML form
The codes will run faster
The codes will be more secure
none of the above
In MySQL, if you add AUTO_INCREMENT attribute to a field of a table, ________________
the table will automatically increase in size
the field will automatically increase in size
MySQL will automatically add a unique integer to the field when a new record is inserted
MySQL will automatically add a new record to the table
Which of the following is NOT a data type in MySQL?
BOOLEAN
DECIMAL
VARCHAR
DATE
What is special about the following URL? Contentupdate.php?id=2
The browser requests a page called contentupdate.php which is second page
The browser requests a page called contentupdate.php and the page id is 2
The browser requests a page with the password of 2
The browser requests a page called contentupdate.php and passes an id value of 2 that the contentupdate.php page usually needs