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]
2 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]2 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
Question 1:
Julli [10]

Answer:

Following are the code to the given question:

#include<iostream>//header file

#include<math.h>//header file

using namespace std;

int main()//main method

{

   long long x, x1, y, y1;//defining long variable

   int count=0,i,j;//defining integer variable

   cout<<"Enter a range for x coordinates: "<<endl;//print message        

   cin>>x>>x1;//input x and x1 value                          

   cout<<"Enter a range for y coordinates: "<<endl;//print message

   cin>>y>>y1; //input y and y1 value  

   for(i = x; i <= -x1; i++)//use nested loop that tests each coordinates                                        

   {

       for(j = y; j <= y1; j++)//use nested loop that tests each coordinates

       {

           if(((2*pow(i,2)) + abs(2*i*j) + pow(j,2)) == 10000)//use if that checks condition as per the given question

           {

               cout<<"There is a planet at "<<i<<", "<<j<<endl;//  print coordinates

               count++;//incrementing count variable value                                                    

           }

       }

   }

   cout<<"Total number of planets detected are: "<<count<<endl;//print count value

   return 0;

}

Explanation:

In this code, inside the main method long "x, x1, y, and y1" and integer "count, i, and j" type variable is declared that uses a long variable to input value from the user-end.

In the next step, two nested loops have defined that test each coordinate and define if block that checks condition as per the given question and use i, j, and count variable to print value with the message.

3 0
3 years ago
9. Select the correct answer.
mihalych1998 [28]

Answer:

I believe the answer is exclusive but im not 100% sure

5 0
3 years ago
What are 5 good movies like The Breakfast Club or 8 Mile?
Gnoma [55]

Answer:

The Notebook, Beauty and the Beast, Step Brother, The Breakfast Club and The Little Mermaid

Explanation:

8 0
3 years ago
Read 2 more answers
A. True
svetlana [45]

Answer : True  

Explanation: Vectors can hold, data of the same type and can automatically expand accordingly and change it’s size. The date stored in vectors should be linear.  

- The syntax for vector is vector<int>v;

- Mostly this is used in C++ as an alternative to arrays  

- If you want to use vector in your program then define it in the header first  i.e.

#include <vector>

- Push back is a function, that is used to insert an element into the vector  

- Pop back removes the element from the vector  


6 0
3 years ago
The User Datagram Protocol (UDP) is called the connectionless protocol because: It does not attempt to fix bad packets but resen
DochEvi [55]

Answer:

The User Datagram Protocol (UDP) is called the connectionless protocol because:

It does not attempt to fix bad packets or resend lost packets.

Explanation:

Ports are openings or entrance doors through which data packages have access to a PC or server.  TCP and UDP are transport protocols with port numbers.  TCP means Transmission Control Protocol.  They are used to connect two devices over the internet and other networks.  UDP means User Datagram Protocol.  They are used to connect applications and to speed the transfer of data.  Comparatively, UDP is faster, simpler, and more efficient than TCP.  TCP enables retransmission of lost data packets, which UDP cannot do.

4 0
2 years ago
Other questions:
  • Please help?!
    11·2 answers
  • Which characteristic would be best for a person seeking a career in the Telecommunications pathway?
    15·1 answer
  • In Microsoft Word, how would you change the amount of space that is put in after each paragraph?
    15·1 answer
  • Use the image above to determine which toolbars will be displayed in the program you are using. SELECT ALL THAT APPLY
    11·2 answers
  • Difrent between computer and computer system​
    9·1 answer
  • Who Has any idea How to code?
    7·2 answers
  • A monitor is an output device. Which of the following is not a type of monitor? *
    11·1 answer
  • Your friend says, “I can’t ever watch a streaming movie without it pausing for long moments. It makes me crazy!” What might you
    11·1 answer
  • How to be gud at Friday night funk
    11·1 answer
  • How do the following technologies help you with your quest to become a digital citizen kiosks enterprise computing, natural lang
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!