Suppose that there are three tables, Person, WorkFor, and Company, in a database. o The Person...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Suppose that there are three tables, Person, WorkFor, and Company, in a database. o The Person table stores information about the ID, name, street, and city of each employee. o The Company table stores information about the tax number, name, and city of each company. A company may have several branches located in different cities. In this case, each branch of this company has its own tax number. (a) (b) (d) o The WorkFor table stores information about the ID and salary of each employee, and the tax number of each company. Write the data definition language (DDL) to create these three tables. (c) Write a SQL statement to calculate the number of employees who live in the city Uppsala. Write a SQL statement to find the names of all the employees who live in the city Stockholm. (1) Write a SQL statement to find the ID numbers of all the employees who work for the company IKEA and earn more than 35000. (e) Write a SQL statement to update the records in the WorkFor table, to double the salary of each employee whose salary is currently below 10000. Write a SQL statement to find the names of all the employees who work for companies which have branches located in the cities Stockholm or Uppsala. Suppose that there are three tables, Person, WorkFor, and Company, in a database. o The Person table stores information about the ID, name, street, and city of each employee. o The Company table stores information about the tax number, name, and city of each company. A company may have several branches located in different cities. In this case, each branch of this company has its own tax number. (a) (b) (d) o The WorkFor table stores information about the ID and salary of each employee, and the tax number of each company. Write the data definition language (DDL) to create these three tables. (c) Write a SQL statement to calculate the number of employees who live in the city Uppsala. Write a SQL statement to find the names of all the employees who live in the city Stockholm. (1) Write a SQL statement to find the ID numbers of all the employees who work for the company IKEA and earn more than 35000. (e) Write a SQL statement to update the records in the WorkFor table, to double the salary of each employee whose salary is currently below 10000. Write a SQL statement to find the names of all the employees who work for companies which have branches located in the cities Stockholm or Uppsala.
Expert Answer:
Answer rating: 100% (QA)
Answer Here is the DDL for creating the three tables Person WorkFor and Company Create the Person ta... View the full answer
Related Book For
Modern Database Management
ISBN: 978-0133544619
12th edition
Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi
Posted Date:
Students also viewed these databases questions
-
2.20 Consider the equation ex - x - 1 = 0. (a) Sketch the functions in this equation and then use this to explain why there are only two solutions to this equation and describe where they are located...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
In representative democracies where legislators represent geographic districts in legislative bodies (such as the U.S. House of Representatives), we often hear of pork barrel spending. Typically,...
-
Discuss the concept of the Process Spectrum. Use examples where appropriate.
-
The voltage across a 2-yF capacitor is given by the waveform in Figure P5.13. Compute the current waveform. ims 12 Figure P5. 13
-
Golden Corp., a merchandiser, recently completed its 2017 operations. For the year, (1) all sales are credit sales, (2) all credits to Accounts Receivable reflect cash receipts from customers, (3)...
-
A DC motor-drive system has a comparator. The comparators job is to compare the existing speed of the motor with the requested speed. The motor speed is transmitted from a tachometer on the outboard...
-
The following income statement was prepared for Frame Supplies for the year 2016: FRAME SUPPLIES Income Statement For the Year Ended December 31, 2016 Sales ............ $ 250,000 Cost of goods sold...
-
Power Drive Corporation designs and produces a line of golf equipment and golf apparel. Power Drive has 100,000 shares of common stock outstanding as of the beginning of 2024. Power Drive has the...
-
Exercise 6.1 Configuring Memory on Paper Objective: a computer is not performing as well as it used to. Windows 10 tool would the technician get the user to open to quickly tell how much RAM is...
-
John Due works for a publicly traded company. On Dec. 3 1 , 2 0 2 0 , John Due receives option to buy 1 0 , 0 0 0 shares of employer's common stock at $ 2 5 / share . The company's shares are trading...
-
A bank reconciliation from Ware, Inc. is provided here. Cash balance per bank statement Add: Deposits in transit $18,300 2,110 20,410 Less: Outstanding checks 1,095 Adjusted cash balance per bank...
-
A stock has had returns of 27 percent, 14 percent, -14 percent over the last three years, respectively. What is the geometric mean return for this stock? (Enter your answers as a percentage rounded...
-
Prepare budgetary entries, using general ledger control accounts only, for each of the following unrelated situations: (If no entry is required for a transaction/event, select "No Journal Entry...
-
Please make a Creature class that has: Private fields for: (string) name, (string) description, (int) endurance, (string) filename, an array of phrases (size of at least 3) that the creature might...
-
Summarize evidence-based strategies for working with the role group to obtain their buy-in and prepare them to implement the new policy and apply the associated practice guidelines to their work. Why...
-
How many electrons are necessary to produce 1.0 C of negative charge? (e = 1.60 10-19 C) 1.60
-
1. As a general strategy, would you recommend that Carl take an aggressive approach to capacity expansion or more of a wait-and-see approach? 2. Should Carl go with the option for one facility that...
-
Is it possible that during the physical database design and creation step of database development you might want to return to the logical database design activity? Why or why not? If it is possible,...
-
Describe two properties that each candidate key must satisfy.
-
What is XSLT, and how does it differ from XML? What role does it play in the creation of a Web application?
-
One of the main fears that retail startups have is if they will be able to compete against Walmart, Home Depot, and the other big-box stores. This is a legitimate fear. Big-box stores continue to...
-
Influencer marketing is a type of marketing where companies partner with influencers, who have a significant following on social media platforms, to promote their products or services. Influencers...
-
In the summer of 2015, Stephen Kuhl and Kabeer Chopra made their way to Philadelphia to prepare for business school. It was their first semester in the Wharton MBA program. They were both in an...
Study smarter with the SolutionInn App