Chapter 7: MySQL

Beschreibung

Sanchez, L. (2017). Web Programming with HTML, CSS, Bootstrap, JavaScript, JQuery, PHP, and MySQL . CreateSpace Independent Publishing Platform.
Rebecca Walton
Quiz von Rebecca Walton, aktualisiert more than 1 year ago
Rebecca Walton
Erstellt von Rebecca Walton vor fast 5 Jahre
82
0

Zusammenfassung der Ressource

Frage 1

Frage
In MySQL, data in a database are often stored in one or more tables.
Antworten
  • true
  • false

Frage 2

Frage
In MySQL, what is a table column called?
Antworten
  • a record
  • an object
  • a field
  • a relation

Frage 3

Frage
Which of the following statements is correct?
Antworten
  • 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

Frage 4

Frage
MySQL is a database
Antworten
  • true
  • false

Frage 5

Frage
If the following connection is used in your PHP statement, what is the password for the account? $conn = mysqli_connect('a', 'b', 'c');
Antworten
  • a
  • b
  • c
  • no password

Frage 6

Frage
In MySQL, which of the following statement is used to create a database?
Antworten
  • CREATE DATABASE schoolDB
  • CREATE DATABASE
  • CREATE schoolDB
  • DATABASE schoolDB

Frage 7

Frage
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?
Antworten
  • mysqli_query($conn, $query);
  • mysqli_query($query, $conn);
  • mysqli_execute_query($conn, $query);
  • mysqli_execute_query($query, $conn);

Frage 8

Frage
In MySQL, before executing an SQL CREATE TABLE statement, what must be done?
Antworten
  • 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

Frage 9

Frage
What is the primary key of the a table?
Antworten
  • 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

Frage 10

Frage
In MySQL, before you can execute any SQL statement, you must ____________ to the database.
Antworten
  • connect
  • find a table
  • use primary key of a table
  • know how many tables are related

Frage 11

Frage
In SQL, what does the following statement do? INSERT INTO abc (field1Name, field2Name) VALUES (field1Value, field2Value)
Antworten
  • 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

Frage 12

Frage
In SQL, what does the following statement do? SELECT * FROM student;
Antworten
  • 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

Frage 13

Frage
In SQL, what does the following statement do? UPDATE student SET studentGpa = 4.0 WHERE studentId = 4;
Antworten
  • 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

Frage 14

Frage
In SQL, what does the following statement do? DELETE FROM student;
Antworten
  • 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

Frage 15

Frage
In MySQL, after all the SQL statements are executed, you must ______ to the database.
Antworten
  • thank
  • close the connection
  • save the data
  • exit

Frage 16

Frage
In PHP, why should you use mysqli_real_escape_string () function?
Antworten
  • 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

Frage 17

Frage
In MySQL, if you add AUTO_INCREMENT attribute to a field of a table, ________________
Antworten
  • 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

Frage 18

Frage
Which of the following is NOT a data type in MySQL?
Antworten
  • BOOLEAN
  • DECIMAL
  • VARCHAR
  • DATE

Frage 19

Frage
What is special about the following URL? Contentupdate.php?id=2
Antworten
  • 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
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

Computing Hardware - CPU and Memory
ollietablet123
SFDC App Builder 2
Parker Webb-Mitchell
Data Types
Jacob Sedore
Intake7 BIM L1
Stanley Chia
Software Processes
Nurul Aiman Abdu
Design Patterns
Erica Solum
CCNA Answers – CCNA Exam
Abdul Demir
Abstraction
Shannon Anderson-Rush
Spyware
Sam2
HTTPS explained with Carrier Pigeons
Shannon Anderson-Rush
Data Analytics
anelvr