Christina a4 mike agent agentid agentname agentrating

This preview shows page 1 - 3 out of 5 pages.

Christina A4 Mike AGENT AgentID AgentName AgentRating AgentYearOfHire SupervisedBy A1 Kate 101 1990 A2 Amy 92 2009 A1 A3 Luke 100 1992 Page 1 of 5
Image of page 1
TDB1131 Database Systems A4 James 90 2010 A3 (a) Write an SQL statement to create the table CLIENT. Identify the primary key and foreign key and reflect them in the SQL statement with the DELETE CASCADE option for its referential integrity constraint. (b) Write an SQL query for the HAPPY INSURANCE database that will list the agent ID and agent name for each agent hired before the year 2000. (c) Write an SQL query for the HAPPY INSURANCE database that will display the average rating for all agents. (d) Write an SQL query for the HAPPY INSURANCE database that will display the name of each client of the agent with the highest agent rating in the company. (e) Write an SQL statement for the HAPPY INSURANCE database that increases the agent rating of each agent by 3 points. Hands-on Exercise Based on the relationship diagram below, answer the following questions: 1. Create a new database call “Lab07”. Next create the above tables (clearly define the primary and foreign keys). Note: Please export the database and save it for next tutorial after done.
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 5 pages?

  • Fall '19

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors