database final (quiz 9-12)

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

True or False : PHP code can be executed "without" a server by opening a file directly (with "file://" in the address bar) from within a web browser?

false

For the table... people(person_id,first_name,last_name) ...which columns will be shown when executing the following SQL statement... SELECT * FROM people;

"person_id", "first_name" and "last_name"

A Cartesian product is also called...

...a Cross Join

With the UNION SQL statement all data sets must have...

...the same number of columns. ...columns of compatible data types.

A "scalar" subquery should return "exactly" how many "columns" and "rows" of data?

1

given first 2 tables, what SQL statement gives the 3rd table? PEOPLE PERSON_ID NAME OFFICE_ID 1 Jane 1 2 John 1 3 Bob 4 Frank 3 OFFICES OFFICE_ID ROOM 1 100 2 200 3 300 ------------------------ NAME ROOM Jane 100 John 100 Bob Frank 300

select NAME, ROOM from PEOPLE left outer join OFFICES where PEOPLE.OFFICE_ID = OFFICES.OFFICE_ID;

Which of the following are equivalent to the following (choose all that apply)? select T_A.ID from T_A inner join T_B on T_A.ID = T_B.ID;

select T_A.ID from T_A, T_B where T_A.ID = T_B.ID; select T_A.ID from T_A inner join T_B using(ID); select T_A.ID from T_A natural join T_B; select T_A.ID from T_A join T_B on T_A.ID = T_B.ID;

All lower case letters in the english language exist in the "alphabet" table as a char data type. Which of the following will guarantee to output a list of letters in the alphabet sorted from "z" through "a"

select letter from alphabet order by letter desc

Which of the following SQL statements is syntactically correct?

select price from books where title='data'

True or False : In an HTML file, whitespace (such as spaces, tabs and return characters) are ignored when rendered in a browser.

true

True or False?...A subquery may be used as a table replacement within a JOIN SQL statement.

true

For the following SQL statement... select title from books where title like 'not%'; ...which "may" be possible values return assuming they exist as a "title" the "books" table.

"nothing" "not" "NOT"

The Cartesian product of one table with 5 rows and another table with 4 tables will result in a output table of how many rows?

20

Which value is returned from the following SQL statement..... select ( 1 + 5 x 2 - ( 2 x 1 ));

9

Which of the following is the "most" correct?

<!DOCTYPE html> <html> <head> <title> This is a Hello World page. </title> </head> <body> <p>Hello World</p> </body> </html>

Which PHP code below will output which of the following? (Choose all that apply) 1 1 2 3 5

<?php $results=array( 1, 1, 2, 3, 5); if ($row=current($results)) { echo $row. "</br>"; while ($row=next($results)) { echo $row. "</br>"; } } ?> ---------------------- <?php $results=array( 1, 1, 2, 3, 5); while ($row=current($results)) { echo $row. "</br>"; next($results); } ?> ---------------------------- <?php $results=array( 1, 1, 2, 3, 5); foreach($results as $row) { echo $row. "</br>"; } ?> ----------------------------- <?php $results=array( 1, 1, 2, 3, 5); for($row=current($results); $row; $row=next($results)){ echo $row. "</br>"; } ?>

Which of the following will correctly print "Intro to Databases" when included within a ".php" file?

<?php echo "Intro to Databases"; ?>

To create a click-able link from one web page to another, use which HTML element?

<a></a>

Which of the following would be the "best" element to use to display a main header on an HTML webpage?

<h1></h1>

Which HTML would produce the following table? R1C1 R1C2 R2C1 R2C2 R3C1 R3C2

<table border=1> <tr> <td>R1C1</td> <td>R1C2</td> </tr> <tr> <td>R2C1</td> <td>R2C2</td> </tr> ​​​​​​​ <tr> <td>R3C1</td> <td>R3C2</td> </tr> </table>

An Equi-Join has Join conditions with which operators (choose all that apply)...

=

Which clause filters rows after a GROUP BY operation?

HAVING

What will the following PHP code output? <?php $row = array( "peopleID" => "1", "name" => "Jane", "age" => 15, ); echo $row["name"]." is ".$row["age"]." year(s) old."; ?>

Jane is 15 year(s) old?

Which following MySQL SQL clauses will cause at most 5 rows to be returned?

LIMIT 5

What are problems with the following PHP code? (choose all that apply) table=="Jane" echo table

Lines are not terminated by a semicolon, ";" The assignment operator is "=" not "==" Variable names need to be prepended with a "$" character

PEOPLE PERSON_ID NAME SALARY 1 Jane 50000 2 John 50000 3 Bob 75000 4 Frank 100000 Which of the following is the out of the SQL statement : select NAME from PEOPLE where SALARY > (select AVG(SALARY) from PEOPLE);

NAME Bob Frank

To label and reference a column or table name WITHIN an sql by an different name use an

alias

When including the same table twice in a JOIN statement, what must be used to differentiate the table occurrences?

aliases

Which aggregate function will return the number of rows in a table?

count

What syntax should be added to an SQL select statement to only return unique rows for the columns requested?

distinct


संबंधित स्टडी सेट्स

Frequently Missed Questions for Producer Licensing Exam

View Set

Chapter 22 Check your understandings

View Set

Diuretic/ Fluid and Electrolyte Practice Questions- Pharmacology I

View Set

Project Management Cumulative Final

View Set

Unit 20. Vocab. F. Match to make sentences.

View Set

Managerial Chapter AC 210 Exam 3

View Set