PHP_Chapter07_ReviewQuestions

True/False
Indicate whether the statement is true or false.

____	1.	A common use of Web pages is to gather information that is stored in a database on a client PC.

____	2.	MySQL is a commercial product and is not free.

____	3.	MySQL is part of PHP.

____	4.	Any information that can be organized into ordered collection of data can be considered a database.

____	5.	Each row in a database is called a record.

____	6.	For simple collections of information, flat-file databases are usually adequate.

____	7.	Relational databases are preferred solutions for large and complex collections of information.

____	8.	A related table is the main table in a relationship that is referenced by another table.

____	9.	A foreign key is a type of index, which identifies records in a database to make retrievals and sorting faster.

____	10.	Primary and foreign keys link records across multiple tables in a relational database.

____	11.	There are four basic types of relationships within a relational database.

____	12.	You create one-to-many relationships when you want to break information into multiple, logical sets.

____	13.	One-to-one relationships allow you to make the information in one of the tables confidential and accessible only by certain individuals.

____	14.	Primary and foreign keys are the only pieces of information in a relational database table that should be duplicated.

____	15.	Most relational database systems cannot work directly with many-to-many relationships.

____	16.	Database management systems can run on only a single platform.

____	17.	SQL stands for sequential query language.

____	18.	When accessing databases with PHP, you must use a data manipulation language.

____	19.	Most database management systems can import each other’s file formats, and they can also read directly each other’s files.

____	20.	You should always use direct database access functionality if it is available in PHP.

____	21.	The WHERE keyword specifies the conditions that must be met for records to be returned from a query.

____	22.	The INSERT keyword determines the table into which records should be inserted.

____	23.	Apache, PHP, and MySQL are all examples of open-source software.

____	24.	MySQL Monitor is a command-line program for manipulating MySQL databases.

____	25.	You know you have successfully logged into MySQL when you see the mysql> prompt.

____	26.	You can edit commands entered previously in the MySQL Monitor.

____	27.	When you create a new database, the new database automatically becomes the active database.

____	28.	The “Test” database is automatically selected when you log into MySQL.

____	29.	To keep your database from growing too large, you should choose the smallest data type possible for each field.

____	30.	MySQL assigns permissions to specify which actions and operations a user can perform with a table or database.

Multiple Choice
Identify the choice that best completes the statement or answers the question.

____	31.	____ reduces the size of a database and makes the data easier to work with.
a.	The primary key	c.	The child key	
b.	The foreign key	d.	Normalization	

____	32.	To make a specific database active, you must execute the ____ database statement.
a.	CHANGE	c.	SWITCH	
b.	USE	d.	SELECT	

____	33.	To delete a database, you must execute the ____ DATABASE command.
a.	DELETE	c.	DROP	
b.	REMOVE	d.	EXIT	

____	34.	To store text in a field, you specify a data type of ____ because the amount of storage space allocated will depend on the number of characters in the field. 
a.	TEXT	c.	CONTENT	
b.	CHAR	d.	VARCHAR	

____	35.	You can use the ____ statement to display how a mysql table is structured.
a.	DESCRIBE	c.	SHOW	
b.	DISPLAY	d.	LIST	

____	36.	To modify the structure of a table, you use the ____ TABLE statement.
a.	MODIFY	c.	CHANGE	
b.	ALTER	d.	UPDATE	

____	37.	The ___ keyword is used with the ALTER TABLE statement to rename a column in a table.
a.	RENAME	c.	CHANGE	
b.	MODIFY	d.	REPLACE	

____	38.	The ___ keyword is used with the ALTER TABLE statement to rename a table.
a.	RENAME	c.	CHANGE	
b.	MODIFY	d.	REPLACE	

____	39.	To remove a column from an existing table, use the ___ keyword with the ALTER TABLE statement.
a.	REMOVE	c.	DROP	
b.	DELETE	d.	CANCEL	

____	40.	What privilege allows the user to select records?
a.	CREATE	c.	INDEX	
b.	ALTER	d.	SELECT	

