Quiz
Chapter 7: MySQL
Crie uma conta grátis para terminar este quiz
Salve seu progresso e veja sua nota final.
Já tem uma conta? Inicie sessão
Perguntas do quiz (19)
1In MySQL, data in a database are often stored in one or more tables.
- Atrue
- Bfalse
2In MySQL, what is a table column called?
- Aa record
- Ban object
- Ca field
- Da relation
3Which of the following statements is correct?
- AA database is used to create a DBMS
- BA DBMS is used to create a database
- CA DBMS is the same as a database
- DA DBMS and a database are not related
4MySQL is a database
- Atrue
- Bfalse
5If the following connection is used in your PHP statement, what is the password for the account?
$conn = mysqli_connect('a', 'b', 'c');- Aa
- Bb
- Cc
- Dno password
6In MySQL, which of the following statement is used to create a database?
- ACREATE DATABASE schoolDB
- BCREATE DATABASE
- CCREATE schoolDB
- DDATABASE schoolDB
7In 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?
- Amysqli_query($conn, $query);
- Bmysqli_query($query, $conn);
- Cmysqli_execute_query($conn, $query);
- Dmysqli_execute_query($query, $conn);
8In MySQL, before executing an SQL CREATE TABLE statement, what must be done?
- AYou must know how many records are in the table
- BYou must know the data for the table
- CYou must select a foreign key
- DYou must select a database to add the table
9What is the primary key of the a table?
- AOne or more fields that contain familiar values
- BOne or more fields that can uniquely identify each record
- COne or more fields that have meanings to the end users
- DOne or more fields that are key to the success of the table
10In MySQL, before you can execute any SQL statement, you must ____________ to the database.
- Aconnect
- Bfind a table
- Cuse primary key of a table
- Dknow how many tables are related
11In SQL, what does the following statement do?
INSERT INTO abc (field1Name, field2Name) VALUES (field1Value, field2Value)- AInsert two rows into a database called abc
- BInsert two rows into a table called abc
- CInsert one row into a database called abc
- DInsert one row into a table called abc
12In SQL, what does the following statement do?
SELECT * FROM student;- ASelect asterisk from a table called student
- BSelect asterisk from a database called student
- CSelect all rows and columns from a table called student
- DSelect all rows and columns from a database called student
13In SQL, what does the following statement do?
UPDATE student SET studentGpa = 4.0 WHERE studentId = 4;- ASet all students' GPA to 4.0
- BSet the student's GPA to 4.0 whose student ID is 4 in the student table
- CSet all student's GPA to 4.0 where possible
- DSet the student's GPA to 4.0 whose student ID is 4 in the student database
14In SQL, what does the following statement do?
DELETE FROM student;- ADelete one row in a database called abc
- BDelete one row in a table called abc
- CDelete all rows in a database called abc
- DDelete all rows in a table called abc
15In MySQL, after all the SQL statements are executed, you must ______ to the database.
- Athank
- Bclose the connection
- Csave the data
- Dexit
16In PHP, why should you use mysqli_real_escape_string () function?
- AYou will get the real string from the HTML form
- BThe codes will run faster
- CThe codes will be more secure
- Dnone of the above
17In MySQL, if you add AUTO_INCREMENT attribute to a field of a table, ________________
- Athe table will automatically increase in size
- Bthe field will automatically increase in size
- CMySQL will automatically add a unique integer to the field when a new record is inserted
- DMySQL will automatically add a new record to the table
18Which of the following is NOT a data type in MySQL?
- ABOOLEAN
- BDECIMAL
- CVARCHAR
- DDATE
19What is special about the following URL?
Contentupdate.php?id=2- AThe browser requests a page called contentupdate.php which is second page
- BThe browser requests a page called contentupdate.php and the page id is 2
- CThe browser requests a page with the password of 2
- DThe browser requests a page called contentupdate.php and passes an id value of 2 that the contentupdate.php page usually needs
Informações
- Descrição
- Sanchez, L. (2017). Web Programming with HTML, CSS, Bootstrap, JavaScript, JQuery, PHP, and MySQL . CreateSpace Independent Publishing Platform.
- Autor
- Rebecca Walton
- Idioma
- English
- Visualizações
- 113
- Etiquetas
- Avaliação
- Ainda sem avaliações Avalie este quiz