MIS 374 - Practice Q - Module 4

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

To query whether the Clients table has records that do not have any matching records in the Projects table, you would use a(n) _____. a. left join b. right join c. inner join d. one-to-many join

a. left join

RIGHT JOINS in SQL are helpful to find _____. a. orphan records b. parent records with no matching child records c. records with AND criteria in the WHERE clause d. records with OR criteria in the WHERE clause

a. orphan records

Which Access field property might you use to set data integrity rules on a single field? a. Validation Rule b. Indexed? c. Caption d. Default Value

a. Validation Rule

Which of the following is not prevented by enforcing referential integrity on a one-to-many relationship? a. incorrect entry into a primary key field value b. entry into a foreign key field that doesn't have a match in the table that contains the primary key field c. deleting a record in the parent table that has a matching record in a child table d. changing a primary key field value that has matching records in a related table

a. incorrect entry into a primary key field value

Which SQL command would add a new field named Region to the Clients table? a. ALTER TABLE Clients ADD Region TEXT(20) b. ALTER TABLE Clients MODIFY Region TEXT(20) c. MODIFY TABLE Clients ADD Region TEXT(20) d. MODIFY TABLE Clients MODIFY Region TEXT(20)

a. ALTER TABLE Clients ADD Region TEXT(20)

Why doesn't Access SQL provide for the SQL CREATE VIEW statement? a. In Access, queries function as views. b. Access SQL needs to be compiled outside of the database in order to run all statements. c. Access is not a true relational database system. d. Access does not have the ability to run SQL.

a. In Access, queries function as views.

Assume you are using two tables for an SQL query: Therapist and Session. You want to make sure that you display all the names of the therapists even if they are not yet booked into a session. What join do you need to create to ensure that all the therapists are listed? a. LEFT JOIN Therapist ON Therapist.TherapistID=Session.TherapistID b. RIGHT JOIN Therapist ON Therapist.TherapistID=Session.TherapistID c. INNER JOIN Therapist ON Therapist.TherapistID=Session.TherapistID d. OUTER JOIN Therapist ON Therapist.TherapistID=Session.TherapistID

a. LEFT JOIN Therapist ON Therapist.TherapistID=Session.TherapistID

To generate a schedule list, create a view in SQL that shows the session date and the last name and first name of the therapist. Show the list in chronological order. a. SELECT Session.SessionDate, Therapist.LastName, Therapist.FirstName FROM Therapist INNER JOIN [Session] ON Therapist.TherapistID = Session.TherapistID ORDER BY Session.SessionDate; b. SELECT Session.SessionDate, Therapist.LastName, Therapist.FirstName FROM Therapist INNER JOIN [Session] ON Therapist.TherapistID = Session.TherapistID DISPLAY BY Session.SessionDate; c. SELECT Session.SessionDate, Therapist.LastName, Therapist.FirstName FROM Therapist ORDER BY Session.SessionDate; d. SELECT Session.SessionDate, Therapist.LastName, Therapist.FirstName FROM Therapist INNER JOIN [Session] ON Therapist.TherapistID = Session.TherapistID ORDER BY Date;

a. SELECT Session.SessionDate, Therapist.LastName, Therapist.FirstNameFROM Therapist INNER JOIN [Session] ON Therapist.TherapistID = Session.TherapistIDORDER BY Session.SessionDate;

If you created an SQL query to list the patient number and the session date, which tables would be joined? a. Session and Patient b. Therapies and Patient c. Therapist and Patient d. all four tables

a. Session and Patient

Stored procedures differ from triggers in what essential way? a. Stored procedures are usually run intentionally by users, whereas triggers are generally run automatically by processes. b. Stored procedures are stored at the server, whereas triggers are generally stored at each user's client machine. c. Stored procedures may include some programming commands, whereas triggers are generally pure SQL. d. Stored procedures can change data. Triggers do not change data.

a. Stored procedures are usually run intentionally by users, whereas triggers are generally run automatically by processes.

In the Employees table, how could you ensure that no HireDate values were entered prior to 1/1/2019? a. Use the Validation Rule property on the HireDate field. b. Set referential integrity on the HireDate field. c. Set the Cascade Update Related Fields option on the HireDate field. d. Set the HireDate field as a primary key field.

a. Use the Validation Rule property on the HireDate field.

Which of the following is not a benefit of a view within the JC Consulting database? a. single location to store all data b. organizes fields and records from one or more tables c. shields sensitive data from unauthorized users d. can be used to create calculated fields

a. single location to store all data

What feature could you use to create system information about the tables and fields in the JC Consulting database? a. Performance Analyzer b. Database Documenter c. Dependency Analyzer d. Table Wizard

b. Database Documenter

When two tables are joined in an Access query, the default join type is _____. a. OUTER b. INNER c. LEFT d. RIGHT

b. INNER

Which of the following is not true about a view? a. It provides access to a subset of fields and records in one or more tables. b. It consists of a duplicate copy of the selected data. c. It provides a light blanket of security by limiting access to specific data. d. It automatically shows up-to-date information when it is executed.

b. It consists of a duplicate copy of the selected data.

From the following views, what view would be the most appropriate for the Sports Physical Therapy accountant? a. PatientNum, LastName (Patient), SessionDate, SessionNum b. PatientNum, LastName (Patient), Address, City, State, ZipCode, Balance c. PatientNum, LastName (Patient), TherapistID, Description d. PatientNum, LastName (Patient), TherapyCode

