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 claims. Refer to the relations, Claim, Employee and Claim Type

image text in transcribed

The following Figure 1 shows some portion of the database of a company on medical claims. Refer to the relations, Claim, Employee and Claim Type shown in the diagram and answer the following questions. Claim claimle dateFrom dateTo empID claimcode amount status 001 13 Mar 13 Mar E0968 M01 45.00 Pending 002 16 Mar 20 Mar E4928 T34 369.75 Approved 003 08 Apr 09 Apr E2728 P11 55.50 Pending Employee id department bank account E0968 production maybank 887799002637481 E4928 sales CIMB 546372819037 E2728 sales maybank 882435536772804 remaining Medical 1760.00 1587.00 765.90 claimtype code typo account approval from medical HR M01 D21 dentist HR 087 overtime health care heath care departmental travel travel department HR T34 travel parking & toll P11 HR 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: claimCode must be the one that exist as code in ClaimType. (1) amount must be an integer value between 0 and 100

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

Demystifying Databases A Hands On Guide For Database Management

Authors: Shiva Sukula

1st Edition

8170005345, 978-8170005346

More Books

Students also viewed these Databases questions

Question

What is Working Capital ? Explain its types.

Answered: 1 week ago