Deck 7: Working With Databases and Mysql
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/83
Play
Full screen (f)
Deck 7: Working With Databases and Mysql
1
A related table is the main table in a relationship that is referenced by another table.
False
2
Most database management systems can import each other's file formats, and they can also read directly each other's files.
False
3
There are four basic types of relationships within a relational database.
False
4
Each row in a database is called a record.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
5
Any information that can be organized into ordered collection of data can be considered a database.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
6
One-to-one relationships allow you to make the information in one of the tables confidential and accessible only by certain individuals.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
7
Primary and foreign keys are the only pieces of information in a relational database table that should be duplicated.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
8
Database management systems can run on only a single platform.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
9
A foreign key is a type of index, which identifies records in a database to make retrievals and sorting faster.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
10
You create one-to-many relationships when you want to break information into multiple, logical sets.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
11
MySQL is part of PHP.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
12
Most relational database systems cannot work directly with many-to-many relationships.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
13
MySQL is a commercial product and is not free.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
14
A common use of Web pages is to gather information that is stored in a database on a client PC.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
15
When accessing databases with PHP, you must use a data manipulation language.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
16
SQL stands for sequential query language.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
17
Relational databases are preferred solutions for large and complex collections of information.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
18
Primary and foreign keys link records across multiple tables in a relational database.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
19
You should always use direct database access functionality if it is available in PHP.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
20
For simple collections of information, flat-file databases are usually adequate.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
21
You can edit commands entered previously in the MySQL Monitor.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
22
The "Test" database is automatically selected when you log into MySQL.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
23
The WHERE keyword specifies the conditions that must be met for records to be returned from a query.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
24
The ___ keyword is used with the ALTER TABLE statement to rename a column in a table.
A) RENAME
B) MODIFY
C) CHANGE
D) REPLACE
A) RENAME
B) MODIFY
C) CHANGE
D) REPLACE
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
25
To keep your database from growing too large, you should choose the smallest data type possible for each field.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
26
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
B) CHAR
C) CONTENT
D) VARCHAR
A) TEXT
B) CHAR
C) CONTENT
D) VARCHAR
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
27
What privilege allows the user to select records?
A) CREATE
B) ALTER
C) INDEX
D) SELECT
A) CREATE
B) ALTER
C) INDEX
D) SELECT
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
28
____ reduces the size of a database and makes the data easier to work with.
A) The primary key
B) The foreign key
C) The child key
D) Normalization
A) The primary key
B) The foreign key
C) The child key
D) Normalization
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
29
MySQL Monitor is a command-line program for manipulating MySQL databases.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
30
Apache, PHP, and MySQL are all examples of open-source software.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
31
To delete a database, you must execute the ____ DATABASE command.
A) DELETE
B) REMOVE
C) DROP
D) EXIT
A) DELETE
B) REMOVE
C) DROP
D) EXIT
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
32
To remove a column from an existing table, use the ___ keyword with the ALTER TABLE statement.
A) REMOVE
B) DELETE
C) DROP
D) CANCEL
A) REMOVE
B) DELETE
C) DROP
D) CANCEL
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
33
When you create a new database, the new database automatically becomes the active database.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
34
The ___ keyword is used with the ALTER TABLE statement to rename a table.
A) RENAME
B) MODIFY
C) CHANGE
D) REPLACE
A) RENAME
B) MODIFY
C) CHANGE
D) REPLACE
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
35
The INSERT keyword determines the table into which records should be inserted.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
36
To make a specific database active, you must execute the ____ database statement.
A) CHANGE
B) USE
C) SWITCH
D) SELECT
A) CHANGE
B) USE
C) SWITCH
D) SELECT
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
37
You know you have successfully logged into MySQL when you see the mysql> prompt.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
38
You can use the ____ statement to display how a mysql table is structured.
A) DESCRIBE
B) DISPLAY
C) SHOW
D) LIST
A) DESCRIBE
B) DISPLAY
C) SHOW
D) LIST
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
39
MySQL assigns permissions to specify which actions and operations a user can perform with a table or database.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
40
To modify the structure of a table, you use the ____ TABLE statement.
A) MODIFY
B) ALTER
C) CHANGE
D) UPDATE
A) MODIFY
B) ALTER
C) CHANGE
D) UPDATE
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
41
The ____ keyword specifies the name of the table that needs to be modified when updating records.
A) SELECT
B) MODIFY
C) UPDATE
D) CHANGE
A) SELECT
B) MODIFY
C) UPDATE
D) CHANGE
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
42
____________________ are the individual categories of information stored in a record.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
43
A. ____________________ database stores information in a single table.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
44
Use the ____ statement to add multiple records from an external file to a database table.
A) INSERT_RECORDS
B) ADD_RECORDS
C) INSERT_DATA
D) LOAD_DATA
A) INSERT_RECORDS
B) ADD_RECORDS
C) INSERT_DATA
D) LOAD_DATA
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
45
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
B) BLANK
C) VOID
D) NO VALUE
A) NULL
B) BLANK
C) VOID
D) NO VALUE
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
46
phpMyAdmin provides a convenient method of transferring files from the development server to the production server using the _____ process.
A) download/upload
B) source/destination
C) browse/select
D) export/import
A) download/upload
B) source/destination
C) browse/select
D) export/import
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
47
You use the ___ statement to retrieve records from a table.
A) RETRIEVE
B) GET
C) SELECT
D) CHOOSE
A) RETRIEVE
B) GET
C) SELECT
D) CHOOSE
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
48
A ____________________ in a database is a single complete set of related information.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
49
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
B) DESC
C) A-Z
D) Z-A
A) REVERSE
B) DESC
C) A-Z
D) Z-A
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
50
The ____ portion of the SELECT statement determines which fields to retrieve from a table.
A) attribute
B) criteria
C) command
D) select
A) attribute
B) criteria
C) command
D) select
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
51
You use a ____ statement to create user accounts and assign privileges.
A) GIVE
B) GRANT
C) ASSIGN
D) PROVIDE
A) GIVE
B) GRANT
C) ASSIGN
D) PROVIDE
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
52
You must be logged in with the ____ account or have sufficient privileges to take away privileges from another user account.
A) base
B) global
C) root
D) source
A) base
B) global
C) root
D) source
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
53
____________________ databases consist of one or more related tables.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
54
To summarize data in a set of records, you use a family of functions called ____ functions.
A) aggregate
B) summary
C) statistical
D) group
A) aggregate
B) summary
C) statistical
D) group
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
55
A ____________________ is an ordered collection of information that a computer program can quickly access.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
56
Using the COUNT() aggregate function, you can eliminate duplicate values by using the keyword(s) ____.
A) UNIQUE
B) EXCLUSIVE
C) DISTINCT
D) UNIQUE_VALUES
A) UNIQUE
B) EXCLUSIVE
C) DISTINCT
D) UNIQUE_VALUES
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
57
The ____ statement is used to take away privileges from an existing user account for a specified table or database.
A) REMOVE
B) DROP
C) DELETE
D) REVOKE
A) REMOVE
B) DROP
C) DELETE
D) REVOKE
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
58
You can arrange query results from a SELECT statement using the keyword(s) ____.
A) SORT
B) SORT BY
C) ORDER
D) ORDER BY
A) SORT
B) SORT BY
C) ORDER
D) ORDER BY
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
59
You can specify which records to return from a database by using the ____ keyword.
A) CRITERIA
B) MATCH
C) LIKE
D) WHERE
A) CRITERIA
B) MATCH
C) LIKE
D) WHERE
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
60
By default, field values in an external text file that are being inserted in a table are separated by the ____ keyboard character.
A) comma
B) semicolon
C) space
D) tab
A) comma
B) semicolon
C) space
D) tab
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
61
Privileges can be granted at the following levels: column, table, database, and _____________________.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
62
When assigning privileges the _____________________ statement creates the user account if it does not exist and assigns the specified privileges.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
63
A ____________________ table creates a one-to-many relationship for each of the tables in many-to-many relationships.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
64
If you install a local version of MySQL, by default the mysql database and the ____________________ database, which is used to ensure that the database is working correctly, are installed.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
65
A ____________________ is a structured set of instructions and criteria for retrieving, adding, modifying, and deleting database information.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
66
A related table is also called a ____________________ table.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
67
You enter SQL commands in MySQL Monitor program at the ____________________ command prompt.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
68
A(n) _____________________ relationship exists in a relational database when one record in a primary table has many related records in a related table.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
69
SQL statements are composed of ____________________ that perform actions on a database.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
70
An application or collection of applications used to access and manage a database is called a ______________________________.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
71
MySQL assigns _____________________ to specify which actions and operations a user can perform with a table or database.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
72
You must be logged in as the ____________________ user or have DROP privileges to delete a database.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
73
Identifiers in MySQL are quoted using the ____________________ character.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
74
Tables in a relationship are connected using primary and foreign ____________________.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
75
A ____________________ is the structure of a database, including its tables, fields, and relationships.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
76
A(n) ____________________ is an alternate name that you can use to refer to a table or field in SQL statements.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
77
When viewing the structure of a database table, the ____________________ column shows the value that will be inserted automatically in the field if no value is specified.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
78
Breaking tables into multiple related tables to reduce redundant and duplicate information is called ____________________.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
79
When inserting records in a database table using the INSERT statement, if you omit the _____________________ list, the values you enter in the VALUES list must be in the same order in which you defined the table fields and each field in the table must have a value.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck
80
The MySQL built-in function, ____________________ returns the name of the currently active database.
Unlock Deck
Unlock for access to all 83 flashcards in this deck.
Unlock Deck
k this deck