Автоматизированная система управления комбината БелшинаРефераты >> Программирование и компьютеры >> Автоматизированная система управления комбината Белшина
Constraint FK_AssignmentrecipientTT FOREIGN KEY (TimeTable_recipID) References TimeTable ( RecID ),
Constraint FK_AssignmentTimeTable FOREIGN KEY (TimeTableID) References TimeTable ( RecID ),
Constraint FK_AssignmentPlanAssignItem FOREIGN KEY (PlanAssignItemID) References PlanAssignItem ( RecID )
);
Alter Table CategTarife Add (
Constraint FK_CategTarifeTarife FOREIGN KEY (TarifeID) References Tarife ( RecID )
);
Alter Table CategTarifeLinks Add (
Constraint FK_CategTarifeLinksGP FOREIGN KEY (GroupProffesionID) References GroupProfession ( RecID ),
Constraint FK_CategTarifeLinksCT FOREIGN KEY (CategTarifeID) References CategTarife ( RecID )
);
Alter Table CategTarifItem Add (
Constraint FK_CategTarifItemTarifeItem FOREIGN KEY (TarifeItemID) References TarifeItem ( RecID ),
Constraint FK_CategTarifItemCT FOREIGN KEY (CategTarifeID) References CategTarife ( RecID )
);
Alter Table CContractItem Add (
Constraint FK_CContractItemCC FOREIGN KEY (CustomerContractID) References CustomerContract ( RecID ) ON DELETE CASCADE ,
Constraint FK_CContractItemPriceType FOREIGN KEY (PriceTypeID) References PriceType ( RecID ),
Constraint FK_CContractItemProduct FOREIGN KEY (ProductID) References Product ( RecID ),
Constraint FK_CContractItemDT FOREIGN KEY (DeliveryTypeID) References DeliveryType ( RecID ),
CONSTRAINT U_CContractItemU1 UNIQUE ( ItemNo, CustomerContractID)
);
Alter Table City Add (
Constraint FK_CityDistrict FOREIGN KEY (DistrictID) References District ( RecID ),
CONSTRAINT U_CityU1 UNIQUE ( CName, CityType, DistrictID)
);
Alter Table Coefficient Add (
Constraint FK_CoefficientComputation FOREIGN KEY (ComputationID) References Computation ( RecID )
);
Alter Table Country Add (
Constraint FK_CountryCurrency FOREIGN KEY (CurrencyID) References Currency ( RecID ),
CONSTRAINT U_CountryU1 UNIQUE ( Abbrev),
CONSTRAINT U_CountryCurrencyID UNIQUE ( CurrencyID)
);
Alter Table Covering Add (
Constraint FK_CoveringNeedPlanItem FOREIGN KEY (NeedPlanItemID) References NeedPlanItem ( RecID ),
Constraint FK_CoveringStock FOREIGN KEY (StockID) References Stock ( RecID ),
CONSTRAINT U_CoveringUL UNIQUE ( NeedPlanItemID, StockID)
);
Alter Table DAdepartment Add (
Constraint FK_DAdepartmentAddressee FOREIGN KEY (AddresseeID) References Addressee ( RecID ),
CONSTRAINT U_DAdepartmentAddresseeID UNIQUE ( )
);
Alter Table DateWork Add (
Constraint FK_DateWorkDispetcherStaff FOREIGN KEY (StaffID) References Staff ( RecID ),
Constraint FK_DateWorkOperatorStaff FOREIGN KEY (Staff_1ID) References Staff ( RecID ),
CONSTRAINT U_DateWorkU1 UNIQUE ( WorkDate)
);
Alter Table Department Add (
CONSTRAINT U_DepartmentU1 UNIQUE ( DepCode)
);
Alter Table Diploma Add (
Constraint FK_DiplomaStatusGrade FOREIGN KEY (StatusGradeID) References StatusGrade ( RecID ),
Constraint FK_DiplomaStaff FOREIGN KEY (StaffID) References Staff ( RecID ),
Constraint FK_DiplomaHSGradeShool FOREIGN KEY (HSGradeShoolID) References HSGradeShool ( RecID )
);
Alter Table DirtyWorks Add (
Constraint FK_DirtyWorksPlaceEmpAssoc FOREIGN KEY (PlaceEmpAssocID) References PlaceEmpAssoc ( RecID ),
Constraint FK_DirtyWorksDirtyType FOREIGN KEY (DirtyTypeID) References DirtyType ( RecID ),
Constraint FK_DirtyWorksOrders FOREIGN KEY (OrdersID) References Orders ( RecID )
);
Alter Table Dissmissed Add (
Constraint FK_DissmissedDissmissReason FOREIGN KEY (DissmissReasonID) References DissmissReason ( RecID ),
Constraint FK_DissmissedStaff FOREIGN KEY (StaffID) References Staff ( RecID ),
Constraint FK_DissmissedOrders FOREIGN KEY (OrdersID) References Orders ( RecID ),
CONSTRAINT U_DissmissedStaffID UNIQUE ( StaffID)
);
Alter Table Employee Add (
Constraint FK_EmployeeAddressee FOREIGN KEY (AddresseeID) References Addressee ( RecID ),
CONSTRAINT U_EmployeeU1 UNIQUE ( AddresseeID, FamilyName, FirstName, SecondName)
);
Alter Table GroupProfession Add (
CONSTRAINT U_GroupProfessionU1 UNIQUE ( GroupName)
);
Alter Table InPersonnel Add (
Constraint FK_InPersonnelStaff FOREIGN KEY (StaffID) References Staff ( RecID ),
Constraint FK_InPersonnelPersonStatus FOREIGN KEY (PersonStatusID) References PersonStatus ( RecID ),
CONSTRAINT U_InPersonnelStaffID UNIQUE ( StaffID)
);
Alter Table InquiryOfferAssoc Add (
Constraint FK_InquiryOfferAssocSII FOREIGN KEY (SuppInquiryItemID) References SuppInquiryItem ( RecID ),
Constraint FK_InquiryOfferAssocSOI FOREIGN KEY (SupplierOfferItemID) References SupplierOfferItem ( RecID ),
CONSTRAINT U_InquiryOfferAssocUL UNIQUE ( SuppInquiryItemID, SupplierOfferItemID)
);
Alter Table LostTime Add (
Constraint FK_LostTimeDirtyWorks FOREIGN KEY (DirtyWorksID) References DirtyWorks ( RecID ),
Constraint FK_LostTimeLostTimeType FOREIGN KEY (LostTimeTypeID) References LostTimeType ( RecID )
);
Alter Table Nationality Add (
CONSTRAINT U_NationalityU1 UNIQUE ( NationalCode)
);
Alter Table NonCategTarife Add (
Constraint FK_NonCategTarifeTarife FOREIGN KEY (TarifeID) References Tarife ( RecID )
);
Alter Table NonCategTarifItem Add (
Constraint FK_NonCategTarifItemP FOREIGN KEY (ProfessionID) References Profession ( RecID ),
Constraint FK_NonCategTarifItemTI FOREIGN KEY (TarifeItemID) References TarifeItem ( RecID ),
Constraint FK_NonCategTarifItemNCT FOREIGN KEY (NonCategTarifeID) References NonCategTarife ( RecID )
);
Alter Table Orders Add (
CONSTRAINT U_OrdersU1 UNIQUE ( OrderDate, OrderNumber)
);
Alter Table OrderType Add (
CONSTRAINT U_OrderTypeU1 UNIQUE ( Abbrev)
);
Alter Table OtherTarife Add (
Constraint FK_OtherTarifeTarife FOREIGN KEY (TarifeID) References Tarife ( RecID )
);
Alter Table OtherTarItem Add (
Constraint FK_OtherTarItemStaff FOREIGN KEY (StaffID) References Staff ( RecID ),
Constraint FK_OtherTarItemOtherTarife FOREIGN KEY (OtherTarifeID) References OtherTarife ( RecID )
);
Alter Table OutPersonnel Add (
Constraint FK_OutPersonnelStaff FOREIGN KEY (StaffID) References Staff ( RecID ),
CONSTRAINT U_OutPersonnelStaffID UNIQUE ( StaffID)
);
Alter Table Passes Add (
Constraint FK_PassesCountry FOREIGN KEY (CountryID) References Country ( RecID ),
Constraint FK_PassesStaff FOREIGN KEY (StaffID) References Staff ( RecID )
);
Alter Table Passport Add (
Constraint FK_PassportStaff FOREIGN KEY (StaffID) References Staff ( RecID ),
Constraint FK_PassportDAdepartment FOREIGN KEY (DAdepartmentID) References DAdepartment ( RecID ),
Constraint FK_PassportPassType FOREIGN KEY (PassTypeID) References PassType ( RecID )
);
Alter Table PassType Add (
CONSTRAINT U_PassTypeU1 UNIQUE ( PassTypeName)
);
Alter Table Pensioner Add (