____	41.	You use a ____ statement to create user accounts and assign privileges.
a.	GIVE	c.	ASSIGN	
b.	GRANT	d.	PROVIDE	

____	42.	The ____ statement is used to take away privileges from an existing user account for a specified table or database.
a.	REMOVE	c.	DELETE	
b.	DROP	d.	REVOKE	

____	43.	You must be logged in with the ____ account or have sufficient privileges to take away privileges from another user account.
a.	base	c.	root	
b.	global	d.	source	

____	44.	When inserting a new record in a table, you must specify the keyword(s) ____ for any fields in which you do not have a value.
a.	NULL	c.	VOID	
b.	BLANK	d.	NO VALUE	

____	45.	Use the ____ statement to add multiple records from an external file to a database table.
a.	INSERT_RECORDS	c.	INSERT_DATA	
b.	ADD_RECORDS	d.	LOAD_DATA	

____	46.	By default, field values in an external text file that are being inserted in a table are separated by the ____ keyboard character.
a.	comma	c.	space	
b.	semicolon	d.	tab	

____	47.	You use the ___ statement  to retrieve records from a table.
a.	RETRIEVE	c.	SELECT	
b.	GET	d.	CHOOSE	

____	48.	The ____ portion of the SELECT statement determines which fields to retrieve from a table.
a.	attribute	c.	command	
b.	criteria	d.	select	

____	49.	To summarize data in a set of records, you use a family of functions called ____ functions.
a.	aggregate	c.	statistical	
b.	summary	d.	group	

____	50.	Using the COUNT() aggregate function, you can eliminate duplicate values by using the keyword(s) ____.
a.	UNIQUE	c.	DISTINCT	
b.	EXCLUSIVE	d.	UNIQUE_VALUES	

____	51.	You can arrange query results from a SELECT statement using the keyword(s) ____.
a.	SORT	c.	ORDER	
b.	SORT BY	d.	ORDER BY	

____	52.	To perform a reverse sort on query results from a SELECT statement, add the ___ keyword after the name of the field by which you want to perform the sort.
a.	REVERSE	c.	A-Z	
b.	DESC	d.	Z-A	

____	53.	You can specify which records to return from a database by using the ____ keyword.
a.	CRITERIA	c.	LIKE	
b.	MATCH	d.	WHERE	

____	54.	The ____ keyword specifies the name of the table that needs to be modified when updating records.
a.	SELECT	c.	UPDATE	
b.	MODIFY	d.	CHANGE	

____	55.	phpMyAdmin provides a convenient method of transferring files from the development server to the production server using the _____ process.

a.	download/upload	c.	browse/select	
b.	source/destination	d.	export/import	

PHP_Chapter07_ReviewQuestions
Answer Section

TRUE/FALSE

	1.	REF:	381

	2.	REF:	381

	3.	REF:	381

	4.	REF:	381

	5.	REF:	381

	6.	REF:	382

	7.	REF:	382

	8.	REF:	382

	9.	REF:	383

	10.	REF:	383

	11.	REF:	383

	12.	REF:	383

	13.	REF:	383

	14.	REF:	384

	15.	REF:	387

	16.	REF:	388

	17.	REF:	389

	18.	REF:	389

	19.	REF:	390

	20.	REF:	390

	21.	REF:	391

	22.	REF:	391

	23.	REF:	392

	24.	REF:	392

	25.	REF:	393

	26.	REF:	395

	27.	REF:	399

	28.	REF:	400

	29.	REF:	404

	30.	REF:	408

MULTIPLE CHOICE

	31.	REF:	384

	32.	REF:	399

	33.	REF:	401

	34.	REF:	404

	35.	REF:	404

	36.	REF:	406

	37.	REF:	407

	38.	REF:	407

	39.	REF:	407

	40.	REF:	409

	41.	REF:	409

	42.	REF:	411

	43.	REF:	411

	44.	REF:	413

	45.	REF:	414

	46.	REF:	414

	47.	REF:	415

	48.	REF:	415

	49.	REF:	418

	50.	REF:	419

	51.	REF:	421

	52.	REF:	421

	53.	REF:	423

	54.	REF:	425

	55.	REF:	432