Final Database Management
Which of the following statements is correct? a. In a flat-file environment, data is partitioned into several disjointed systems, lists, and files. b. User data cannot be combined and shared among authorized users. c. Database users should each work on their own copy of the database. d. Controlling redundancy is easier in a flat file than in a database.
a. In a flat-file environment, data is partitioned into several disjointed systems, lists, and files.
In Access SQL, which operator do you use in the WHERE clause when you want to include a wildcard in the criterion? a. LIKE b. AS c. BETWEEN d. UNION
a. LIKE
How can you improve your SQL skills? a. Practice using online SQL tutorials. b. Create Access queries exclusively in Query Design View. c. Take a course in JavaScript. d. Use a search engine to conduct searches for general information.
a. Practice using online SQL tutorials.
Which statement creates a table named PostalCodes with a five-character PostalCode text field and a two-character Abbrev text field? a. CREATE TABLE PostalCodes (PostalCode TEXT, Abbrev TEXT); b. CREATE TABLE PostalCodes (PostalCode (TEXT 5), Abbrev (TEXT 2)); c. CREATE TABLE PostalCodes (PostalCode TEXT (5), Abbrev TEXT (2)); d. CREATE TABLE (PostalCode TEXT (5), Abbrev TEXT (2));
c. CREATE TABLE PostalCodes (PostalCode TEXT (5), Abbrev TEXT (2));
In the Sports Physical Therapy database, how can you determine which therapist provided the longest amount of time to complete a particular service? a. In the Therapies table, find the highest value in the UnitOfTime column. b. In the Session table, find the highest value in the LengthOfSession column c. In the Therapies table, find the highest value in the TherapyCode column. d. In the Session table, find the highest value in the SessionNum column.
b. In the Session table, find the highest value in the LengthOfSession column
Which of the following expressions in Access Query Design View creates a computed field named MonthlySalary using a value from the Salary field? a. MonthlySalary = [Salary / 12] b. MonthlySalary: [Salary] / 12 c. Salary / 12 = [MonthlySalary] d. MonthlySalary: "Salary" / 12
b. MonthlySalary: [Salary] / 12
Based on the following table, which relational algebra command creates a new table named CustState containing the fields CustomerNum and State? Customer (CustomerNum, CustomerName, Street, City, State, PostalCode) a. JOIN Customer WITH (CustomerNum, State) GIVING CustState b. PROJECT Customer OVER (CustomerNum, State) GIVING CustState c. SELECT Customer OVER (CustomerNum, State) GIVING CustState d. MAKE-TABLE CustState FROM Customer WITH (CustomerNum, State)
b. PROJECT Customer OVER (CustomerNum, State) GIVING CustState
Which query will return the number of rows from the Customers table where the State field is 'AZ'? a. SELECT FROM Customers WHERE State='AZ' COUNT(*); b. SELECT COUNT(*) FROM Customers WHERE State='AZ'; c. SELECT FROM Customers COUNT(*) WHERE State='AZ'; d. SELECT COUNT(*) WHERE State='AZ' FROM Customers;
b. SELECT COUNT(*) FROM Customers WHERE State='AZ';
Based on the SQL shown, which query finds how many items are in the TOY category? Items (ItemNum, Description, OnHand, Category, Storehouse, Price ) a. SELECT SUM(*) FROM Items WHERE Category='TOY' ; b. SELECT COUNT(*) FROM Items WHERE Category='TOY' ; c. SELECT COUNT FROM Items WHERE Category='TOY' ; d. SELECT COUNT* FROM Items WHERE Category='TOY' ;
b. SELECT COUNT(*) FROM Items WHERE Category='TOY' ;
Which of the following is currently considered the most sought-after language for programmers? a. Visual Basic b. SQL c. COBOL d. CSS
b. SQL
Why is SQL a highly sought-after language for programmers? a. SQL is difficult to learn because it does not use English-like commands. b. SQL is a universal language for selecting and maintaining data in a relational database. c. SQL provides a foundation for learning about artificial intelligence. d. SQL is a popular language for manipulating graphical objects.
b. SQL is a universal language for selecting and maintaining data in a relational database.
Which of the following is a popular relational database management system? a. Apache b. SQL server c. Rails d. PHP
b. SQL server
In the Sports Physical Therapy database, which attribute uniquely identifies each therapy session? a. TherapyCode b. SessionNum c. SessionType d. PatientNum
b. SessionNum
What would you most likely use in SQL to perform calculations on groups of records? a. Boolean operators b. aggregate functions c. data definition language d. lookup functions
b. aggregate functions
In Access a (n) _____ query permanently removes all the records from the selected table(s) that satisfy the criteria entered in the query. a. update b. delete c. make-table d. parameter
b. delete
A good name for an Access table might be tbl!Student. a. true b. false
b. false
A relational database handles entities, attributes, and relationships by storing each entity in its own row. a. true b. false
b. false
An attribute is known as a row in most databases. a. true b. false
b. false
Fields appear in alphabetical order based on fieldname in the query results of a SELECT clause. a.true b. false
b. false
SQL uses an on-screen form to create tables, update tables, and retrieve data from tables. a. true b. false
b. false
To select data from more than one table at the same time, you need to perform a make-table query. a. true b. false
b. false
When you connect query conditions using the AND operator, only one of the conditions must be true for a particular record to be selected. a. true b. false
b. false
Which of the following are screen objects used to maintain, view, and print data from a database? a. fields b. forms c. data files d. entities
b. forms
Which type of rule prevents the creation of orphan records? a. redundancy constraint b. integrity constraint c. conflict requirement d. security requirement
b. integrity constraint
In the Sports Physical Therapy database, you determine the description of the therapy a patient is receiving by finding the TherapyCode for the patient in the Session table, and then _____. a. looking up the TherapyCode in the Patient table b. looking up the TherapyCode in the Therapies table c. looking up the SessionNum in the Session table d. looking up the TherapyCode in the Therapist table
b. looking up the TherapyCode in the Therapies table
In Access, if you want to be able to enter different criteria each time you run a query, create a(n) _____ query. a. update b. parameter c. run-time d. aggregate
b. parameter
Which term can be described as the duplication of data and storing data in multiple locations? a. data independence. b. redundancy c. data integrity d. security
b. redundancy
A database that enforces _____ prevents users from creating orphan records. a. primary key creation b. referential integrity c. data redundancy d. data security
b. referential integrity
The Clients table contains 12 records with three different values in the PostalCode field. If you create a query that groups the records based on the PostalCode field, how many records do the results contain? a. 12 b. 36 c. 3 d. 4
c. 3
If you use ____________________ criteria, each criterion must be true for a record to be selected . a. OR b. aggregate c. AND d. BOTH
c. AND
In the Pitt Fitness database, which of the following attributes belongs in the Customers table? a. ClassName. b. ReservationID c. BirthDate d. InstructorID
c. BirthDate
In Access Query Design View, how do you add the Total row to the query design grid? a. Click the Totals button on the Query Tools Design tab. b. Click the Group by arrow in the Criteria row, and then click Total. c. Click the Grouping button on the Query Tools Design tab. d. Drag the Total field to the query design grid.
a. Click the Totals button on the Query Tools Design tab.
The Access query design grid contains the ProductID, ProductName, and Rating fields. How can you omit the Rating field from the query results but use it to set a criterion for the query? a. Delete the Rating field from the query design grid b. Add a second copy of the Rating field to the query design grid. c. Clear the checkmark from the Rating field's Show check box. d. Change the query to an update query
c. Clear the checkmark from the Rating field's Show check box.
Which of the following will be an entity in the JC Consulting database? a. Client name b. Estimate c. Clients d. Project description
c. Clients
What SQL keyword do you use in a query that saves the results of the query as a table? a. UPDATE b. INSERT c. INTO d. DELETE
c. INTO
Which of the following is a popular software stack? a. SQL Server b. Oracle c. LAMP d. DAMP
c. LAMP
For a one-to-many relationship in the Access Relationships window, how can you tell which table is the "many" table? a. The one symbol identifies the "many" table. b. The "many" table always appears to the left of the "one" table. c. The "many" table always appears below the "one" table. d. An infinity symbol identifies the "many" table.
d. An infinity symbol identifies the "many" table.
If you use an aggregate function in a query to determine the average values in a Bonus field, what default field name does Access use for the column with the calculations? a. Bonus b. Avarage Bonus c. BonusAvs d. AvgOfBonus
d. AvgOfBonus
________________ describes the large volume of data produced by every digital process, system, sensor, mobile device, and even social media exchange. a. Metadata b. Database management system c. software stack d. Big data
d. Big data
In the Pitt Fitness database, which attribute uniquely identifies each class? a. ClassName b. ClassLocation c. ClassType d. ClassID
d. ClassID
In the Pitt Fitness database, which table relates classes and instructors? a. Reservations. b. Customers c. CustomerReservations. d. ClassInstructors.
d. ClassInstructors.
What type of software programs are Access, Oracle, DB2, MySQL, and SQL Server? a. E-R diagrams b. DBAs c. data files d. DBMSs
d. DBMSs
Which of the following is a drawback of flat files? a. Several users can access the same information at the same time. b. Flat files ensure that users enter data in a consistent format. c. Data is organized to meet all integrity constraints. d. Data partitioned into several separate files can be difficult to summarize.
d. Data partitioned into several separate files can be difficult to summarize.
In Access Query Design View, which of the following expressions calculates the number of days between today's date and a field named DueDate? a. Date - DueDate b. Today - [DueDate] c. Day() - [DueDate] d. Date() - [DueDate]
d. Date() - [DueDate]
Which of the following is a technique for increasing the speed of Access queries? a. Use Query Design View to join tables. b. Type field names directly into the query design grid. c. Include fields considered optional for the query. d. Delete field lists that are not needed for the query.
d. Delete field lists that are not needed for the query.
In a query that uses an aggregate function, which SQL clause do you use to include criteria that limits the number of records selected for the query? a. RESTRICTING b. GROUPING c. JOINING d. HAVING
d. HAVING
In the Pitt Fitness database, how can you determine the number of classes offered on Tuesday? a. In the Classes table, count the occurrences of Tuesday in the Time column. b. In the ClassInstructors table, count the occurrences of Tuesday in the DayOfWeek column. c. In the Classes table, count the entries in the Tuesday column. d. In the Classes table, count the occurrences of Tuesday in the Day column.
d. In the Classes table, count the occurrences of Tuesday in the Day column.
What happens when you run a select query in Access? a. Access creates a unique copy of the data. b. Access selects current data from underlying tables. c. Access creates a table with the specified fields and records. d. Access locks the underlying tables so they cannot be changed.
b. Access selects current data from underlying tables.
Which of the following Access functions can you use to return the number of records in a group of records? a. Group b. Count c. Total d. Number
b. Count
Which of the following fields would be the best candidate for a primary key field in a table of employee data? a. Lastname b. EmployeedID c. Email d. BirthDate
b. EmployeedID
When you use a name containing a space in Access SQL, what must you do to specify the table or column name? a. Enclose it in "quotation marks". b. Enclose it in [square brackets]. c. Enclose it in *asterisks*. d. Enclose it in (parentheses).
b. Enclose it in [square brackets].
An employee's last name is an example of an attribute. a. true b. False
b. False
In Access SQL, which operator could you use to list all fields from a Customers table where the City field is Madison, Middleton, or Belleville? a. LIKE b. IN c. BETWEEN d. AND
b. IN
Which SQL keyword can you use to join two tables that have a one-to-many relationship? a. LINK b. RELATE c. UNION d. WHERE
. WHERE
If you want to select records containing the text Consulting in the ProjectType field, how does Access save the criterion in the query grid of Query Design View? a. "Consulting" b. #Consulting# c. [Consulting] d. (Consulting)
a. "Consulting"
Microsoft Access is well-suited to which of the following cases? a. A few trusted users work with the database at the same time. b. The database is very large, containing dozens of tables and thousands of records. c. Many users work with the database in separate geographical locations. d. The database has strict security requirements because it is available on the Internet.
a. A few trusted users work with the database at the same time.
You can create compound criteria (conditions) in a query by using which of the following two keywords? a. AND, OR b. AND, NOR c. OR, NOT c. NOT, ONLY
a. AND, OR
How are aggregate functions different from other types of functions? a. Aggregate functions make calculations on groups of records. b. Aggregate functions return yes/no or true/false values. c. Aggregate functions work only with numeric data. d. Aggregate functions do not work with date values.
a. Aggregate functions make calculations on groups of records.
Which function calculates the number of records in a table? a. COUNT b. SUM c. MAX d. MIN
a. COUNT
In the Pitt Fitness database, you can determine which instructor is assigned a particular class by looking in the ____________________ table. a. ClassInstructors b. Classes c. Reservations d. Instructors
a. ClassInstructors
Based on the SQL shown, which query lists the name and balance of all customers with balances greater than or equal to $2,000 and less than or equal to $5,000? Customers ( CustomerNum, CustomerName, Street, City, State, PostalCode, Balance, CreditLimit, RepNum ) a. SELECT CustomerName, Balance FROM Customers WHERE Balance BETWEEN 2000 AND 5000; b. SELECT CustomerName, Balance FROM Customers WHERE Balance > 2000; c. SELECT Balance FROM Customers WHERE Balance BETWEEN 2000 AND 5000; c. SELECT CustomerName, Balance FROM Customers WHERE Balance BETWEEN 2000 OR 5000
a. SELECT CustomerName, Balance FROM Customers WHERE Balance BETWEEN 2000 AND 5000;
In an Access query, how can you list records in A-Z order by last name? a. Set an ascending sort order on the LastName field. b. Group the LastName field. c. Set a descending sort order in the LastName field. d. Remove the checkmark from the Show box in the LastName field.
a. Set an ascending sort order on the LastName field.
In the Pitt Fitness database, what can you learn by examining the ClassInstructors data? a. Some classes use more than one instructor. b. Each class has only one instructor. c. Each instructor teaches only one class. d. All the instructors live in Pittsburgh.
a. Some classes use more than one instructor.
Redundancy refers to the duplication of data, or the storing of the same data in more than one place. a. True. b. False.
a. True.
Which SQL commands do you use to update the values of an existing field? a. UPDATE and SET b. LIKE and IN c. FROM and WHERE d. INSERT and INTO
a. UPDATE and SET
Which of the following tasks is a data analyst likely to perform? a. apply an algorithm to find sales trends b. install software to work with a database c. design a new database d. maintain the company database
a. apply an algorithm to find sales trends
In a large business, who mines a database for information, trends, and insights? a. data analyst b. database administrator c. data entry manager d. data security expert
a. data analyst
What is the term for a collection of data organized in a manner that allows access, retrieval, and use of the data? a. database b. entity. c. code file c. flat file
a. database
Which of the following is a visual way to represent and analyze a database? a. entity-relationship (E-R) diagram b. algorithm c. encryption diagram d. metadata.
a. entity-relationship (E-R) diagram
According to the Bureau of Labor Statistics, what is the job growth outlook for database administrators? a. faster than average b. slower than average c. about average d. No growth is expected.
a. faster than average
What do you call t he field used to join two tables on the "many" side of a one-to-many relationship? a. foreign key field b. primary key field c. secondary sort field d. calculated field
a. foreign key field
If you are sorting records by more than one field, which field is the first field that is evaluated for sorting purposes? a. primary sort key b. secondary sort key c. maximum sort key d. minor sort key
a. primary sort key
A _____ is a question about the data structured in a way that the DBMS can recognize and process. a. query b. product c. relationship d. tuple
a. query
The field you use to sort records is called the _____. a. sort key b. sort argument c. parent key d. foreign key
a. sort key
Which aggregate function do you use to total the values in a numeric field in a group of records? a. sum b. total c. Count d. Max
a. sum
An entity is a person, place, event, item, or other transaction for which you want to store and process data. a. true b. false
a. true
In Access, you can display the results of a select query using the Run button or the View button. a. true b. false
a. true
Microsoft Access uses Query Design View as a QBE. a. true b. false
a. true
Redundancy makes changing data more cumbersome and time-consuming. a. true b. false
a. true
Which database term refers to a row in a table? a. tuple b. field c. group d. relation
a. tuple
In what type of SQL operation must two tables have the same field structure? a. union b. join c. concatenation d. extract
a. union
Based on the SQL shown, for each sales rep, which query lists the rep number, the number of customers assigned to the rep, and the average balance of the rep's customers? Group and order the records by rep number. Customers ( CustomerNum, CustomerName, Street, City, State, PostalCode, Balance, CreditLimit, RepNum ) a. SELECT RepNum, AVG(Balance) FROM Customers GROUP BY RepNum ORDER BY RepNum; b. SELECT RepNum, COUNT(RepNum), AVG(Balance) FROM Customers GROUP BY RepNum ORDER BY RepNum; c. SELECT RepNum, COUNT(*), AVG(Balance) FROM Customers GROUP BY RepNum ORDER BY RepNum; d. SELECT RepNum, COUNT(*) FROM Customers GROUP BY RepNum ORDER BY RepNum;
c. SELECT RepNum, COUNT(*), AVG(Balance) FROM Customers GROUP BY RepNum ORDER BY RepNum;
Which of the following is NOT true about a relation, otherwise known as a two-dimensional table? a. The entries in the table should be single-valued. b. All values in a column should be values of the same attribute. c. Two or more columns can share the same name. d. The order of rows is not important.
c. Two or more columns can share the same name.
Based on the table description and SQL shown, which query increases the FeeAmount by 2 percent? Fees ( FeeID, FeeType, FeeAmount a. UPDATE Fees SET FeeAmount = FeeAmount * 1.2; b. UPDATE Fees SET FeeAmount = FeeAmount * 2%; c. UPDATE Fees SET FeeAmount = FeeAmount * 1.02; d. SELECT Fees WHERE FeeAmount = FeeAmount * 1.02;
c. UPDATE Fees SET FeeAmount = FeeAmount * 1.02;
Which command joins the related Customers and Orders tables based on the common CustomerID field? a. WHERE CustomerID.Customers = CustomerID.Orders b. JOIN Customers.CustomerID = Orders.CustomerID c. WHERE Customers.CustomerID = Orders.CustomerID d. SELECT Customers.CustomerID AND Orders.CustomerID
c. WHERE Customers.CustomerID = Orders.CustomerID
If you are creating a computed field that adds 10 percent to the UnitPrice field, how do you enter the UnitPrice field name in the expression? a. "UnitPrice" b. Unit Price c. [UnitPrice] d. (UnitPrice)
c. [UnitPrice]
During which phase does a database developer create the entities, attributes, and relationships between the tables of data? a. data security b. database integrity. c. database design d. database selection
c. database design
Which of the following is a problem that data redundancy causes? a. removal of orphan records b. increased data independence c. increased data errors and inconsistencies d. removal of primary key fields
c. increased data errors and inconsistencies
In Access, what uniquely identifies a row in a table? a. attribute b. column c. primary key d. field
c. primary key
When you place one query inside another, the inner query is called a(n) ___________________ and is evaluated first. a. joined query b. aggregate query c. subquery d. compound query
c. subquery
In the Sports Physical Therapy database, how can you determine the number of sessions completed by therapist Steven Wilder? a. In the Therapist table, count the number of values in the SessionNum column for Steven Wilder. b. In the Session table, count the number of times Steven Wilder appears in the TherapistName column. c. In the Therapies table, count the number of values in the SessionTherapist column for Steven Wilder. d. In the Therapist table, find the TherapistID for Steven Wilder, and then count the number of times his TherapistID appears in the Session table.
d. In the Therapist table, find the TherapistID for Steven Wilder, and then count the number of times his TherapistID appears in the Session table.
Which of the following SQL commands sorts records by ProductName within ProductType? a. SORT BY ProductType, ProductName b. LIST ProductName IN ProductType c. ORDER BY ProductName IN ProductType d. ORDER BY ProductType, ProductName
d. ORDER BY ProductType, ProductName
In Access, if you want a query to list the ProductID, Category, and Description field values and sort the records by description within each category, how should you arrange the fields from left to right in the query design grid? a. ProductID, Description, Category b. Description, Category, ProductID c. Description, ProductID, Category d. ProductID, Category, Description
d. ProductID, Category, Description
Based on the table description and SQL shown, which query lists the states in the Students table and displays the number of students from each state? Students (StudentID, FirstName, LastName, Street, City, State, PostalCode) a. SELECT State, COUNT(*) AS CountOfState FROM Students ORDER BY State; b. SELECT State, COUNT(*) AS CountOfState FROM Students HAVING State; c. SELECT State, COUNT(*) AS CountOfState FROM Students ; d. SELECT State, COUNT(*) AS CountOfState FROM Students GROUP BY State;
d. SELECT State, COUNT(*) AS CountOfState FROM Students GROUP BY State;
In general, what should be in place before you select fields from more than one table in Access Query Design View? a. The tables should not contain fields with the same field name. b. The tables should be merged into one table. c. The join line between the tables should be deleted. d. The tables should be related in a proper one-to-many relationships.
d. The tables should be related in a proper one-to-many relationships.
What SQL command do you use to make changes to existing data in a table? a. MODIFY b. CHANGE c. SELECT d. UPDATE
d. UPDATE
What do two tables use to link related records from each table? a. a form b. an orphan record c. a unique value d. a common field
d. a common field
What type of functions are Count, Sum, Avg, Max, and Min? a. accumulation b. allowed c. primary d. aggregate
d. aggregate
A ____________________ in a record is the result of a calculation using data from the rest of the record . a. Foreign key field b. composite field c. grouping field d. computed field.
d. computed field.
When a SQL statement consists of two queries and you place one query inside another, the inner query becomes a(n) _____. a. aggregate query b. Boolean query c. compound query d. subquery
d. subquery