b. PatientNum, LastName (Patient), Address, City, State, ZipCode, Balance

Write the SQL code to list the session date and therapist's last name to display the upcoming schedule for the therapists. a. SELECT Session.SessionDate, Therapist.LastName FROM Therapist INNER JOIN (Therapies INNER JOIN [Session] ON Therapies.TherapyCode = Session.TherapyCode) ON Therapist.TherapistID = Session.TherapistID; b. SELECT Session.SessionDate, Therapist.LastName FROM Therapist INNER JOIN Session ON Therapist.TherapistID = Session.TherapistID; c. SELECT Session.SessionDate, Therapist.LastName FROM Therapist INNER JOIN ON Therapist.TherapistID = Session.TherapistID; d. SELECT LastName FROM Therapist INNER JOIN Session ON Therapist.TherapistID = Session.TherapistID;

b. SELECT Session.SessionDate, Therapist.LastNameFROM Therapist INNER JOIN Session ON Therapist.TherapistID = Session.TherapistID; c. SELECT Session.SessionDate, Therapist.LastName

Which feature of Access mimics that of relational database management system triggers? a. SQL View b. data macros c. referential integrity d. cascade options

b. data macros

If you created an SQL query to list the patient number and the session date, what type of join should you use? a. PLAIN JOIN b. OUTER JOIN c. INNER JOIN d. LEFT JOIN

c. INNER JOIN

Which of the following is not true about a one-to-many relationship? a. The table on the "one" side is also called the parent or left table. b. The table on the "one" side may or may not have related records in the "many" table. c. The table on the "many" side may have orphan records, especially if referential integrity is not enforced. d. The table on the "one" side may have orphan records.

c. The table on the "many" side may have orphan records, especially if referential integrity is not enforced.

What best describes a null value? a. a zero-length string, "" b. a space or tab character c. an intentional nothing d. the string "null"

c. an intentional nothing

Assume a new patient calls to make an appointment with a therapist. The clerk recording the appointment creates a new PatientNum value for the new patient. Before entering any other data, she first enters the PatientNum value into the Session table as part of a new record. What rule does this violate? a. indexing b. cascading c. referential integrity d. This action does not violate any rule.

c. referential integrity

Which of the following security features is not available to the JC Consulting database given it is an Access database? a. encryption b. database password c. user-level security d. startup options

c. user-level security

Where do you create data macros in the JC Consulting Access database? a. as global macro objects accessed in the Navigation Pane b. as global module objects accessed in the Navigation Pane c. within the table that contains the data they work with d. within the system tables

c. within the table that contains the data they work with

Which feature of Access is used to create a report on the metadata about tables and queries? a. data macros b. referential integrity c. cascade options d. Database Documenter

d. Database Documenter

According to the article referenced by the Bureau of Labor Statistics, knowing which of the following is not a fundamental competency for a job in database administration? a. Microsoft Access b. Data Analysis c. Oracle d. Java

d. Java

If you want to send a mailing to all patients advertising a new facility, what tables would you need to generate the query that would print the mailing labels? a. Patient, Session, Therapies, Therapist b. Patient, Session, Therapies c. Patient, Session, Therapist d. Patient

d. Patient

Which of the following fields from the Projects table is not a good candidate to index? a. ProjectID b. ProjectStartDate c. ClientID d. ProjectNotes

d. ProjectNotes

As the module material stated, although Access doesn't create a stored procedure, a parameter query mimics what a stored procedure might do. How would you create a parameter query in SQL to prompt for the patient's last name and display the patient's last name and their therapy? a. SELECT (ENTER Patient.LastName), Therapies.Description FROM Therapies INNER JOIN (Patient INNER JOIN [Session] ON Patient.PatientNum = Session.PatientNum) ON Therapies.TherapyCode = Session.TherapyCode; b. SELECT Therapies.Description FROM Therapies INNER JOIN (Patient INNER JOIN [Session] ON Patient.PatientNum =Session.PatientNum)ON Therapies.TherapyCode = Session.TherapyCode WHERE (((Patient.LastName)=[Enter Last Name])); c. SELECT Patient.LastName, Therapies.Description FROM Therapies WHERE (((Patient.LastName)=[Enter Last Name])); d. SELECT Patient.LastName, Therapies.Description FROM Therapies INNER JOIN (Patient INNER JOIN [Session] ON Patient.PatientNum =Session.PatientNum) ON Therapies.TherapyCode = Session.TherapyCode WHERE (((Patient.LastName)=[Enter Last Name]));

d. SELECT Patient.LastName, Therapies.DescriptionFROM Therapies INNER JOIN (Patient INNER JOIN [Session] ON Patient.PatientNum =Session.PatientNum)ON Therapies.TherapyCode = Session.TherapyCodeWHERE (((Patient.LastName)=[Enter Last Name])); Hide Feedback

What index(es) would be appropriate to create for the Session table? Select the best answer. a. SessionDate b. PatientNum c. TherapistID d. SessionDate, PatientNum, and TherapistID

d. SessionDate, PatientNum, and TherapistID

What is the primary purpose of creating an index? a. documenting relationships b. identifying integrity issues c. adding event trigger functionality to tables d. improving the speed by which data is searched and presented

d. improving the speed by which data is searched and presented


Kaugnay na mga set ng pag-aaral

Bio 2170 Chapter 10 LearningCurve

View Set

Module 3 Reading and Learning to Read Chapter 8 Terms

View Set