3380 midterm

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Variables in PHP begin with which of the following characters? & $ # *

$

How do you get information from a form that is submitted using the "get" method in PHP? it is read from the GET file $_GET[ ] stdout Request.QueryString Request.Form

$_GET[ ]

How do you create an array in PHP? $names = "Sally", "Erin", "Kate"; $names = array("Sally", "Erin", "Kate"); $names = array["Sally", "Erin", "Kate"];

$names = array("Sally", "Erin", "Kate");

Which character is used to indicate an end tag in HTML? * / ^ ?

/

Every HTML 5 document begins which of the following? <html> <meta> <!DOCTYPE html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<!DOCTYPE html>

A PHP block of code is surrounded by which of the following? <! !> <?php ?> <! > <php> </php>

<?php ?>

What is the correct HTML for creating a hyperlink? <a url="https://missouri.edu">Mizzou</a> <a name="https://missouri.edu">Mizzou</a> <a>https://missouri.edu</a> <a href="https://missouri.edu">Mizzou</a>

<a href="https://missouri.edu">Mizzou</a>

What is the correct HTML element for inserting a line break that puts the content following it on the next line in the content displayed by the browser. \n <br> <break> </n>

<br>

Choose the correct HTML element for the largest heading. <head> <heading> <h1> <h6>

<h1>

What is the correct HTML for making a text input field? <textfield> <textinput type="text"> <input type="textfield"> <input type="text">

<input type="text">

What is the correct HTML for making a text area? <textarea> <input type="textbox"> input type="textarea"> <ta>

<textarea>

Which tag is used to create a table row in an HTML table? <table row> <row> <tr> <th> <td>

<tr>

What does CRUD stand for in relation to data? Continuos, Readable, Uniform, Delimited Create, Read, Update, Delete Char, Rand, UInt, Decimal Cyclical Random Uniform Density

Create, Read, Update, Delete

Which SQL statement is used to delete data from a database? MODIFY REMOVE COLLAPSE DELETE

DELETE

Which of the following SQL statements remove all employees named John from the EMPLOYEE table. DELETE firstName = 'John' FROM Employee DELETE FROM Employee WHERE firstName = 'John' UPDATE Employee WHERE firstName = 'John' REMOVE ALL

DELETE FROM Employee WHERE firstName = 'John'

With SQL, how can you delete the records where the "Status" is "delivered" in the "Shipments" table? DELETE Status='delivered' FROM Shipments DELETE FROM Shipments WHERE Status = 'delivered' DELETE ROW Status='delivered' FROM Shipments

DELETE FROM Shipments WHERE Status = 'delivered'

Which statement is used to add a new row in a database table? INSERT INTO UPDATE TABLE INSERT ROW ADD ROW ADD TO CREATE RECORD

INSERT INTO

With SQL, how can you insert 97.9 as the "Temperature" in the "Environment" table? INSERT INTO Environment (Temperature) VALUES (97.9) INSERT INTO Environment (97.9) INTO Temperature INSERT (97.9) INTO Environment (Temperature)

INSERT INTO Environment (Temperature) VALUES (97.9)

With SQL, how can you return all the records from a table named "Articles" sorted descending by "PublishDate"? SELECT * FROM Articles ORDER BY PublishDate DESC SELECT * FROM Articles ORDER PublishDate DESC SELECT * FROM Articles SORT 'PublishDate' DESC SELECT * FROM Articles SORT BY 'PublishDate' DESC

SELECT * FROM Articles ORDER BY PublishDate DESC

With SQL, how do you select all the records from a table named "Employees" where the "Salary" is greater than 100000 and the "YearsOfService" is less than 5? SELECT Salary > 100000, YearsOfService < 5 FROM Employees SELECT * FROM Employees WHERE Salary > 100000 AND YearsOfService < 5 SELECT * FROM Employees WHERE Salary > 100000 OR YearsOfService < 5 SELECT FROM Employees * WHERE Salary > 100000, YearsOfService < 5

