update create and add mappings excel
This commit is contained in:
parent
c9e4b03ed5
commit
e1785ac40c
BIN
mapping.xlsx
Normal file
BIN
mapping.xlsx
Normal file
Binary file not shown.
@ -106,7 +106,7 @@ CREATE TABLE dim_countries (
|
||||
DROP TABLE IF EXISTS dim_claim_statuses;
|
||||
CREATE TABLE dim_claim_statuses (
|
||||
claim_status_sk INTEGER identity(1, 1) PRIMARY KEY,
|
||||
status_code_bk VARCHAR(1) NOT NULL, -- A for Accepted, D for Declined, W for Waiting
|
||||
status_code_bk NVARCHAR(1) NOT NULL, -- A for Accepted, D for Declined, W for Waiting
|
||||
status_description NVARCHAR(50)
|
||||
);
|
||||
GO
|
||||
@ -121,8 +121,8 @@ GO
|
||||
|
||||
DROP TABLE IF EXISTS claim_status_mapping;
|
||||
CREATE TABLE claim_status_mapping (
|
||||
status_code_bk VARCHAR(1),
|
||||
status_code_value VARCHAR(50)
|
||||
status_code_bk NVARCHAR(1),
|
||||
status_code_value NVARCHAR(50)
|
||||
);
|
||||
GO
|
||||
|
||||
@ -153,7 +153,7 @@ CREATE TABLE FT_Registration (
|
||||
--claim status do uspójnienia z tabelą dim_status, wydaje mi się, że można by dodać przedrostek claim do kolumn, będzie czytelniej :)
|
||||
claim_status_fk integer FOREIGN KEY REFERENCES dim_claim_statuses(claim_status_sk) NOT NULL,
|
||||
indication_fk integer FOREIGN KEY REFERENCES dim_indications(indication_sk) NOT NULL,
|
||||
claim_number NVARCHAR(50),
|
||||
claim_number VARCHAR(20),
|
||||
-- cnt jest tylko zliczeniowy, będzie miał 1, więc dałbym tinyint
|
||||
cnt tinyint,
|
||||
);
|
||||
@ -168,13 +168,12 @@ CREATE TABLE FT_Refund (
|
||||
response_time_fk integer FOREIGN KEY REFERENCES dim_time(time_sk), -- moze byc null
|
||||
country_fk integer FOREIGN KEY REFERENCES dim_countries(country_sk) NOT NULL,
|
||||
indication_fk integer FOREIGN KEY REFERENCES dim_indications(indication_sk) NOT NULL,
|
||||
registration_country_fk integer FOREIGN KEY REFERENCES dim_countries(country_sk) NOT NULL,
|
||||
--decimal zjada mniej, niż money, do przedyskutowania (precyzja - liczba miejsc przed i po przecinku, skala - liczba miejsc po przecinku)
|
||||
price money,
|
||||
reimbursement_amountPercent smallint,
|
||||
--tu obliczymy jako iloczyn price * reimbursement_amountPercent
|
||||
reimbursement_amount decimal(9,2),
|
||||
claim_number integer,
|
||||
claim_number VARCHAR(20),
|
||||
cnt tinyint,
|
||||
);
|
||||
GO
|
Loading…
Reference in New Issue
Block a user