Pregunta 1
Pregunta
In MySQL, data in a database are often stored in one or more tables.
Pregunta 2
Pregunta
In MySQL, what is a table column called?
Respuesta
-
a record
-
an object
-
a field
-
a relation
Pregunta 3
Pregunta
Which of the following statements is correct?
Respuesta
-
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
Pregunta 4
Pregunta
MySQL is a database
Pregunta 5
Pregunta
If the following connection is used in your PHP statement, what is the password for the account?
$conn = mysqli_connect('a', 'b', 'c');
Pregunta 6
Pregunta
In MySQL, which of the following statement is used to create a database?
Respuesta
-
CREATE DATABASE schoolDB
-
CREATE DATABASE
-
CREATE schoolDB
-
DATABASE schoolDB
Pregunta 7
Pregunta
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?
Respuesta
-
mysqli_query($conn, $query);
-
mysqli_query($query, $conn);
-
mysqli_execute_query($conn, $query);
-
mysqli_execute_query($query, $conn);
Pregunta 8
Pregunta
In MySQL, before executing an SQL CREATE TABLE statement, what must be done?
Respuesta
-
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
Pregunta 9
Pregunta
What is the primary key of the a table?
Respuesta
-
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
Pregunta 10
Pregunta
In MySQL, before you can execute any SQL statement, you must ____________ to the database.
Pregunta 11
Pregunta
In SQL, what does the following statement do?
INSERT INTO abc (field1Name, field2Name) VALUES (field1Value, field2Value)
Respuesta
-
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
Pregunta 12
Pregunta
In SQL, what does the following statement do?
SELECT * FROM student;
Respuesta
-
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
Pregunta 13
Pregunta
In SQL, what does the following statement do?
UPDATE student SET studentGpa = 4.0 WHERE studentId = 4;
Respuesta
-
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
Pregunta 14
Pregunta
In SQL, what does the following statement do?
DELETE FROM student;
Respuesta
-
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
Pregunta 15
Pregunta
In MySQL, after all the SQL statements are executed, you must ______ to the database.
Respuesta
-
thank
-
close the connection
-
save the data
-
exit
Pregunta 16
Pregunta
In PHP, why should you use mysqli_real_escape_string () function?
Respuesta
-
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
Pregunta 17
Pregunta
In MySQL, if you add AUTO_INCREMENT attribute to a field of a table, ________________
Respuesta
-
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
Pregunta 18
Pregunta
Which of the following is NOT a data type in MySQL?
Respuesta
-
BOOLEAN
-
DECIMAL
-
VARCHAR
-
DATE
Pregunta 19
Pregunta
What is special about the following URL?
Contentupdate.php?id=2
Respuesta
-
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