) NOTNULL,
[Quantity] [int] NOTNULL,
[CostPerUnit] [decimal] (18, 0) NOTNULL,
[MeasurementID] [int] NOTNULL, [PK_Resources] PRIMARYKEYCLUSTERED
(
[ID] ASC
) WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] (SELECT * FROMsys.indexesWHEREobject_id = OBJECT_I (N '[dbo]. [Resources]') ANDname = N'IX_FK_MeasurementResource ') [IX_FK_MeasurementResource] ON
[dbo]. [Resources]
(
[MeasurementID] ASC
) WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] (SELECT * FROMsys.foreign_keysWHEREobject_id = OBJE_ID (N '[dbo]. [FK_ProductExpenditure]') AND parent_object_id
= OBJECT_ID (N '[dbo]. [Expenditures]')) [dbo]. [Expenditures] WITHCHECKADDCONSTRAINT
[FK_ProductExpenditure] FOREIGNKEY ([ProductID]) [dbo]. [Products] ([ID]) [dbo]. [Expenditures] CHECKCONSTRAINT
= OBJECT_ID (N '[dbo]. [Expenditures] ")) [dbo]. [Expenditures] WITHCHECKADDCONSTRAINT
[FK_ResourceExpenditure] FOREIGNKEY ([ResourceID]) [dbo]. [Resources] ([ID]) [dbo]. [Expenditures] CHECKCONSTRAINT
= OBJECT_ID (N '[dbo]. [Orders]')) [dbo]. [Orders] WITHCHECKADDCONSTRAINT
[FK_CehOrder] FOREIGNKEY ([CehID]) [dbo]. [Cehs] ([ID]) [dbo]. [Orders] CHECKCONSTRAINT [FK_CehOrder] (SELECT * FROMsys.foreign_keysWHEREobject_id = OBJE_ID (N '[dbo]. [FK_ProductOrder]') AND parent_object_id
= OBJECT_ID (N '[dbo]. [Orders]')) [dbo]. [Orders] WITHCHECKADDCONSTRAINT
[FK_ProductOrder] FOREIGNKEY ([ProductID]) [dbo]. [Products] ([ID]) [dbo]. [Orders] CHECKCONSTRAINT parent_object_id
= OBJECT_ID (N '[dbo]. [Resources]')) [dbo]. [Resources] WITHCHECKADDCONSTRAINT
[FK_MeasurementResource] FOREIGNKEY ([MeasurementID]) [dbo]. [Measurements] ([ID]) [dbo]. [Resources] CHECKCONSTRAINT
[FK_MeasurementResource]