Sunteți pe pagina 1din 6

13 | P a g i n a

3. CREAREA DEPOZITULUI DE DATE PE BAZA DE COMENZI SQL



CREATE TABLE [dbo].[Stari_angajati_DW](
[Id_stare_angajat] [int] NOT NULL,
[Denumire] [nvarchar](255) NULL,
CONSTRAINT [PK_Stari_angajati_DW] PRIMARY KEY CLUSTERED
(
[Id_stare_angajat] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE TABLE [dbo].[Ani_inceput_DW](
[An_inceput] [int] NOT NULL,
CONSTRAINT [PK_Ani_inceput_DW] PRIMARY KEY CLUSTERED
(
[An_inceput] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE TABLE [dbo].[Functii_DW](
[Functie] [nvarchar](255) NOT NULL,
CONSTRAINT [PK_Functii_DW] PRIMARY KEY CLUSTERED
(
[Functie] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE TABLE [dbo].[Tipuri_contract_DW](
[Tip_contract] [nvarchar](255) NOT NULL,
CONSTRAINT [PK_Tipuri_contract_DW] PRIMARY KEY CLUSTERED
(
[Tip_contract] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE TABLE [dbo].[Angajati_DW](
[Id_angajat] [int] NOT NULL,
[Nume_Prenume] [nvarchar](255) NULL,
CONSTRAINT [PK_Angajati_DW] PRIMARY KEY CLUSTERED
(
[Id_angajat] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]


14 | P a g i n a

CREATE TABLE [dbo].[Ani_DW](


[Id_an] [int] NOT NULL,
[Denumire] [nvarchar](255) NULL,
CONSTRAINT [PK_Ani_DW] PRIMARY KEY CLUSTERED
(
[Id_an] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE TABLE [dbo].[Luni_DW](
[Id_luna] [int] NOT NULL,
[Denumire] [nvarchar](255) NULL,
CONSTRAINT [PK_Luni_DW] PRIMARY KEY CLUSTERED
(
[Id_luna] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE TABLE [dbo].[Foaie_colectiva_prezenta_DW](
[Id_fcdp] [int] NOT NULL,
[Id_angajat] [int] NULL,
[Zi_01] [int] NULL,
[Zi_02] [int] NULL,
[Zi_03] [int] NULL,
[Zi_04] [int] NULL,
[Zi_05] [int] NULL,
[Zi_06] [int] NULL,
[Zi_07] [int] NULL,
[Zi_08] [int] NULL,
[Zi_09] [int] NULL,
[Zi_10] [int] NULL,
[Zi_11] [int] NULL,
[Zi_12] [int] NULL,
[Zi_13] [int] NULL,
[Zi_14] [int] NULL,
[Zi_15] [int] NULL,
[Zi_16] [int] NULL,
[Zi_17] [int] NULL,
[Zi_18] [int] NULL,
[Zi_19] [int] NULL,
[Zi_20] [int] NULL,
[Zi_21] [int] NULL,
[Zi_22] [int] NULL,
[Zi_23] [int] NULL,
[Zi_24] [int] NULL,
[Zi_25] [int] NULL,
[Zi_26] [int] NULL,
[Zi_27] [int] NULL,
[Zi_28] [int] NULL,
15 | P a g i n a

[Zi_29] [int] NULL,


[Zi_30] [int] NULL,
[Zi_31] [int] NULL,
[Id_an] [int] NULL,
[Id_luna] [int] NULL,
CONSTRAINT [PK_Foaie_colectiva_prezenta_DW] PRIMARY KEY CLUSTERED
(
[Id_fcdp] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE TABLE [dbo].[Registru_salariati_DW](
[Id_rues] [int] NOT NULL,
[Id_angajat] [int] NULL,
[Tip_contract] [nvarchar](255) NULL,
[An_inceput] [int] NULL,
[Id_stare_angajat] [int] NULL,
CONSTRAINT [PK_Registru_salariati_DW] PRIMARY KEY CLUSTERED
(
[Id_rues] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]



CREATE TABLE [dbo].[Contract_munca_DW](
[ID_cim] [int] NOT NULL,
[Id_angajat] [int] NULL,
[Functie] [nvarchar](255) NULL,
[Ore_zi] [int] NULL,
[Zile_concediu] [int] NULL,
[Salar_baza] [int] NULL,
[Zile_proba] [int] NULL,
[Aprecieri] [int] NULL,
[Deprecieri] [int] NULL,
CONSTRAINT [PK_Contract_munca_DW] PRIMARY KEY CLUSTERED
(
[ID_cim] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
16 | P a g i n a





17 | P a g i n a