Hallo,
muß dringlichst (!) diese Daten ins Stars***ema übertragen und weiß nicht wie.
Folgende Ausgangsdaten:
1. Datentabelle
2. Dimensionen und Fakentabelle generieren
Das Stars***ema generiere ich wie folgt.
USE [dw-final_project];
GO
IF OBJECT_ID('DIM_WORK', 'U') IS NOT NULL
DROP TABLE DIM_WORK
CREATE TABLE DIM_WORK (
work_id int identity primary key,
workclass VARCHAR(100),
occupation VARCHAR(100),
income VARCHAR(100)
);
IF OBJECT_ID('DIM_EDUCATION', 'U') IS NOT NULL
DROP TABLE DIM_EDUCATION
CREATE TABLE DIM_EDUCATION (
education_id int identity primary key,
education VARCHAR(100),
[education-num] int
);
IF OBJECT_ID('DIM_ORIGIN', 'U') IS NOT NULL
DROP TABLE DIM_ORIGIN
CREATE TABLE DIM_ORIGIN (
origin_id int identity primary key,
race VARCHAR(100),
[native-country] VARCHAR(100),
sex VARCHAR(100)
);
IF OBJECT_ID('DIM_ACTUALSTATUS', 'U') IS NOT NULL
DROP TABLE DIM_ACTUALSTATUS
CREATE TABLE DIM_ACTUALSTATUS (
work_id int identity primary key ,
[marital-status] VARCHAR(100),
[relationship] VARCHAR(100)
);
IF OBJECT_ID('FACT_TABLE', 'U') IS NOT NULL
DROP TABLE FACT_TABLE
CREATE TABLE FACT_TABLE (
WORK_id integer,
EDUCATION_id integer,
ORIGIN_id integer,
ACTUALSTATUS_id integer,
age int,
demogweight numeric,
[capital-gain] numeric,
[capital-loss] numeric,
[hours-per-hour] int
);
Die FK-Zuweisungen und den zusammengesetzen PK für die Faktentabelle habe ich im Database Diagramm Designer gemacht, da ich auf dem manuellen Weg Errormeldungen bezüglich constraints bekam. Das Stars***ema steht nun:
Wie lade ich die Daten nun in das Star Schema?? Ich muß daraus dann noch einen Cube bilden, das ist aber nicht das Problem. Ich weiß einfach nicht wie ich die Daten ordentlich überführe. Wäre überaus dankbar, wenn mir jemand hilft!!
Vielen Dank im Voraus!!