This commit is contained in:
Agnieszka Gąbka-Buszek 2023-12-16 10:16:33 +01:00
commit 53cc8e48f4

View File

@ -79,17 +79,15 @@ CREATE TABLE `dim_service_type` (
CREATE TABLE `dim_staff` (
`staff_id` int PRIMARY KEY,
`first_name` varchar(64) ,
`last_name` varchar(64) ,
`full_name` varchar(64) ,
`address` varchar(64) ,
`address2` varchar(64) ,
`city` varchar(64) ,
`country` varchar(64) ,
`manager_id` int ,
`email` varchar(64)
);
CREATE TABLE `dim_cars` (
CREATE TABLE `dim_car` (
`inventory_id` int PRIMARY KEY,
`production_year` int ,
`model` varchar(64) ,
@ -97,10 +95,8 @@ CREATE TABLE `dim_cars` (
`fuel_type` varchar(64) ,
`license_plate` varchar(64) ,
`store_id` int ,
`purchase_price` DECIMAL ,
`sell_price` DECIMAL ,
`availability` varchar(64) ,
`sold` BOOLEAN
`is_rented` varchar(64) ,
`is_sold` varchar(64)
);
ALTER TABLE `fact_service` ADD CONSTRAINT `fact_service_fk0` FOREIGN KEY (`inventory_id`) REFERENCES `dim_cars`(`inventory_id`);