Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question I (70 points total) Consider the following relational database for storing data about employees and projects: employee (employee_id, name, annual salary) project (project_name, budget)

image text in transcribed
image text in transcribed
Question I (70 points total) Consider the following relational database for storing data about employees and projects: employee (employee_id, name, annual salary) project (project_name, budget) participates (employee_id, project_name) Assume that (i) each employee is assigned a unique ID, (i) each project is assigned a unique name, (iii) an employee may participate in multiple projects and multiple employees may participate in the same project, and (iv) some employees may not participate in tiny project. (a) (10 points) Define the primary key for each of the above relations. Furthermore, find all foreign keys. For each foreign key, the referencing and referenced relations must be clearly specified. (b) (10 points) Write an expression in SQL to find the IDs of the employees that participate in project 'X', but not project 'Y'. (c) (10 points) Write an expression in SQL to find the total amount of budget to support all projects in which employee '1111' participates. (d) (10 points) Write an expression in SQL to update the annual salary of each employee as follows: If the current annual salary is less than $100,000, increase the salary by 4 percent. Otherwise, increase the salary by 3 percent

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2017 For Windows Web And Database Applications

Authors: Corinne Hoisington

1st Edition

1337102113, 978-1337102117

More Books

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago