MIS 3353 FINAL EXAM REVIEW QUESTIONS
Enabling different data points to relate to one another... - Answers - Is one of the core
functions of a database.
A company includes information about its customers in a database table called
Customer. Each line within this table includes a customer's name, phone number,
address, and date of birth. These lines are called...
` - Answers - Records
A "primary key" is... - Answers - Required for each record.
Databases... (Select all/any that apply.) - Answers - Rely on primary and foreign keys to
relate records from different tables.
In a company's database, a given table... - Answers - Can include millions of records.
Given the following two tables (Product, Manufacturer), which one of the following is an
example of a foreign key?
Product
ProductID MfrID Name Price Qty
5006 2 Ball Peen Hammer 6.99 47
5007 1 5-lb. Mallet 9.99 11
5009 2 10-lb. Mallet 11.49 6
Manufacturer
MfrID MfrName
1 Arcturus Tools
2 Nemesis Manufacturing Supply - Answers - The MfrID field in the Product table.
When there is a relationship between records in two different tables... - Answers - The
mandatory side donates its key to the many side.
Which of the following is not a clause in a SELECT query? - Answers - SORT BY
Assuming that the table and fields referenced are valid, which of the following queries
have appropriate syntax and would work without error? - Answers - SELECT
PlayerName, Position, Height
FROM Roster
WHERE Height > 63
ORDER BY Position;
, Using a database that includes information about every opera ever written, I want to
write a query that displays information only about those operas that were written prior to
the year 1825. To do this, I would use which of the following? - Answers - WHERE
clause
Which of the following WHERE clauses would include only those records in the output
where the value in the Destination field is something OTHER than Norman? - Answers -
WHERE Destination <> 'Norman'
Which of the following WHERE clauses would include only those records in the output
for which the value of UniformNumber is 1, 3, 5, or 7? - Answers - WHERE
UniformNumber IN (1, 3, 5, 7)
Which of the following WHERE clauses would include only those records from the
Customer table where the customer's last name (the LastName field) starts with Y and
the customer's birthday (DOB field) falls some time after 1994? - Answers - WHERE
LastName LIKE 'Y%' AND DOB > '1994-12-31'
When joining tables... - Answers - It is necessary to match the foreign key in one table
to the primary key in another within the query.
Assuming no fields/keys are misnamed, which of the following multiple-table queries
would you expect to run without errors? - Answers - SELECT Mountain.GPSLat,
Mountain.GPSLon, Location.StateName
FROM Mountain, Location
WHERE Mountain.LocID = Location.LocID
ORDER BY Location.LocID;
When joining three tables within the same query, which of the following is true? -
Answers - You create a "virtual table" that includes matching records from all three
tables.
Considering only the FROM clause of a query, which of the following would successfully
assign aliases to tables? - Answers - FROM Article A, Category C, Writer W
When would you want to use an outer JOIN? - Answers - When you want to output all
records from one table and records from a second table that have matching keys with
records from the first.
Which of the following, based strictly on syntax, would NOT run correctly in SQL
Server? (Select any/all that apply.) - Answers - SELECT V.VesselID, T.TripID,
T.Destination, T.Duration
FROM Vessel V, Trip T
WHERE V.TripID = T.TripID AND T.Duration > (
AVG(Duration)
FROM T.Trip)
Enabling different data points to relate to one another... - Answers - Is one of the core
functions of a database.
A company includes information about its customers in a database table called
Customer. Each line within this table includes a customer's name, phone number,
address, and date of birth. These lines are called...
` - Answers - Records
A "primary key" is... - Answers - Required for each record.
Databases... (Select all/any that apply.) - Answers - Rely on primary and foreign keys to
relate records from different tables.
In a company's database, a given table... - Answers - Can include millions of records.
Given the following two tables (Product, Manufacturer), which one of the following is an
example of a foreign key?
Product
ProductID MfrID Name Price Qty
5006 2 Ball Peen Hammer 6.99 47
5007 1 5-lb. Mallet 9.99 11
5009 2 10-lb. Mallet 11.49 6
Manufacturer
MfrID MfrName
1 Arcturus Tools
2 Nemesis Manufacturing Supply - Answers - The MfrID field in the Product table.
When there is a relationship between records in two different tables... - Answers - The
mandatory side donates its key to the many side.
Which of the following is not a clause in a SELECT query? - Answers - SORT BY
Assuming that the table and fields referenced are valid, which of the following queries
have appropriate syntax and would work without error? - Answers - SELECT
PlayerName, Position, Height
FROM Roster
WHERE Height > 63
ORDER BY Position;
, Using a database that includes information about every opera ever written, I want to
write a query that displays information only about those operas that were written prior to
the year 1825. To do this, I would use which of the following? - Answers - WHERE
clause
Which of the following WHERE clauses would include only those records in the output
where the value in the Destination field is something OTHER than Norman? - Answers -
WHERE Destination <> 'Norman'
Which of the following WHERE clauses would include only those records in the output
for which the value of UniformNumber is 1, 3, 5, or 7? - Answers - WHERE
UniformNumber IN (1, 3, 5, 7)
Which of the following WHERE clauses would include only those records from the
Customer table where the customer's last name (the LastName field) starts with Y and
the customer's birthday (DOB field) falls some time after 1994? - Answers - WHERE
LastName LIKE 'Y%' AND DOB > '1994-12-31'
When joining tables... - Answers - It is necessary to match the foreign key in one table
to the primary key in another within the query.
Assuming no fields/keys are misnamed, which of the following multiple-table queries
would you expect to run without errors? - Answers - SELECT Mountain.GPSLat,
Mountain.GPSLon, Location.StateName
FROM Mountain, Location
WHERE Mountain.LocID = Location.LocID
ORDER BY Location.LocID;
When joining three tables within the same query, which of the following is true? -
Answers - You create a "virtual table" that includes matching records from all three
tables.
Considering only the FROM clause of a query, which of the following would successfully
assign aliases to tables? - Answers - FROM Article A, Category C, Writer W
When would you want to use an outer JOIN? - Answers - When you want to output all
records from one table and records from a second table that have matching keys with
records from the first.
Which of the following, based strictly on syntax, would NOT run correctly in SQL
Server? (Select any/all that apply.) - Answers - SELECT V.VesselID, T.TripID,
T.Destination, T.Duration
FROM Vessel V, Trip T
WHERE V.TripID = T.TripID AND T.Duration > (
AVG(Duration)
FROM T.Trip)