Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

the following figure 1 shows some portion of the database of a company on medical claimsQuestion 3 The following Figure 1 shows some portion of

the following figure 1 shows some portion of the database of a company on medical claimsQuestion 3
The following Figure 1 shows some portion of the database of a company on medical
claims. Refer to the relations, Claim, Employee and ClaimType shown in the diagram
and answer the following questions.
(a) Write the SQL queries to create each of the tables shown above
[12 Marks]
(b) Write the SQL queries to insert the data into the tables as shown above.
[5 Marks]
(c) Based on the tables of the above given schema, write SQL integrity
enhancement features for the following constraints:
(i) claimCode must be the one that exist as code in ClaimType .
(ii) amount must be an integer value between 0 and 100.
[8 Marks]
(d) Based on the table provided in question (3) provide the relevant relational
algebra operations that is been described in the following section.
(i) List all employees in HR department who are having remaining Medical
greater than 1000.00.
[3 Marks]
(ii) Produce a list of approved claims, showing only the claimNo, empID and
amount.
[3 Marks]
(iii) Find the highest approved claim for each claim code.
[4 Marks]
(iv) List all ID of employees who work in sales department without having any
claims. (You may use rename operator where necessary).
[4 Marks]
(v) Produce a list of claims for employees in sales department, showing only
the claimNo, empID, claimCode and amount. (You may use assignment
operator where necessary).
image text in transcribed

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

Step: 3

blur-text-image

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

PostgreSQL 10 High Performance Expert Techniques For Query Optimization High Availability And Efficient Database Maintenance

Authors: Ibrar Ahmed ,Gregory Smith ,Enrico Pirozzi

3rd Edition

1788474481, 978-1788474481

More Books

Students also viewed these Databases questions

Question

Delete

Answered: 1 week ago

Question

Presentation Aids Practicing Your Speech?

Answered: 1 week ago