Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

in sql for course storage data of mangment Q.creat tables then fill , relationsh

ID: 3816866 • Letter: I

Question

in sql for course storage data of mangment

Q.creat tables then fill , relationships
also do its Index and Cube

// pls screenshot output

A Retail Dimensional Model Ret Calendar PK ti me period id day number Mall shot Campaign hour number PK mailshot id day date product category code malahot name malahot 8tart dates maishot end date mailshat target ulation Retail Dimensional Model maishot objectives other malahot detalla PK fact Udl invoice status code Products in Warehouses FK product id FK promotioLid PF product Id FK payment method code FAX warehouse id FR slam id parent product. d er FAT store id product name product price totals product calo averages, counts, balas product size her figures product description other product datala Ref Invoice Status Codes Product Promotion PK invoice status code PK Promotio invoice Btatue deecnpton promotion start date promotion end date promotion name promotion description other promotion details Data Base Answers Ltd. 2013 Statt PK staff id FK job id FK reporta to atar FAT store id staff name staff address other staff details Stores PK store id store name store adress other stone details. Ref Payment Methods Ph payment method code payment method description

Explanation / Answer

As per given model:


CREATE TABLE Claims (
Claim_ID int NOT NULL,
Claim_Outcome_Code int NOT NULL,
Customer_Polocy_ID int NOT NULL,
Date_Of_Claim DATE,
Date_Of_Statement DATE,
Amount_Claimed NUMBER,
Amount_Paid NUMBER,
Total_Policies_Revenue int,
Total_Claims_Settlements int,
Claim_Description VARCHAR2(255),
Other_Details VARCHAR2(255),
PRIMARY KEY (Claim_ID),
FOREIGN KEY (Claim_Outcome_Code)

REFERENCES Claims_Dimensional_Model

(Claim_Status_Code)

FOREIGN KEY (Claim_Policy_ID) REFERENCES

Poicies(Policy_ID)


);

CREATE TABLE Customers (
Customer_ID int NOT NULL,
First_name VARCHAR2(25),
Middle_name VARCHAR2(25),
Last_name VARCHAR2(25),
Date_Of_Birth DATE,
Gender_MFU VARCHAR2(1),
Mediciation VARCHAR2(255),
Medical_Conditions VARCHAR2(255),
Comments VARCHAR2(255),
Other_Details VARCHAR2(255),
PRIMARY KEY (Customer_ID),

);


CREATE TABLE Calendar (
  
Day_Date DATE,
Weak_Number NUMBER,
Month_Number NUMBER,
Year_Number NUMBER,
PRIMARY KEY (Day_Date),

);

CREATE TABLE Claims_Dimensional_Model (
Fact_ID int NOT NULL,
Claim_ID int NOT NULL,
Claim_Status_Code int NOT NULL,
Customer_ID int NOT NULL,
Date_Of_Claim DATE,
Date_Of_Statement DATE,
Employee_ID int NOT NULL,
Policy_ID int NOT NULL,
Reporting_Day_Date DATE,
Amount_Claimed NUMBER,
Amount_Paid NUMBER,
Total_Claims_Settlements int,
Other_Details VARCHAR2(255),
PRIMARY KEY (Fact_ID),
FOREIGN KEY (Claim_Status_Code)

REFERENCES Claims(Claim_Outcome_Code)

FOREIGN KEY (Claim_ID) REFERENCES Claims

(Claim_ID)

FOREIGN KEY (Customer_ID) REFERENCES

Custoomer(Customer_ID)
FOREIGN KEY (Date_Of_Claim) REFERENCES

Claims(Date_Of_Claim)
FOREIGN KEY (Date_Of_Statement) REFERENCES

Claims(Date_Of_Statement)
FOREIGN KEY (Employee_ID) REFERENCES

Employees(Employee_ID)
FOREIGN KEY (Policy_ID) REFERENCES Policies

(Policy_ID)
FOREIGN KEY (Reporting_Day_Date) REFERENCES

Calendar(Day_Date)

);


CREATE TABLE Employees (
  
Employee_ID int NOT NULL,
Employee_Details VARCHAR2(255),
PRIMARY KEY (Employee_ID),

);


CREATE TABLE Policies (
  
Policy_ID int NOT NULL,
Policy_Type_Cose int NOT NULL,
Start_Date DATE,
End_Date DATE,
Other Details VARCHAR2(255),
PRIMARY KEY (Policy_ID),

);


CREATE TABLE Ref_Claim_Staus(
  
Claim_Status_Code int NOT NULL,
  
Claim_Status_DescriptionDay_DateAR2(255)
PRIMARY KEY (Claim_Status_Code),

);