SELECT * FROM Employees WHERE Salary > 100000 AND YearsOfService < 5

With SQL, how do you select all the columns from a table named "Movies"? SELECT [all] FROM Movies SELECT Movies SELECT *.Movies SELECT Movies.* SELECT * FROM Movies

SELECT * FROM Movies

The table "News" contains a column called "title" that holds a string that is the title of a news story. With SQL, how do you select all the records from the table "News" where the title contains within it the string "scandal"? SELECT * FROM News WHERE title<>'scandal' SELECT [all] FROM News WHERE title LIKE 'scandal' SELECT [all] FROM News WHERE title='*scandal*' SELECT * FROM News WHERE title LIKE '%scandal%' SELECT * FROM News WHERE title LIKE 'scandal?' SELECT * FROM News WHERE title LIKE '_scandal_'

SELECT * FROM News WHERE title LIKE '%scandal%'

With SQL, how do you select all the records from a table named "Persons" where the "LastName" is alphabetically between (and including) "Martin" and "Pauli"? SELECT * FROM Persons WHERE LastName BETWEEN 'Martin' AND 'Pauli' SELECT LastName > 'Martin' AND LastName < 'Pauli' FROM Persons SELECT * FROM Persons WHERE LastName > 'Martin' AND LastName < 'Pauli'

SELECT * FROM Persons WHERE LastName BETWEEN 'Martin' AND 'Pauli'

With SQL, how can you return all the records from a table named "country" sorted ascending by "Population"? SELECT * FROM country SORT 'Population' ASC SELECT * FROM country SORT BY 'Population' ASC SELECT * FROM country ORDER Population ASC SELECT * FROM country ORDER BY Population ASC

SELECT * FROM country ORDER BY Population ASC

With SQL, how can you return all the records from a table named "tasks" sorted descending by "addDate"? SELECT * FROM tasks SORT addDate DESC SELECT * FROM tasks SORT BY addDate DESC SELECT * FROM tasks ORDER addDate DESC SELECT * FROM tasks ORDER BY addDate DESC

SELECT * FROM tasks ORDER BY addDate DESC

With SQL, how can you return the number of records in the "Products" table? SELECT COUNT(*) FROM Products SELECT LEN(*) FROM Products SELECT NO(*) FROM Products SELECT COLUMNS(*) FROM Products

SELECT COUNT(*) FROM Products

Which SQL statement is used to return only different values? "different values" means no duplicates. SELECT UNIQUE SELECT DISTINCT SELECT DIFFERENT

SELECT DISTINCT

With SQL, how do you select a column named "Population" from a table named "country"? EXTRACT Population FROM country SELECT Population IN country SELECT Population FROM country SELECT COLUMN Population FROM TABLE country

SELECT Population FROM country

A Unicode text file supports characters from different languages around the world. True False

True

A primary key may not contain NULLS. True False

True

The NOT NULL constraint enforces a column to not accept null values. True False

True

The OR operator displays a record if ANY conditions listed are true. The AND operator displays a record if ALL of the conditions listed are true. True False

True

The primary key is the column or set of columns used to uniquely identify the items in a table. A foreign key is used to uniquely identify the items in a different table, allowing join operations to happen. True False

True

Which SQL statement is used to update data in a database? MODIFY SAVE AS UPDATE SAVE CHANGE

UPDATE

How can you change "Martin" into "Martinez" in the "LastName" column in the Customer table for the customer with an "ID" of 204? MODIFY Persons SET LastName='Martinez' INTO LastName='Martin' FOR ID=204 UPDATE Persons SET LastName='Martinez' INTO LastName='Martin' LIMIT TO ID=204 MODIFY Persons SET LastName='Martinez' WHERE ID=204 UPDATE Persons SET LastName='Martinez' WHERE ID=204 MODIFY Persons SET LastName='Martinez' WHERE LastName='Martin' UPDATE Persons SET LastName='Martinez' WHERE LastName='Martin'

UPDATE Persons SET LastName='Martinez' WHERE ID=204

How can you change "Sam" into "Samantha" in the "firstName" column in the "Students" table for the student with an "pawprint" of "abc3xyz"? MODIFY Students SET firstName='Samantha' WHERE firstName='Sam' UPDATE Students SET firstName='Samantha' WHERE firstName='Sam' MODIFY Students SET firstName='Samantha' WHERE pawprint='abc3xyz' UPDATE Students SET firstName='Samantha' WHERE pawprint='abc3xyz' MODIFY Students SET firstName='Samantha' INTO firstName='Sam' FOR pawprint='abc3xyz' UPDATE Students SET firstName='Samantha' INTO firstName='Sam' LIMIT TO pawprint='abc3xyz'

UPDATE Students SET firstName='Samantha' WHERE pawprint='abc3xyz'

What is a service called that is offered by an electronic device to another electronic device by communicating with each other via the World Wide Web. The service uses HTTP (HyperText Transfer Protocol) for machine-to-machine communication. Cell Service Database Service Remote Procedure Call Web Service

Web Service

What is CSV data? contained SQL structural values comma separated values coded sequence values

comma separated values

What determines how the content on a web page is styled (the way it looks)? css json php xml

css

What does XML stand for? eXtended Markup Language eXtra Modern Link X-Markup Language eXtensible Markup Language eXample Markup Language

eXtensible Markup Language

A database schema contains the follow relation: Student(id, name, class, credits, gpa) Which attribute forms the primary key? id name class credits gpa

id

The SQL wildcards are ____ and ____ . question mark (?); asterisk (*) asterisk (*); percent sign (%) percent sign (%); underscore (_) underscore(_); question mark (?)

percent sign (%); underscore (_)

What is the organization of data as a blueprint of how the database is constructed along with constraints on the data called? format schema tuple

schema

When a web browser requests a PHP script from a web server and the PHP script prints strings to stdout (standard out), where do those strings ultimately get sent? the access log the error log a file the web browser

the web browser

In SQL, what is the default ordering of records using the ORDER BY clause? ASC (ascending order) DESC (descending order) STORED (stored order) RANDOM (random order)

ASC (ascending order)

In an SQL SELECT statement querying a single table, the asterisk (*) means which of the following? All records meeting the full criteria are to be returned. All records with even partial criteria met are to be returned. All columns of the table are to be returned. The names of the table columns are to be returned.

All columns of the table are to be returned.

How many tables may be included with a join? One Two Three All of the above.

All of the above.

Given: SELECT * FROM employee WHERE salary>10000 AND dept_id=101; Which of the following fields are displayed as output? salary, dept_id employee salary All the fields of employee relation.

All the fields of employee relation.

What happens if you omit the WHERE clause in an SQL DELETE statement? An error occurs. No records are deleted. All the rows in the table are deleted.

All the rows in the table are deleted.

What happens if you omit the WHERE clause in an SQL UPDATE statement? An error occurs. No data is changed. All the rows in the table are modified.

All the rows in the table are modified.

A PHP variable needs to be declared before assigning a value to it? True False

False

A table may not be joined to itself. True False

False

COUNT(*) returns the number of columns in a table. True False

False

Header content can be set in PHP after strings are sent to stdout (standard out) using print. True False

False

The DELETE statement is used to delete a table from the database. True False

False

When using the POST method, variables are displayed in the URL. True False

False

Windows and Unix line endings are the same in plain text files. True False

False

The basic data type char(n) is a _____ length character string and varchar(n) is _____ length character. Fixed, equal Equal, variable Fixed, variable Variable, equal Variable, fixed

Fixed, variable

What does HTML stand for? Hyper Text Markup Language Hyperlinks and Text Markup Language Home Tool Markup Language

Hyper Text Markup Language

Which SQL statement is used to add a new record to a table in a database? ADD NEW ADD RECORD INSERT NEW INSERT INTO

INSERT INTO

With SQL, how can you insert 0.25 as the "precipitation" in the "Weather" table? INSERT INTO Weather (precipitation) VALUES (0.25) INSERT INTO Weather (0.25) INTO precipitation INSERT (0.25) INTO Weather (precipitation) INSERT VALUE(0.25) INTO WEATHER AS precipitation

INSERT INTO Weather (precipitation) VALUES (0.25)

Where does the title belong in a properly formatted HTML 5 web page? In the body In the head In the DOCTYPE Above the head

In the head

What is an associative array in PHP? It is an array of values that are indexed. It is an array where keys are assigned values. It is a multidimensional array.

It is an array where keys are assigned values.

Given the following php script block, what is displayed in the browser? $array[0] = "mall"; $array[1] = "Kate"; $array[2] = 9; $array[3] = "brother"; $array[4] = "cup cakes"; $array[5] = "store"; $array[6] = "Linda"; echo "$array[1] went to the $array[0] to buy $array[2] $array[4] for her $array[3]."; Linda went to the mall to buy 9 cup cakes for her brother. Kate went to the store to buy 9 cup cakes for her brother. Linda went to the store to buy 9 cup cakes for her brother. Kate went to the mall to buy 9 cup cakes for her brother.

Kate went to the mall to buy 9 cup cakes for her brother.

Which operator is used to search for a specified pattern in a column? GET LIKE FROM

LIKE

Which of the following is used in MySQL to indicate that only a certain number of records (rows) should be returned from a query? GROUP LIMIT ORDER MAX MIN ROWS

LIMIT

Which of the following is used to sort the result set of a SQL query? SORT ORDER SORT BY ORDER BY

ORDER BY

Consider the following relations: customer(id, firstName, lastName, address, email) orders(id, customerID, orderDate, shipDate) Which SQL statement retrieves orders for the customer with a customer id of 1205 where the records only contain the order id, orderDate, shipDate, customer firstName, customer lastName, and customer email and the records are ordered by orderDate ascending? SELECT * FROM orders, customer WHERE customerID = customer.id AND customerID = 1205 ORDER BY orderDate ASC; SELECT id, orderDate, shipDate, firstName, lastName, email FROM orders INNER JOIN customer ON customerID = id WHERE customerID = 1205 ORDER BY orderDate ASC; SELECT orders.id, orders.orderDate, orders.shipDate, customer.firstName, customer.lastName, customer.email FROM orders INNER JOIN customer ON orders.customerID = customer.id WHERE orders.customerID = 1205 ORDER BY orders.orderDate ASC; SELECT LIMIT(orders.id, orders.orderDate, orders.shipDate, customer.firstName, customer.lastName, customer.email) FROM orders INNER JOIN customer ON orders.customerID = customer.id WHERE orders.customerID = 1205 ORDER BY orders.orderDate ASC;

SELECT orders.id, orders.orderDate, orders.shipDate, customer.firstName, customer.lastName, customer.email FROM orders INNER JOIN customer ON orders.customerID = customer.id WHERE orders.customerID = 1205 ORDER BY orders.orderDate ASC;

When an SQL statement has values placed in it that are SQL statements that can do harm to the data, this called what? Compromised-Key Attack Man-in-the-Middle Attack SQL Injection Attack Subquery

SQL Injection Attack

Which SQL statement is used to add, modify or drop columns in a database table? The ALTER TABLE statement. The UPDATE TABLE statement. The REPLACE TABLE statement. The CHANGE SCHEMA statement.

The ALTER TABLE statement.


Kaugnay na mga set ng pag-aaral

Language Conventions: Noun Clauses

View Set

digestive system BY: Lorelei Moll

View Set

Theory of comparative advantage (int trade)

View Set

Vocabulary Workshop Level B Units 1-6

View Set

DIG3521 Sprints 12 & 13 & 14 & 15

View Set