Автоматизированная система управления комбината Белшина
Рефераты >> Программирование и компьютеры >> Автоматизированная система управления комбината Белшина

Constraint FK_PensionerPensionType FOREIGN KEY (PensionTypeID) References PensionType ( RecID ),

Constraint FK_PensionerStaff FOREIGN KEY (StaffID) References Staff ( RecID ),

Constraint FK_PensionerOrders FOREIGN KEY (OrdersID) References Orders ( RecID ),

CONSTRAINT U_PensionerStaffID UNIQUE ( StaffID)

);

Alter Table PeriodAssign Add (

Constraint FK_PeriodAssignDepartment FOREIGN KEY (DepartmentID) References Department ( RecID )

);

Alter Table Place Add (

Constraint FK_PlaceProfession FOREIGN KEY (ProfessionID) References Profession ( RecID ),

Constraint FK_PlaceDepartment FOREIGN KEY (DepartmentID) References Department ( RecID ),

Constraint FK_PlaceTypeQuantity FOREIGN KEY (TypeQuantityID) References TypeQuantity ( RecID ),

Constraint FK_PlaceSalaryType FOREIGN KEY (SalaryTypeID) References SalaryType ( RecID )

);

Alter Table PlaceEmpAssoc Add (

Constraint FK_PlaceEmpAssocPlace FOREIGN KEY (PlaceID) References Place ( RecID ),

Constraint FK_PlaceEmpAssocAddressee FOREIGN KEY (AddresseeID) References Addressee ( RecID ),

Constraint FK_PlaceEmpAssocStaff FOREIGN KEY (StaffID) References Staff ( RecID ),

Constraint FK_PlaceEmpAssocOrders FOREIGN KEY (OrdersID) References Orders ( RecID ),

CONSTRAINT U_PlaceEmpAssocU1 UNIQUE ( DateStart, DateEnd, StaffID, PlaceID)

);

Alter Table Profession Add (

Constraint FK_ProfessionGP FOREIGN KEY (GroupProfessionID) References GroupProfession ( RecID ),

CONSTRAINT U_ProfessionU1 UNIQUE ( Code)

);

Alter Table QueueOfApartmentReceiver Add (

Constraint FK_QOARqueueingS FOREIGN KEY (Staff_queueingID) References Staff ( RecID ),

Constraint FK_QOARRDQ FOREIGN KEY (ReasonDissQueueID) References ReasonDissQueue ( RecID ),

CONSTRAINT U_QOARS_ID UNIQUE ( Staff_queueingID)

);

Alter Table Staff Add (

Constraint FK_StaffGrade FOREIGN KEY (GradeID) References Grade ( RecID ),

Constraint FK_StaffNationality FOREIGN KEY (NationalityID) References Nationality ( RecID ),

Constraint FK_Staffbirth_inCity FOREIGN KEY (City_birth_inID) References City ( RecID ),

Constraint FK_Stafflives_inCity FOREIGN KEY (City_lives_inID) References City ( RecID ),

Constraint FK_StaffMaritalStatus FOREIGN KEY (MaritalStatusID) References MaritalStatus ( RecID ),

CONSTRAINT U_StaffU1 UNIQUE ( FamilyName, FirstName, SecondName, LastPersonnellNo)

);

Alter Table StaffProfAssoc Add (

Constraint FK_StaffProfAssocProfession FOREIGN KEY (ProfessionID) References Profession ( RecID ),

Constraint FK_StaffProfAssocStaff FOREIGN KEY (StaffID) References Staff ( RecID )

);

Alter Table StaffQualAssoc Add (

Constraint FK_StaffQualAssocQ FOREIGN KEY (QualificacionID) References Qualificacion ( RecID ),

Constraint FK_StaffQualAssocStaff FOREIGN KEY (StaffID) References Staff ( RecID ),

CONSTRAINT U_StaffQualAssocUL UNIQUE ( QualificacionID, StaffID)

);

Alter Table StaffTable Add (

Constraint FK_StaffTableLostTimeType FOREIGN KEY (LostTimeTypeID) References LostTimeType ( RecID ),

Constraint FK_StaffTableStaff FOREIGN KEY (StaffID) References Staff ( RecID ),

Constraint FK_StaffTableTimeTable FOREIGN KEY (TimeTableID) References TimeTable ( RecID ),

Constraint FK_StaffTableOutPutesItem FOREIGN KEY (OutPutesItemID) References OutPutesItem ( RecID )

);

Alter Table Stock Add (

Constraint FK_StockStore FOREIGN KEY (StoreID) References Store ( RecID ),

Constraint FK_StockPart FOREIGN KEY (PartID) References Part ( RecID ),

Constraint FK_StockAccountPlan FOREIGN KEY (AccountPlanID) References AccountPlan ( RecID ),

CONSTRAINT U_StockU1 UNIQUE ( CardNo)

);

Alter Table StockAttrAssoc Add (

Constraint FK_StockAttrAssocStock FOREIGN KEY (StockID) References Stock ( RecID ),

Constraint FK_StockAttrAssocPA FOREIGN KEY (PartAttributeID) References PartAttribute ( RecID )

);

Alter Table StockDocItem Add (

Constraint FK_StockDocItemStock FOREIGN KEY (StockID) References Stock ( RecID ),

Constraint FK_StockDocItemDocumentItem FOREIGN KEY (DocumentItemID) References DocumentItem ( RecID )

);

Alter Table SuppPayAkkreditive Add (

Constraint FK_SuppPayAkkreditiveA FOREIGN KEY (AkkreditiveID) References Akkreditive ( RecID ),

Constraint FK_SuppPayAkkreditiveSP FOREIGN KEY (SuppPaymentID) References SuppPayment ( RecID ),

CONSTRAINT U_SuppPayAkkreditiveSPID UNIQUE ( SuppPaymentID, AkkreditiveID)

);

Alter Table SuppPayBooking Add (

Constraint FK_SuppPayBookingSP FOREIGN KEY (SuppPaymentID) References SuppPayment ( RecID ),

Constraint FK_SuppPayBookingBD FOREIGN KEY (BookkeepDocID) References BookkeepDoc ( RecID ),

CONSTRAINT U_SuppPayBookingBDID UNIQUE ( BookkeepDocID, SuppPaymentID)

);

Alter Table Tarife Add (

Constraint FK_TarifeOrders FOREIGN KEY (OrdersID) References Orders ( RecID )

);

Alter Table WorkersChild Add (

Constraint FK_WorkersChildhe_fatherS FOREIGN KEY (Staff_he_fatherID) References Staff ( RecID ),

Constraint FK_WorkersChildhe_motherS FOREIGN KEY (Staff_he_motherID) References Staff ( RecID ),

Constraint FK_WorkersChildisStaff FOREIGN KEY (Staff_isID) References Staff ( RecID ),

CONSTRAINT U_WorkersChildStaff_isID UNIQUE ( Staff_isID)

);


Страница: