Автоматизированная система управления комбината Белшина
желаемого эффекта линейные размеры экрана должны превосходить размеры
источника не менее чем в 2 - 3 раза. Экраны могут быть простой (в виде
листа), П - образной и других форм. Звукоизолирующую способность экрана
определяют экспериментально или с помощью расчётов. Она приводится в
литературе в виде таблиц для различных размеров экранов и расположения
рабочих мест /1/.
Например для задачи, приведённой в подразделе 5.2 для обеспечения
требуемого уровня снижения шума необходимо применить П - образный экран с
высотой 2.4 м, шириной основной части 2 м, шириной крыльев 1.5 м и
расположенный на расстоянии 1 м от источника шума.
Звукопоглощающая облицовка ограждающих поверхностей производных
помещений уменьшает интенсивность отраженных звуковых волн. Использование
звукопоглощающих конструкций позволяет снизить УЗ в зоне отраженного звука
на 4-8 дБ. В данном случае их можно использовать для первого рабочего при
частоте 500Гц.
Средний коэффициент звукопоглощения до устройства звукопоглощающей
облицовки определяется по формуле:
B
?ср = —————.
(5.9)
B + Sогр
Тогда ?ср = 0,031.
Величина требуемого звукопоглощения ?Атр равна 20м2.
Величина звукопоглощения необлицованных поверхностей определяется по
формуле:
А1 = ?ср ? Sогр.
(5.10)
Тогда А1 = 4,588м2.
Средний коэффициент звукопоглощения помещения после установки облицовки
определяется по формуле:
А1 + ?Атр
?1 = —————.
(5.11)
Sогр
Тогда ?1 = 0,166.
Постоянная помещения определяется по формуле:
А1 + ?Атр
В1 = —————.
(5.12)
1 — ?ср
Тогда В1 = 29,48м2.
Подставляя полученные значения в формулу (5.5) получаем значения
ожидаемых УЗД после размещения дополнительной звукоизоляции
1 · 1.6 4 · 1
L1 = 90 + 10lg ———— + ——— = 83 дБ,
25.12 20,48
из этого следует, что было снижено значение УЗ до допустимого уровня при
использовании П - образного экрана с высотой 2.4 м, шириной основной части
2 м, шириной крыльев 1.5 м и расположенного на расстоянии 1 м от источника
шума.
ЗАКЛЮЧЕНИЕ
В результате выполнения дипломной работы была проведена разработка
программного и информационных модулей АСУ персоналом в системе управления
Белорусским Шинным комбинатом.
Использование данной программы позволяет значительно повысить
эффективность работы отраслей Белорусского Шинного Комбината, через которые
проходят данные о персонале Белорусского Шинного Комбината, что достигается
автоматизацией программным модулем ручной работы с документами.
Разработанные концепции построения комплекса программ могут быть
использованы при построении остальных комплексов программ, образующих
информационную систему.
Разработка не имеет известных аналогов, что связано со спецификой
отрасли, где будет применяться разработка.
Применение данной разработки является экономически выгодным как для
разработчика, так и для потребителя разработки, что отражено в разделе
технико-экономического обоснования дипломной работы.
В настоящее время, разработанный комплекс в составе информационной
системы управления Белорусским Шинным Комбинатом, установлен в БШК
«Белшина».
В данной системе был разработан простой и удобный в использовании
интерфейс. Каждый шаг работы программы сопровождается подсказками, что
обеспечивает корректную работу оператора.
При использовании системы достигается существенное снижение
трудоемкости выполняемых операций и уменьшение затрат времени на их
выполнение за счет автоматизации обработки документации.
В результате проделанной работы описали объект автоматизации, выполнили
постановку задачи, описали функциональные возможности системы, структуру
информационной базы данных, разработали структуру диалога, программное и
организационное обеспечение.
Программный продукт выполняет все основные функции, описанные в
постановке задачи.
Все основные модули программы разработаны и написаны с использованием
простых алгоритмов и поэтому возможен выпуск более совершенных версий, в
которых основные модули будут разработаны с использованием более
совершенных и прогрессивных методов программирования.
Экономический эффект от реализации данной системы составит 12 948 218
руб. Срок окупаемости – один год.
Также рассмотрены вопросы охраны труда и экологической безопасности.
СПИСОК ИСПОЛЬЗОВАННЫХ ИСТОЧНИКОВ
1. Атре Ш., Структурный подход к организации баз данных. – М.: Финансы и
статистика, 1983. – 317 с.
2. Бобровски Ст., Oracle7 и вычисления клиент/сервер. – Alameda, CA, USA:
SYBEX Inc., 1996. – 420с.
3. Ричардс Майкл и др. Oracle 7.3. Энциклопедия пользователя: Пер. с
англ./Ричардс Майкл и др. – К.: Издательство «ДиаСофт», 1997. – 832с.
4. Сервер Oracle7(. Основные концепции. – Belmont, CA, USA: Oracle
Corporation, 1994. – 640с.
5. Сервер Oracle7(. Сервер. Справочное руководство по языку SQL. – Belmont,
CA, USA: Oracle Corporation, 1994. – 528с.
6. Сервер Oracle7(. Сообщения и коды ошибок. – Belmont, CA, USA: Oracle
Corporation, 1994. – 528с.
7. Методические указания по технико-экономическому обоснованию дипломных
проектов. / Сост. Елецких Т.В., Афитов Э.А., Палицын В.А., Феденя А.К.
-Мн.: БГУИР, 1996. ( 123с.
8. Методические указания по дипломному проектированию для студентов
специальности “Автоматизированные системы обработки информации”. / Сост.
Птичкин В.А., Никульшин Б.В. -Мн.: БГУИР, 1997. ( 33с.
9. ”Инженерные расчёты по защите от шума.” Методическое пособие по курсу
Охрана труда» для студентов всех специальностей. ( МРТИ, 1988.1
ПРИЛОЖЕНИЕ
ЛИСТИНГ ПРОГРАММЫ
Create Table Addressee (
AdditionalTelNumbers Varchar2(16) NULL ,
AddrName Varchar2(256) NOT NULL ,
Address Varchar2(256) NULL ,
CityID Number(10, 0) NOT NULL ,
Code Varchar2(16) NULL ,
Comments Varchar2(256) NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
EMail Varchar2(64) NULL ,
Fax Varchar2(16) NULL ,
NameAbbrev Varchar2(16) NULL ,
POBox Varchar2(64) NULL ,
RecID Number(10, 0) NOT NULL ,
Telephone Varchar2(16) NULL ,
Teletype Varchar2(64) NULL ,
TimeStamp Number(10, 0) NULL ,
WWW Varchar2(64) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
ZIPCode Varchar2(16) NULL ,
ZIPPOBox Varchar2(64) NULL ,
Constraint PK_Addressee PRIMARY KEY ( RecID ));
Create Table Asessment (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
DateAmnt date NULL ,
DateNextAmnt date NULL ,
Grade Varchar2(64) NULL ,
PerfomanceGrade Varchar2(64) NULL ,
RecID Number(10, 0) NOT NULL ,
StaffID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_Asessment PRIMARY KEY ( RecID ));
Create Table Assignment (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
PartID Number(10, 0) NOT NULL ,
PlanAssignItemID Number(10, 0) NULL ,
Quantity Number(18, 1) NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
TimeTableID Number(10, 0) NOT NULL ,
TimeTable_recipID Number(10, 0) NOT NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_Assignment PRIMARY KEY ( RecID ));
Create Table CategTarife (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
RecID Number(10, 0) NOT NULL ,
TarifeID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_CategTarife PRIMARY KEY ( RecID ));
Create Table CategTarifeLinks (
CategTarifeID Number(10, 0) NOT NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
GroupProffesionID Number(10, 0) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_CategTarifeLinks PRIMARY KEY ( RecID ));
Create Table CategTarifItem (
AddValue Number(18, 2) NULL ,
CategTarifeID Number(10, 0) NOT NULL ,
Category Varchar2(16) NOT NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
RecID Number(10, 0) NOT NULL ,
TarifeItemID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_CategTarifItem PRIMARY KEY ( RecID ));
Create Table CContractItem (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
CustomerContractID Number(10, 0) NOT NULL ,
DeliveryDate date NULL ,
DeliveryTypeID Number(10, 0) NOT NULL ,
ItemNo Varchar2(16) NULL ,
Price Number(18, 2) NULL ,
PriceTypeID Number(10, 0) NOT NULL ,
ProductID Number(10, 0) NOT NULL ,
Quantity Number(18, 1) NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_CContractItem PRIMARY KEY ( RecID ));
Create Table City (
CName Varchar2(64) NOT NULL ,
CityType Varchar2(64) NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
DefaultZIPCode Varchar2(16) NULL ,
DistrictID Number(10, 0) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
Telephone Varchar2(16) NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_City PRIMARY KEY ( RecID ));
Create Table Coefficient (
ComputationID Number(10, 0) NOT NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
Discriminator Varchar2(32) NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_Coefficient PRIMARY KEY ( RecID ));
CREATE TABLE O_Coefficient (
CoefficientID Number(10, 0) NOT NULL UNIQUE);
Create Table Country (
Abbrev Varchar2(64) NOT NULL ,
CntrName Varchar2(64) NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
CurrencyID Number(10, 0) NOT NULL ,
National Varchar2(64) NULL ,
RecID Number(10, 0) NOT NULL ,
Telephone Varchar2(16) NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_Country PRIMARY KEY ( RecID ));
Create Table Covering (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
NeedPlanItemID Number(10, 0) NOT NULL ,
Quantity Number(18, 1) NULL ,
RecID Number(10, 0) NOT NULL ,
StockID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_Covering PRIMARY KEY ( RecID ));
Create Table DAdepartment (
AddresseeID Number(10, 0) NOT NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_DAdepartment PRIMARY KEY ( RecID ));
Create Table DateWork (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
RecID Number(10, 0) NOT NULL ,
StaffID Number(10, 0) NOT NULL ,
Staff_1ID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WorkDate date NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_DateWork PRIMARY KEY ( RecID ));
Create Table Department (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
DateEnd date NULL ,
DateStart date NULL ,
DepCode Varchar2(16) NULL ,
DepName Varchar2(256) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
isnp Number(1) NOT NULL ,
Constraint PK_Department PRIMARY KEY ( RecID ));
Create Table Diploma (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
DateDistribution date NULL ,
DateEnd date NULL ,
DipNumber Varchar2(16) NULL ,
HSGradeShoolID Number(10, 0) NOT NULL ,
ProffessionName Varchar2(256) NULL ,
QualificationName Varchar2(256) NULL ,
RecID Number(10, 0) NOT NULL ,
StaffID Number(10, 0) NOT NULL ,
StatusGradeID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_Diploma PRIMARY KEY ( RecID ));
Create Table DirtyType (
CodeDirty Varchar2(16) NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
Description Varchar2(256) NULL ,
NameDirty Varchar2(64) NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_DirtyType PRIMARY KEY ( RecID ));
Create Table DirtyWorks (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
DirtyTypeID Number(10, 0) NOT NULL ,
OrdersID Number(10, 0) NOT NULL ,
PlaceEmpAssocID Number(10, 0) NOT NULL ,
QuantityDay Number(18, 1) NULL ,
RecID Number(10, 0) NOT NULL ,
TimePeriod Varchar2(64) NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_DirtyWorks PRIMARY KEY ( RecID ));
Create Table Dissmissed (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
DismissDate date NULL ,
DissmissReasonID Number(10, 0) NOT NULL ,
OrdersID Number(10, 0) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
StaffID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_Dissmissed PRIMARY KEY ( RecID ));
Create Table DissmissReason (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
LawArticle Varchar2(64) NULL ,
ReasonCode Varchar2(16) NULL ,
ReasonName Varchar2(64) NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_DissmissReason PRIMARY KEY ( RecID ));
Create Table Employee (
AdditionalTelNumbers Varchar2(16) NULL ,
AddresseeID Number(10, 0) NOT NULL ,
Comments Varchar2(256) NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
EMail Varchar2(64) NULL ,
EmpPosition Varchar2(64) NULL ,
FamilyName Varchar2(64) NOT NULL ,
Fax Varchar2(16) NULL ,
FirstName Varchar2(64) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
SecondName Varchar2(64) NOT NULL ,
Telephone Varchar2(16) NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_Employee PRIMARY KEY ( RecID ));
Create Table GroupProfession (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
GroupCode Varchar2(16) NULL ,
GroupName Varchar2(64) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_GroupProfession PRIMARY KEY ( RecID ));
Create Table InPersonnel (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
PersonStatusID Number(10, 0) NULL ,
RecID Number(10, 0) NOT NULL ,
StaffID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_InPersonnel PRIMARY KEY ( RecID ));
Create Table InquiryOfferAssoc (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
RecID Number(10, 0) NOT NULL ,
SuppInquiryItemID Number(10, 0) NOT NULL ,
SupplierOfferItemID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_InquiryOfferAssoc PRIMARY KEY ( RecID ));
Create Table LostTime (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
DirtyWorksID Number(10, 0) NOT NULL ,
LostTimeTypeID Number(10, 0) NOT NULL ,
ReasonLostTime Varchar2(64) NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_LostTime PRIMARY KEY ( RecID ));
Create Table LostTimeType (
Abbrev Varchar2(16) NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
TypeName Varchar2(64) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_LostTimeType PRIMARY KEY ( RecID ));
Create Table Nationality (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
NationalCode Varchar2(16) NOT NULL ,
NationalFemale Varchar2(64) NULL ,
NationalMale Varchar2(64) NULL ,
NationalityName Varchar2(64) NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_Nationality PRIMARY KEY ( RecID ));
Create Table NonCategTarife (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
RecID Number(10, 0) NOT NULL ,
TarifeID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_NonCategTarife PRIMARY KEY ( RecID ));
Create Table NonCategTarifItem (
AddValue Number(18, 2) NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
NonCategTarifeID Number(10, 0) NOT NULL ,
ProfessionID Number(10, 0) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
TarifeItemID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_NonCategTarifItem PRIMARY KEY ( RecID ));
Create Table Orders (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
Descriptions Varchar2(256) NOT NULL ,
OrderDate date NOT NULL ,
OrderNumber Varchar2(16) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_Orders PRIMARY KEY ( RecID ));
Create Table OrderState (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
OStateName Varchar2(64) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_OrderState PRIMARY KEY ( RecID ));
Create Table OrderType (
Abbrev Varchar2(16) NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
Description Varchar2(64) NULL ,
OTypeName Varchar2(64) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
freetransport Number(1) NULL ,
Constraint PK_OrderType PRIMARY KEY ( RecID ));
Create Table OtherTarife (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
RecID Number(10, 0) NOT NULL ,
TarifeID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_OtherTarife PRIMARY KEY ( RecID ));
Create Table OtherTarItem (
AddValue Number(18, 2) NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
OtherTarifeID Number(10, 0) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
StaffID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_OtherTarItem PRIMARY KEY ( RecID ));
Create Table OutPersonnel (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
RecID Number(10, 0) NOT NULL ,
StaffID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_OutPersonnel PRIMARY KEY ( RecID ));
Create Table Passes (
CountryID Number(10, 0) NOT NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
DateTrip date NOT NULL ,
RecID Number(10, 0) NOT NULL ,
StaffID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_Passes PRIMARY KEY ( RecID ));
Create Table Passport (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
DAdepartmentID Number(10, 0) NOT NULL ,
DateDistribution date NULL ,
DateValid date NULL ,
PassNumber Varchar2(64) NULL ,
PassTypeID Number(10, 0) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
Serial Varchar2(16) NULL ,
StaffID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_Passport PRIMARY KEY ( RecID ));
Create Table PassType (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
PassTypeName Varchar2(64) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_PassType PRIMARY KEY ( RecID ));
Create Table Pensioner (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
OrdersID Number(10, 0) NOT NULL ,
PensionTypeID Number(10, 0) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
StaffID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_Pensioner PRIMARY KEY ( RecID ));
Create Table PensionType (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
TypeName Varchar2(64) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_PensionType PRIMARY KEY ( RecID ));
Create Table Period (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
Date_Begin date NULL ,
Date_End date NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_Period PRIMARY KEY ( RecID ));
Create Table PeriodAssign (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
DateBegin date NOT NULL ,
DateEnd date NOT NULL ,
DepartmentID Number(10, 0) NOT NULL ,
NoAssign Varchar2(16) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_PeriodAssign PRIMARY KEY ( RecID ));
Create Table Place (
Category Varchar2(64) NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
DateEnd date NULL ,
DateStart date NULL ,
DepartmentID Number(10, 0) NOT NULL ,
Description Varchar2(256) NULL ,
PlName Varchar2(256) NOT NULL ,
ProfessionID Number(10, 0) NOT NULL ,
Quantity Number(18, 1) NULL ,
QuantityFree Number(18, 1) NULL ,
RecID Number(10, 0) NOT NULL ,
Salary Number(18, 1) NULL ,
SalaryTypeID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
TypeQuantityID Number(10, 0) NOT NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_Place PRIMARY KEY ( RecID ));
Create Table PlaceEmpAssoc (
AddresseeID Number(10, 0) NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
DateEnd date NULL ,
DateStart date NULL ,
OrdersID Number(10, 0) NULL ,
PersonnelNo Varchar2(16) NULL ,
PlaceID Number(10, 0) NULL ,
RecID Number(10, 0) NOT NULL ,
StaffID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WorkingPlace Varchar2(256) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
combinationwork Number(1) NULL ,
Constraint PK_PlaceEmpAssoc PRIMARY KEY ( RecID ));
Create Table Profession (
Classificator Varchar2(64) NULL ,
Code Varchar2(16) NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
GroupProfessionID Number(10, 0) NOT NULL ,
InGroup Varchar2(16) NULL ,
ProfName Varchar2(256) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_Profession PRIMARY KEY ( RecID ));
Create Table Qualificacion (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
Description Varchar2(256) NULL ,
QualName Varchar2(64) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_Qualificacion PRIMARY KEY ( RecID ));
Create Table QueueOfApartmentReceiver (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
DataOfQueueStan date NULL ,
DissDataOfQueue date NULL ,
NumberInQueue Varchar2(16) NULL ,
NumberOfApplica Varchar2(16) NULL ,
NumberOfManInFa Number(18, 1) NULL ,
ReasonDissQueueID Number(10, 0) NULL ,
RecID Number(10, 0) NOT NULL ,
Staff_queueingID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_QueueOfApartmentReceiver PRIMARY KEY ( RecID ));
Create Table ReasonDissQueue (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
ReasonName Varchar2(64) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_ReasonDissQueue PRIMARY KEY ( RecID ));
Create Table ReasonOfCreate (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
ReasonCode Varchar2(16) NULL ,
ReasonName Varchar2(64) NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_ReasonOfCreate PRIMARY KEY ( RecID ));
Create Table SalaryType (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
RecID Number(10, 0) NOT NULL ,
SalaryTypeName Varchar2(64) NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_SalaryType PRIMARY KEY ( RecID ));
Create Table Staff (
AdditionalTelNumbers Varchar2(64) NULL ,
City_birth_inID Number(10, 0) NULL ,
City_lives_inID Number(10, 0) NOT NULL ,
Comments Varchar2(256) NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
DateBeginNormalWork date NULL ,
DateBeginWork date NULL ,
DateBirth date NULL ,
DateHired date NULL ,
EMail Varchar2(64) NULL ,
FamilyName Varchar2(64) NULL ,
Fax Varchar2(64) NULL ,
FirstName Varchar2(64) NULL ,
GradeID Number(10, 0) NOT NULL ,
HomeAddress Varchar2(256) NULL ,
LastPersonnellNo Varchar2(16) NULL ,
Location Varchar2(64) NULL ,
MaritalStatusID Number(10, 0) NOT NULL ,
NationalityID Number(10, 0) NOT NULL ,
NoChildren Number(18, 1) NULL ,
RecID Number(10, 0) NOT NULL ,
ScienceDegree Varchar2(64) NULL ,
SecondName Varchar2(64) NULL ,
Sex Varchar2(16) NULL ,
Telephone Varchar2(64) NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_Staff PRIMARY KEY ( RecID ));
Create Table StaffProfAssoc (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
ProfGrade Varchar2(16) NULL ,
ProfessionID Number(10, 0) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
StaffID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_StaffProfAssoc PRIMARY KEY ( RecID ));
Create Table StaffQualAssoc (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
Grade Varchar2(64) NULL ,
QualificacionID Number(10, 0) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
StaffID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_StaffQualAssoc PRIMARY KEY ( RecID ));
Create Table StaffTable (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
LostTimeTypeID Number(10, 0) NULL ,
OutPutesItemID Number(10, 0) NULL ,
QtyHour Number(18, 1) NULL ,
RecID Number(10, 0) NOT NULL ,
StaffID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
TimeTableID Number(10, 0) NOT NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_StaffTable PRIMARY KEY ( RecID ));
Create Table StatusGrade (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
RecID Number(10, 0) NOT NULL ,
StatusName Varchar2(64) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_StatusGrade PRIMARY KEY ( RecID ));
Create Table Stock (
AccountPlanID Number(10, 0) NULL ,
CardNo Varchar2(16) NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
PartID Number(10, 0) NOT NULL ,
Price Number(18, 2) NULL ,
Qty Number(18, 1) NULL ,
RecID Number(10, 0) NOT NULL ,
StoreID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_Stock PRIMARY KEY ( RecID ));
Create Table StockAttrAssoc (
AttrValue Number(20, 10) NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
PartAttributeID Number(10, 0) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
StockID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_StockAttrAssoc PRIMARY KEY ( RecID ));
Create Table StockDocItem (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
DocumentItemID Number(10, 0) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
StockID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_StockDocItem PRIMARY KEY ( RecID ));
Create Table SuppPayAkkreditive (
AkkreditiveID Number(10, 0) NOT NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
RecID Number(10, 0) NOT NULL ,
SuppPaymentID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_SuppPayAkkreditive PRIMARY KEY ( RecID ));
Create Table SuppPayBooking (
BookkeepDocID Number(10, 0) NOT NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
RecID Number(10, 0) NOT NULL ,
SuppPaymentID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_SuppPayBooking PRIMARY KEY ( RecID ));
Create Table Tarife (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
DateBegin date NULL ,
DateEnd date NULL ,
Discriminator Varchar2(32) NULL ,
GroundSalValue Number(18, 2) NOT NULL ,
OrdersID Number(10, 0) NOT NULL ,
RecID Number(10, 0) NOT NULL ,
TarifeName Varchar2(64) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_Tarife PRIMARY KEY ( RecID ));
CREATE TABLE O_Tarife (
TarifeID Number(10, 0) NOT NULL UNIQUE);
Create Table TarifeItem (
AdditCaeff Number(20, 10) NULL ,
Caefficient Number(20, 10) NULL ,
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
Discriminator Varchar2(32) NULL ,
RecID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_TarifeItem PRIMARY KEY ( RecID ));
CREATE TABLE O_TarifeItem (
TarifeItemID Number(10, 0) NOT NULL UNIQUE);
Create Table WorkersChild (
CreatedBy Varchar2(31) NULL ,
CreatedWhen date NULL ,
RecID Number(10, 0) NOT NULL ,
Staff_he_fatherID Number(10, 0) NOT NULL ,
Staff_he_motherID Number(10, 0) NOT NULL ,
Staff_isID Number(10, 0) NOT NULL ,
TimeStamp Number(10, 0) NULL ,
WrittenBy Varchar2(31) NULL ,
WrittenWhen date NULL ,
Constraint PK_WorkersChild PRIMARY KEY ( RecID ));
Alter Table Akkreditive Add (
Constraint FK_AkkreditiveAddressee FOREIGN KEY (AddresseeID) References
Addressee ( RecID )
);
Alter Table Bank Add (
Constraint FK_BankAddressee FOREIGN KEY (AddresseeID) References Addressee
( RecID )
);
Alter Table Carrier Add (
Constraint FK_CarrierAddressee FOREIGN KEY (AddresseeID) References
Addressee ( RecID )
);
Alter Table CompanyAccount Add (
Constraint FK_CompanyAccountAddressee FOREIGN KEY (AddresseeID) References
Addressee ( RecID )
);
Alter Table CreditContract Add (
Constraint FK_CreditContractAddressee FOREIGN KEY (AddresseeID) References
Addressee ( RecID )
);
Alter Table Customer Add (
Constraint FK_CustomerAddressee FOREIGN KEY (AddresseeID) References
Addressee ( RecID )
);
Alter Table HSGradeShool Add (
Constraint FK_HSGradeShoolAddressee FOREIGN KEY (AddresseeID) References
Addressee ( RecID )
);
Alter Table OtherAddr Add (
Constraint FK_OtherAddrAddressee FOREIGN KEY (AddresseeID) References
Addressee ( RecID )
);
Alter Table Payer Add (
Constraint FK_PayerAddressee FOREIGN KEY (AddresseeID) References Addressee
( RecID )
);
Alter Table Recipient Add (
Constraint FK_RecipientAddressee FOREIGN KEY (AddresseeID) References
Addressee ( RecID )
);
Alter Table Supplier Add (
Constraint FK_SupplierAddressee FOREIGN KEY (AddresseeID) References
Addressee ( RecID )
);
Alter Table Wechsel Add (
Constraint FK_WechselAddressee FOREIGN KEY (AddresseeID) References
Addressee ( RecID )
);
Alter Table CTIDepartmentAssoc Add (
Constraint FK_CTIDepartmentAssocCTL FOREIGN KEY (CategTarifeLinksID)
References CategTarifeLinks ( RecID )
);
Alter Table COfferContrAssoc Add (
Constraint FK_COfferContrAssocCCI FOREIGN KEY (CContractItemID) References
CContractItem ( RecID )
);
Alter Table CustomerDelivery Add (
Constraint FK_CustomerDeliveryCCI FOREIGN KEY (CContractItemID) References
CContractItem ( RecID )
);
Alter Table ProdReservation Add (
Constraint FK_ProdReservationCCI FOREIGN KEY (CContractItemID) References
CContractItem ( RecID )
);
Alter Table Akzis Add (
Constraint FK_AkzisCoefficient FOREIGN KEY (CoefficientID) References
Coefficient ( RecID )
);
Alter Table CoeffRef Add (
Constraint FK_CoeffRefCoefficient FOREIGN KEY (CoefficientID) References
Coefficient ( RecID )
);
Alter Table CommonCost Add (
Constraint FK_CommonCostCoefficient FOREIGN KEY (CoefficientID) References
Coefficient ( RecID )
);
Alter Table SelfCost Add (
Constraint FK_SelfCostCoefficient FOREIGN KEY (CoefficientID) References
Coefficient ( RecID )
);
Alter Table District Add (
Constraint FK_DistrictCountry FOREIGN KEY (CountryID) References Country (
RecID )
);
Alter Table NationalAssoc Add (
Constraint FK_NationalAssocCountry FOREIGN KEY (CountryID) References
Country ( RecID )
);
Alter Table OfficialTrip Add (
Constraint FK_OfficialTripCountry FOREIGN KEY (CountryID) References
Country ( RecID )
);
Alter Table Document Add (
Constraint FK_DocumentDateWork FOREIGN KEY (DateWorkID) References DateWork
( RecID )
);
Alter Table TimeTable Add (
Constraint FK_TimeTableDateWork FOREIGN KEY (DateWorkID) References
DateWork ( RecID )
);
Alter Table BasisEquipment Add (
Constraint FK_BasisEquipmentDepartment FOREIGN KEY (DepartmentID)
References Department ( RecID )
);
Alter Table CTIDepartmentAssoc Add (
Constraint FK_CTIDepartmentAssocD FOREIGN KEY (DepartmentID) References
Department ( RecID )
);
Alter Table DepToShop Add (
Constraint FK_DepToShopDepartment FOREIGN KEY (DepartmentID) References
Department ( RecID )
);
Alter Table Equipment Add (
Constraint FK_EquipmentDepartment FOREIGN KEY (DepartmentID) References
Department ( RecID )
);
Alter Table MatIssueAux Add (
Constraint FK_MatIssueAuxDepartment FOREIGN KEY (DepartmentID) References
Department ( RecID )
);
Alter Table NCTIDepAssoc Add (
Constraint FK_NCTIDepAssocDepartment FOREIGN KEY (DepartmentID) References
Department ( RecID )
);
Alter Table NeedPlan Add (
Constraint FK_NeedPlanfromDepartment FOREIGN KEY (Department_fromID)
References Department ( RecID ),
Constraint FK_NeedPlantoDepartment FOREIGN KEY (Department_toID) References
Department ( RecID )
);
Alter Table OrderPlan Add (
Constraint FK_OrderPlanfromDepartment FOREIGN KEY (Department_fromID)
References Department ( RecID ),
Constraint FK_OrderPlantoDepartment FOREIGN KEY (Department_toID)
References Department ( RecID )
);
Alter Table OrgStructure Add (
Constraint FK_OrgStructureis_subD FOREIGN KEY (Department_is_subID)
References Department ( RecID ),
Constraint FK_OrgStructureis_superD FOREIGN KEY (Department_is_superID)
References Department ( RecID )
);
Alter Table Part Add (
Constraint FK_PartDepartment FOREIGN KEY (DepartmentID) References
Department ( RecID )
);
Alter Table PartTechOper Add (
Constraint FK_PartTechOperDepartment FOREIGN KEY (DepartmentID) References
Department ( RecID )
);
Alter Table PartTechProc Add (
Constraint FK_PartTechProcDepartment FOREIGN KEY (DepartmentID) References
Department ( RecID )
);
Alter Table Perpetrators Add (
Constraint FK_PerpetratorsDepartment FOREIGN KEY (DepartmentID) References
Department ( RecID )
);
Alter Table ProdRecDept Add (
Constraint FK_ProdRecDeptDepartment FOREIGN KEY (DepartmentID) References
Department ( RecID )
);
Alter Table ProductionPlan Add (
Constraint FK_ProductionPlanfromD FOREIGN KEY (Department_fromID)
References Department ( RecID ),
Constraint FK_ProductionPlantoD FOREIGN KEY (Department_toID) References
Department ( RecID )
);
Alter Table RemainsInShop Add (
Constraint FK_RemainsInShopDepartment FOREIGN KEY (DepartmentID) References
Department ( RecID )
);
Alter Table SelfCostItem Add (
Constraint FK_SelfCostItemDepartment FOREIGN KEY (DepartmentID) References
Department ( RecID )
);
Alter Table ShopToDep Add (
Constraint FK_ShopToDepDepartment FOREIGN KEY (DepartmentID) References
Department ( RecID )
);
Alter Table Store Add (
Constraint FK_StoreDepartment FOREIGN KEY (DepartmentID) References
Department ( RecID )
);
Alter Table TimeTable Add (
Constraint FK_TimeTableDepartment FOREIGN KEY (DepartmentID) References
Department ( RecID )
);
Alter Table CustomerContract Add (
Constraint FK_CustomerContractsignsE FOREIGN KEY (Employee_signsID)
References Employee ( RecID ),
Constraint FK_CustomerContractworks_onE FOREIGN KEY (Employee_works_onID)
References Employee ( RecID )
);
Alter Table SupplierContract Add (
Constraint FK_SupplierContractsignsE FOREIGN KEY (Employee_signsID)
References Employee ( RecID ),
Constraint FK_SupplierContractworks_onE FOREIGN KEY (Employee_works_onID)
References Employee ( RecID )
);
Alter Table NCTIDepAssoc Add (
Constraint FK_NCTIDepAssocNCTI FOREIGN KEY (NonCategTarifItemID) References
NonCategTarifItem ( RecID )
);
Alter Table Maternity Add (
Constraint FK_MaternityOrders FOREIGN KEY (OrdersID) References Orders (
RecID )
);
Alter Table CustomerContract Add (
Constraint FK_CustomerContractOS FOREIGN KEY (OrderStateID) References
OrderState ( RecID )
);
Alter Table OrderPlanItem Add (
Constraint FK_OrderPlanItemOrderState FOREIGN KEY (OrderStateID) References
OrderState ( RecID )
);
Alter Table ConditionsOfOType Add (
Constraint FK_ConditionsOfOTypeOT FOREIGN KEY (OrderTypeID) References
OrderType ( RecID )
);
Alter Table CustomerContract Add (
Constraint FK_CustomerContractOT FOREIGN KEY (OrderTypeID) References
OrderType ( RecID )
);
Alter Table AkzisItem Add (
Constraint FK_AkzisItemPeriod FOREIGN KEY (PeriodID) References Period (
RecID )
);
Alter Table CCostItem Add (
Constraint FK_CCostItemPeriod FOREIGN KEY (PeriodID) References Period (
RecID )
);
Alter Table CompItem Add (
Constraint FK_CompItemPeriod FOREIGN KEY (PeriodID) References Period (
RecID )
);
Alter Table Estimate Add (
Constraint FK_EstimatePeriod FOREIGN KEY (PeriodID) References Period (
RecID )
);
Alter Table NeedPlanItem Add (
Constraint FK_NeedPlanItemPeriod FOREIGN KEY (PeriodID) References Period (
RecID )
);
Alter Table OrderPlanItem Add (
Constraint FK_OrderPlanItemPeriod FOREIGN KEY (PeriodID) References Period
( RecID )
);
Alter Table ProductionPlan Add (
Constraint FK_PPPlanningPeriodP FOREIGN KEY (Period_PlanningPeriodID)
References Period ( RecID )
);
Alter Table Summary Add (
Constraint FK_SummaryPeriod FOREIGN KEY (PeriodID) References Period (
RecID )
);
Alter Table PartAssign Add (
Constraint FK_PartAssignPeriodAssign FOREIGN KEY (PeriodAssignID)
References PeriodAssign ( RecID )
);
Alter Table Contract Add (
Constraint FK_ContractPlaceEmpAssoc FOREIGN KEY (PlaceEmpAssocID)
References PlaceEmpAssoc ( RecID )
);
Alter Table Rubber Add (
Constraint FK_RubberReasonOfCreate FOREIGN KEY (ReasonOfCreateID)
References ReasonOfCreate ( RecID )
);
Alter Table RubberGlue Add (
Constraint FK_RubberGlueReasonOfCreate FOREIGN KEY (ReasonOfCreateID)
References ReasonOfCreate ( RecID )
);
Alter Table RubberImpregnant Add (
Constraint FK_RubberImpregnantROC FOREIGN KEY (ReasonOfCreateID) References
ReasonOfCreate ( RecID )
);
Alter Table RubberLubricant Add (
Constraint FK_RubberLubricantROC FOREIGN KEY (ReasonOfCreateID) References
ReasonOfCreate ( RecID )
);
Alter Table CustomerContract Add (
Constraint FK_CustomerContractsignsS FOREIGN KEY (Staff_signsID) References
Staff ( RecID ),
Constraint FK_CustomerContractworks_onS FOREIGN KEY (Staff_works_onID)
References Staff ( RecID )
);
Alter Table CustomerOffer Add (
Constraint FK_CustomerOfferStaff FOREIGN KEY (StaffID) References Staff (
RecID )
);
Alter Table Document Add (
Constraint FK_DocumentInStaff FOREIGN KEY (Staff_InID) References Staff (
RecID ),
Constraint FK_DocumentOutStaff FOREIGN KEY (Staff_OutID) References Staff (
RecID ),
Constraint FK_DocumentOwnerStaff FOREIGN KEY (Staff_OwnerID) References
Staff ( RecID )
);
Alter Table Maternity Add (
Constraint FK_MaternityStaff FOREIGN KEY (StaffID) References Staff ( RecID
)
);
Alter Table NationalAssoc Add (
Constraint FK_NationalAssocStaff FOREIGN KEY (StaffID) References Staff (
RecID )
);
Alter Table OutPutesItem Add (
Constraint FK_OutPutesItemStaff FOREIGN KEY (StaffID) References Staff (
RecID )
);
Alter Table Perpetrators Add (
Constraint FK_PerpetratorsStaff FOREIGN KEY (StaffID) References Staff (
RecID )
);
Alter Table PersonalCard Add (
Constraint FK_PersonalCardStaff FOREIGN KEY (StaffID) References Staff (
RecID )
);
Alter Table PrivateAccount Add (
Constraint FK_PrivateAccountStaff FOREIGN KEY (StaffID) References Staff (
RecID )
);
Alter Table StandingIdle Add (
Constraint FK_StandingIdleStaff FOREIGN KEY (StaffID) References Staff (
RecID )
);
Alter Table SupplierContract Add (
Constraint FK_SupplierContractsignsS FOREIGN KEY (Staff_signsID) References
Staff ( RecID ),
Constraint FK_SupplierContractworks_onS FOREIGN KEY (Staff_works_onID)
References Staff ( RecID )
);
Alter Table SupplierInvoice Add (
Constraint FK_SupplierInvoiceStaff FOREIGN KEY (StaffID) References Staff (
RecID )
);
Alter Table TimeTable Add (
Constraint FK_TimeTableStaff FOREIGN KEY (StaffID) References Staff ( RecID
)
);
Alter Table TransferOrder Add (
Constraint FK_TransferOrderStaff FOREIGN KEY (StaffID) References Staff (
RecID )
);
Alter Table TripCurrency Add (
Constraint FK_TripCurrencyStaff FOREIGN KEY (StaffID) References Staff (
RecID )
);
Alter Table RemainsInShop Add (
Constraint FK_RemainsInShopStock FOREIGN KEY (StockID) References Stock (
RecID )
);
Alter Table Reservation Add (
Constraint FK_ReservationStock FOREIGN KEY (StockID) References Stock (
RecID )
);
Alter Table Addressee Add (
Constraint FK_AddresseeCity FOREIGN KEY (CityID) References City ( RecID ),
CONSTRAINT U_AddresseeU1 UNIQUE ( AddrName, CityID)
);
Alter Table Asessment Add (
Constraint FK_AsessmentStaff FOREIGN KEY (StaffID) References Staff ( RecID
)
);
Alter Table Assignment Add (
Constraint FK_AssignmentPart FOREIGN KEY (PartID) References Part ( RecID
),
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 (
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)
);
Страницы: 1, 2, 3, 4
|