NJC__Documentation::DB

dbo.dt_ms_item_daily_out_move_avg

Description

Properties

Name Value
Collation
File Group
Filestream File Group
Is Partitioned

False

Partitioned Column
Partition Scheme
File Groups
Filestream Partition Scheme
Filestream File Groups
Heap

False

Full Text Catalog
Full Text
Compression NONE
Row Count (~) 49238
Created 9/11/2017 09:42:00
Last Modified 7/17/2020 11:06:25

Columns

Key Name Data Type Length Precision Scale Not Null Identity Rule Default Computed Persisted Description
ms_item_out_move_avg_id bigint 8 19 0

True

1 - 1

False

False

ms_item_in_move_avg_id bigint 8 19 0

False

False

False

ms_date_business_id int 4 10 0

False

False

False

ms_item_id bigint 8 19 0

False

False

False

ms_item_h_price_id bigint 8 19 0

False

False

False

ms_cost_final_avg_id bigint 8 19 0

False

False

False

Indexes

Key Name Columns Unique Type Description
NonClusteredIndex-20200717-110508 ms_item_id

False

NonClusteredIndex-20200717-110519 ms_date_business_id

False

NonClusteredIndex-20200717-110529 ms_cost_final_avg_id

False

NonClusteredIndex-20200717-110617 ms_item_in_move_avg_id

False

PK_dt_ms_item_daily_out_move_avg ms_item_out_move_avg_id

True

Foreign Keys

Name Columns Description
FK_dt_ms_item_daily_out_move_avg_dt_ms_date_business ms_date_business_id
FK_dt_ms_item_daily_out_move_avg_dt_ms_item_daily_in_move_avg ms_item_in_move_avg_id

SQL Script

CREATE TABLE dbo.dt_ms_item_daily_out_move_avg (
  ms_item_out_move_avg_id bigint IDENTITY,
  ms_item_in_move_avg_id bigint NULL,
  ms_date_business_id int NULL,
  ms_item_id bigint NULL,
  ms_item_h_price_id bigint NULL,
  ms_cost_final_avg_id bigint NULL,
  CONSTRAINT PK_dt_ms_item_daily_out_move_avg PRIMARY KEY CLUSTERED (ms_item_out_move_avg_id)
)
ON [PRIMARY]
GO

CREATE INDEX [NonClusteredIndex-20200717-110508]
  ON dbo.dt_ms_item_daily_out_move_avg (ms_item_id)
  ON [PRIMARY]
GO

CREATE INDEX [NonClusteredIndex-20200717-110519]
  ON dbo.dt_ms_item_daily_out_move_avg (ms_date_business_id)
  ON [PRIMARY]
GO

CREATE INDEX [NonClusteredIndex-20200717-110529]
  ON dbo.dt_ms_item_daily_out_move_avg (ms_cost_final_avg_id)
  ON [PRIMARY]
GO

CREATE INDEX [NonClusteredIndex-20200717-110617]
  ON dbo.dt_ms_item_daily_out_move_avg (ms_item_in_move_avg_id)
  ON [PRIMARY]
GO

ALTER TABLE dbo.dt_ms_item_daily_out_move_avg WITH NOCHECK
  ADD CONSTRAINT FK_dt_ms_item_daily_out_move_avg_dt_ms_date_business FOREIGN KEY (ms_date_business_id) REFERENCES dbo.dt_ms_date_business (ms_date_business_id) NOT FOR REPLICATION
GO

ALTER TABLE dbo.dt_ms_item_daily_out_move_avg
  NOCHECK CONSTRAINT FK_dt_ms_item_daily_out_move_avg_dt_ms_date_business
GO

ALTER TABLE dbo.dt_ms_item_daily_out_move_avg WITH NOCHECK
  ADD CONSTRAINT FK_dt_ms_item_daily_out_move_avg_dt_ms_item_daily_in_move_avg FOREIGN KEY (ms_item_in_move_avg_id) REFERENCES dbo.dt_ms_item_daily_in_move_avg (ms_item_in_move_avg_id) NOT FOR REPLICATION
GO

ALTER TABLE dbo.dt_ms_item_daily_out_move_avg
  NOCHECK CONSTRAINT FK_dt_ms_item_daily_out_move_avg_dt_ms_item_daily_in_move_avg
GO