1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
valina [46]
3 years ago
10

Suppose you are given a relation emp(empid, dept, salary) and wish to maintain a materialized view deptsalary(dept, totalsalary)

which stores the total salary for all employees of each department. Suppose the system does not support materialized views but supports triggers. Write an SQL trigger on insert on emp to keep the relation deptsalary up to date. Do not worry about deletes or updates. You can assume that there is already a tuple for each department in deptsalary so you do not need to worry about new deparments.
Computers and Technology
1 answer:
NeX [460]3 years ago
7 0

Answer:

WITH deptsalary AS (

SELECT dept,  SUM(salary)

FROM emp

GROUP BY dept)

SELCT *

FROM deptsalary

Explanation:

deptsalary is temporary table.

dept and its respective sum of salary is to be displayed

You might be interested in
When one makes a social media post, what happens on other devices with the same app?
victus00 [196]

Answer:

An alert appears on the other devices

Explanation:

On social media platforms, whenever some one make a post, all the person who are using that social media app and present in the friend circle of that particular person receive an alert containing the information of the post.

The alert that received by different users on a social media platform is known as Notification. This notification is a type of text, in which the activity performed by post creator is mentioned, this text is received with the tone called notification tone.

The purpose of the alert is to informs the friends who are using that social media platform that a post has been published by someone.  

8 0
3 years ago
. Html documents are created by adding what to text?
zvonat [6]
The answer is Tags, sorry about putting the other answer misread question.
7 0
2 years ago
An abstraction is a simplified representation of something that is more complex. Decimal numbers were a useful abstraction in th
Blababa [14]

What was the content of the lesson? It is hard to answer a question we need context on.

6 0
2 years ago
What is telepresence
Vitek1552 [10]
The use of virtual reality technology, especially for remote control of machinery or for apparent participation in distant events.
7 0
3 years ago
What is APR?
omeli [17]

Answer:

APR is the Interest rate advertised by lenders.

Explanation:

APR is the annual percentage rate that is different from the interest rate. Interest rate is the rate of borrowing money. While APR is the rate which includes interest rate, processing fee and other cost that are involved in loan approving.

This cost is decided by lender, which may be equal to interest rate or greater than interest rate.

5 0
3 years ago
Other questions:
  • Your phone's battery dies -- no Internet for you! When you get home hours later, you plug in the charger and turn your phone bac
    6·1 answer
  • Consider a multiprocessor CPU scheduling policy. There are 2 options: 1) a singlecommon ready queue of jobs; when a CPU becomes
    8·1 answer
  • What are two constraints that continuous-media files have that conventional data files generally do not have?
    12·1 answer
  • Which of the following is one of the options available on the Columns menu on the
    6·1 answer
  • A firm offers virtual local area networks and firewalls as an on-demand cloud service. Which service does the firm offer?
    11·2 answers
  • Mention two strategies of collecting data​
    13·1 answer
  • Write a valid HTML + Python page that will count numbered from 1 to 1,000,000?​
    9·1 answer
  • Select the correct answer. Which input device uses optical technology?
    5·1 answer
  • Write any one method to delete a table in writer​
    11·1 answer
  • Which kind of a person will you be if you prove to be accountable for your actions?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!