CREATE TABLE [dbo].[measurement_value] (
    [measurement_value_key]      INT           IDENTITY (1, 1) NOT NULL,
    [long_value]                 BIGINT        NULL,
    [decimal_value]              DECIMAL (18)  NULL,
    [character_value]            NVARCHAR (50) NULL,
    [date_value]                 DATETIME      NULL,
    [measurement_key]            INT           NULL,
    [measurement_value_type_key] INT           NULL,
    CONSTRAINT [PK_measurement_value] PRIMARY KEY CLUSTERED ([measurement_value_key] ASC),
    CONSTRAINT [measurement_value_measurement_FK] FOREIGN KEY ([measurement_key]) REFERENCES [dbo].[measurement] ([measurement_key]),
    CONSTRAINT [measurement_value_measurement_value_type_FK] FOREIGN KEY ([measurement_value_type_key]) REFERENCES [dbo].[measurement_value_type] ([measurement_value_type_key])
);

