Course Hero Logo

1012007 and 10312007 an alternative way to write the

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 190 - 192 out of 279 pages.

#10/1/2007# AND #10/31/2007#) An alternative way to write the SELECT statement is to SelectedAnswer: use a Type II nested query with the NOT EXISTS keywords.Given the following Access SQL SELECT statement:SELECT eventplan.eventno, eventrequest.datereq, dateauth, planno,workdate, empnameFROM (EventRequest INNER JOIN EventPlanON EventRequest.eventno = EventPlan.eventno)LEFT JOIN employee ON EventPlan.empno = employee.empnoWHERE eventrequest.datereq BETWEEN #7/1/2007# AND #7/31/2007#AND dateauth BETWEEN #7/1/2007# AND #7/31/2007# AND status ="Approved";The FROM clause of the SELECT statementuses a one-sided outer join that preserves the result of joining theEventPlan and EventRequest rows.Use the following tables to answer the question belowList the event number, customer name, plan number, employee name, facilityname, work date, and activity for event plans. The result should show only eventplans with a work date in October 2007.How many tables appear in the FROM clause assuming that no nested queries areused?5Given the following query:SELECT CID FROM CustomerWHERE CID IN(SELECT DISTINCT CID FROM Rentals WHERE Make = ‘FORD’)The meaning of this query is the following:SelectedAnswer:List the unique CID of all customers who haverented a Ford.The following SQL query is an example of a _____________________ join.SELECT FacNo, FacFirstName, FacLastName, FacSalary, StdNoFROM Faculty LEFT JOIN StudentON Student.StdNo = Faculty.FacNoLeft – OuterWhat field is redundant in the Rentals table?
CNameThe following SQL query is an example of a _____________________ query.SELECT StdNo, StdFirstName, StdLastName, StdMajorFROM StudentWHERE NOT EXISTS (SELECT * FROM EnrollmentWHERE Enrollment.StdNo = Student.StdNo )Type II nestedGiven the following query:SELECT CID FROM CustomerWHERE CID IN(SELECT DISTINCT CID FROM Rentals WHERE Make = ‘FORD’)The execution of this query produces the following number of rows:3Given the following Access SQL SELECT statement:SELECT eventrequest.eventno, custname, contact, dateauthFROM eventrequest, customerWHERE eventrequest.custno = customer.custno AND status = "Approved"AND eventno NOT IN( SELECT eventno FROM eventplanWHERE workdate BETWEEN #10/1/2007# AND #10/31/2007#)The SELECT statement retrieves the event number, customer name, contact, anddate authorized of approved event requests thatdo not have any related event plans in October 2007.The following SQL query is an example of a _____________________ query.SELECT StdNo, StdFirstName, StdLastName, StdMajorFROM StudentWHERE Student.StdNo IN(SELECT StdNo FROM EnrollmentWHERE EnrGrade >= 3.5 )Type I nestedWhich of the following statements does not apply to relational databases?Relational databases have a strong procedural orientationIn a table in 1NF in which the only candidate key is a single attribute:2NF may not be violatedIf the foreign key constraint for the EventPlanLine.LineNo column includes ON DELETECASCADE, deleting a row of the EventPlan table

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 279 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
N/A
Tags

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture