Database Design - Attributes Arrangement

  • Dear Experts,

    Please refer to the below schema for your kind perusal. I would like to know whether the colour highlighted attributes can be exist in the same table? because certain category items (Raw Material) doesn't have these characteristics.

    CREATE TABLE [RD].[StockItem](
        [StockItemID] [int] IDENTITY(1,1) NOT NULL,
        [StockCode] [varchar](50) NOT NULL,
        [Description1] [varchar](255) NOT NULL,
        [Description2] [varchar](255) NULL,
        [Description3] [varchar](255) NULL,
        [UnitMeasureID] [smallint] NOT NULL,
        [StockCategoryID] [smallint] NOT NULL,
        [StockSubCategoryID] [smallint] NOT NULL,
        [StockClassID] [smallint] NOT NULL,
        [ActualWeight] [smallmoney] NULL,
        [RecipeFormulationID] [smallint] NULL,
        [PostCuringTemperature] [smallint] NULL,
        [PostCuringTime] [smallint] NULL,

        [InternalNotes] [varchar](1000) NULL,
        [CastingWeight] [smallmoney] NULL,
        [InsertWeight] [smallmoney] NULL,
        [EpoxyWeight] [smallmoney] NULL,
        [WastageWeight] [smallmoney] NULL,
        [RequiredMaterialWeight] [smallmoney] NULL,

        [ObsoleteFlag] [bit] NULL,
        [ContainmentFlag] [bit] NULL,
        [StockStatusID] [tinyint] NOT NULL,
        [ModifiedDateTime] [smalldatetime] NULL
    CONSTRAINT [PK_StockItem_StockItemID] PRIMARY KEY NONCLUSTERED
    (
        [StockItemID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
    CONSTRAINT [UQ_StockItem_StockCode] UNIQUE CLUSTERED
    (
        [StockItemID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO

    Best Regards,

  • Please don't cross-post. Multiple people will answer on different threads and confuse the conversation. 

    Please post replies to here.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply