Answered step by step
Verified Expert Solution
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 shows some portion of the database of a company on medical claimsQuestion
The following Figure 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
Marks
b Write the SQL queries to insert the data into the tables as shown above.
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 and
Marks
d Based on the table provided in question 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
Marks
ii Produce a list of approved claims, showing only the claimNo, empID and
amount.
Marks
iii Find the highest approved claim for each claim code.
Marks
iv List all ID of employees who work in sales department without having any
claims. You may use rename operator where necessary
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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started