.

Организация удаленного доступа к распределенным базам данных

Язык: русский
Формат: реферат
Тип документа: Word Doc
0 4624
Скачать документ

Niaea?aeaiea

TOC \o “1-3” Aaaaeaiea GOTOBUTTON _Toc390605495 PAGEREF
_Toc390605495 4

1. Iniiaiua iiaeoiaeu e i?iaeoe?iaaieth ?ani?aaeaeaiiuo aac aeaiiuo
GOTOBUTTON _Toc390605496 PAGEREF _Toc390605496 6

1.1 Iniiaiua iiiyoey oai?ee ?aeyoeeiiiuo aac aeaiiuo GOTOBUTTON
_Toc390605497 PAGEREF _Toc390605497 6

1.2 Na?aa? aacu aeaiiuo GOTOBUTTON _Toc390605498 PAGEREF
_Toc390605498 10

1.2.1 Oaoiieiaey e iiaeaee “eeeaio-na?aa?” GOTOBUTTON _Toc390605499
PAGEREF _Toc390605499 10

1.2.2 Iaoaieciu ?aaeecaoeee aeoeaiiai yae?a GOTOBUTTON _Toc390605500
PAGEREF _Toc390605500 19

1.2.3 O?aieiua i?ioeaaeo?u GOTOBUTTON _Toc390605501 PAGEREF
_Toc390605501 20

1.2.4 I?aaeea (o?eaaa?u) GOTOBUTTON _Toc390605502 PAGEREF
_Toc390605502 21

1.2.5 Iaoaieci niauoee GOTOBUTTON _Toc390605503 PAGEREF
_Toc390605503 21

1.3 Ia?aaioea ?ani?aaeaeaiiuo aeaiiuo GOTOBUTTON _Toc390605504
PAGEREF _Toc390605504 22

1.4 Acaeiiaeaenoaea n PC-i?eaioe?iaaiiuie NOAAe GOTOBUTTON
_Toc390605505 PAGEREF _Toc390605505 30

1.5 Ia?aaioea o?aicaeoeee GOTOBUTTON _Toc390605506 PAGEREF
_Toc390605506 33

1.6 N?aaenoaa caueou aeaiiuo a NOAAe GOTOBUTTON _Toc390605507
PAGEREF _Toc390605507 37

1.7 I?eiaiaiea CASE-n?aaenoa aeey eioi?iaoeeiiiiai iiaeaee?iaaiey a
nenoaiao ia?aaioee aeaiiuo . GOTOBUTTON _Toc390605508 PAGEREF
_Toc390605508 41

2. ?aaeecaoeey ?ani?aaeaeaiiie aacu aeaiiuo n oaeaeaiiui aeinooiii
GOTOBUTTON _Toc390605509 PAGEREF _Toc390605509 43

2.1 Aiaeec nouanoaothuae nenoaiu GOTOBUTTON _Toc390605510 PAGEREF
_Toc390605510 44

2.2 Iiaay noaia iaiaia eioi?iaoeeae GOTOBUTTON _Toc390605511
PAGEREF _Toc390605511 45

2.3 Auai? iia?aoeeiiiie nenoaiu GOTOBUTTON _Toc390605512 PAGEREF
_Toc390605512 47

2.4 Auai? na?aa?a aac aeaiiuo GOTOBUTTON _Toc390605513 PAGEREF
_Toc390605513 48

2.5 Auai? n?aaenoa ?ac?aaioee GOTOBUTTON _Toc390605514 PAGEREF
_Toc390605514 55

2.6 I?aaiecaoeey acaeiiaeaenoaey iaaeaeo na?aa?aie GOTOBUTTON
_Toc390605515 PAGEREF _Toc390605515 56

2.6.1 Auai? iiaeaee ?ani?aaeaeaiiie aacu aeaiiuo GOTOBUTTON
_Toc390605516 PAGEREF _Toc390605516 56

2.6.2 Iiaeaeue acaeiiaeaenoaey GOTOBUTTON _Toc390605517 PAGEREF
_Toc390605517 56

2.6.3 Eniieueciaaiea neiy RPC aeey ?ani?aaeaeaiiie ia?aaioee aeaiiuo ia
ieaooi?ia Windows NT GOTOBUTTON _Toc390605518 PAGEREF _Toc390605518
57

2.6.4 Eiiiiiaiou Microsoft RPC GOTOBUTTON _Toc390605519 PAGEREF
_Toc390605519 57

2.6.5 Iaoaieci ?aaiou RPC GOTOBUTTON _Toc390605520 PAGEREF
_Toc390605520 58

2.6.6 I?aaiecaoeey eiae/aneiai eaiaea ia?aaea/e aeaiiuo GOTOBUTTON
_Toc390605521 PAGEREF _Toc390605521 61

2.7 I?aaiecaoeey aeinooia oaeaeaiiuo iieueciaaoaeae GOTOBUTTON
_Toc390605522 PAGEREF _Toc390605522 61

2.7.1 Iaiaoiaeeiinoue oaeaeaiiiai aeinooia GOTOBUTTON _Toc390605523
PAGEREF _Toc390605523 61

2.7.2 Eniieueciaaiea neiy RAS aeey oaeaeaiiiai aeinooia ia ieaooi?ia
Windows NT GOTOBUTTON _Toc390605524 PAGEREF _Toc390605524 61

2.7.3 Iaania/aiea eioi?iaoeeiiiie aaciianiinoe i?e oaeaeaiiii aeinooia
GOTOBUTTON _Toc390605525 PAGEREF _Toc390605525 63

2.8 I?iaeoe?iaaiea no?oeoo?u aacu aeaiiuo GOTOBUTTON _Toc390605526
PAGEREF _Toc390605526 63

2.9 Noaia ?aieeeaoeee aeaiiuo GOTOBUTTON _Toc390605527 PAGEREF
_Toc390605527 65

2.10 I?iaeoe?iaaiea eiiioieeaoeeiiiiai na?aa?a GOTOBUTTON
_Toc390605528 PAGEREF _Toc390605528 67

2.10.1 Iinoaiiaea caaea/e GOTOBUTTON _Toc390605529 PAGEREF
_Toc390605529 67

2.10.2 A?oeoaeoo?a eiiioieeaoeeiiiiai na?aa?a GOTOBUTTON _Toc390605530
PAGEREF _Toc390605530 68

2.10.3 Aniiiiaaoaeueiia i?ia?aiiiia iaania/aiea GOTOBUTTON
_Toc390605531 PAGEREF _Toc390605531 70

3. Oaoieei-yeiiiie/aneia iainiiaaiea GOTOBUTTON _Toc390605532
PAGEREF _Toc390605532 71

3.1 Ieai auiieiaiey aeeieiiiiai i?iaeoa GOTOBUTTON _Toc390605533
PAGEREF _Toc390605533 71

3.2 ?an/ao iaeeaeaaiie i?iaeieaeeoaeueiinoe auiieiaiey ?aaio e eo
aeenia?nee GOTOBUTTON _Toc390605534 PAGEREF _Toc390605534 73

3.3 Iino?iaiea eaioi/iiai a?aoeea auiieiaiey ?aaiou GOTOBUTTON
_Toc390605535 PAGEREF _Toc390605535 74

3.4 Ii?aaeaeaiea ieaiiaie naaanoieiinoe IE? GOTOBUTTON _Toc390605536
PAGEREF _Toc390605536 76

Caeeth/aiea GOTOBUTTON _Toc390605537 PAGEREF _Toc390605537 79

Nienie eeoa?aoo?u GOTOBUTTON _Toc390605538 PAGEREF _Toc390605538
80

I?eeiaeaiea 1 GOTOBUTTON _Toc390605539 PAGEREF _Toc390605539 82

I?eeiaeaiea 2 GOTOBUTTON _Toc390605540 PAGEREF _Toc390605540 131

I?eeiaeaiea 3 GOTOBUTTON _Toc390605541 PAGEREF _Toc390605541 132

I?eeiaeaiea 4 GOTOBUTTON _Toc390605542 PAGEREF _Toc390605542 156

I?eeiaeaiea 5 GOTOBUTTON _Toc390605543 PAGEREF _Toc390605543 159

I?eeiaeaiea 6 GOTOBUTTON _Toc390605544 PAGEREF _Toc390605544 162

Aaaaeaiea

A ianoiyuaa a?aiy a nayce n oneiaeiaieai i?ioeanna i?eiyoey ?aoaiee a
nia?aiaiiii aeciana oniao i?aaei?eyoey iai?yioth caaeneo io oiai, eae
auno?i e neaaeaiii acaeiiaeaenoaotho aai no?oeoo?u. A iao aae iaiai
eioi?iaoeeae iaiuneei aac nia?aiaiiuo n?aaenoa nayce. Iaeii ec oaeeo
n?aaenoa – nia?aiaiiua aeiaaeueiua eiiiuethoa?iua naoe. Naoe – aaaeiay
/anoue a?oiiiaiai acaeiiaeaenoaey, oae eae iie iicaieytho auno?i e
yooaeoeaii iaiaieaaoueny eioi?iaoeeae. Ii ?aaeueiua naoe eiatho
iaaeinoaoee. ?ani?aaeaeaiiay naoue i?aaenoaaeyao niaie e?aeia
iaiaeii?iaeioth n?aaeo ia?aaea/e aeaiiuo: iaeie o/anoee iiaoo auoue
iino?iaiu ii oaoiieiaeyi ATM eee FDDI, ae?oaea – ia aaca iaaeeaiiuo
i?ioieieia X.25. ?aaeueiay nei?inoue ia?aaea/e aeaiiuo a oaeie n?aaea
aoaeao iai?yioth caaenaoue io i?iioneiie niiniaiinoe naiiai iaaeeaiiiai
o/anoea naoe. Oaeei ia?acii, aeinooi oaeaeaiiiai iieueciaaoaey e
ei?ii?aoeaiie aaca aeaiiuo eiiaaea iiaeao auoue nouanoaaiii cao?oaeiai.

N ae?oaie noi?iiu: anaaaea ee iaiaoiaeei oaeaeaiiiio iieueciaaoaeth
iieiue aeinooi ei anae aaca aeaiiuo? A aieueoeinoaa neo/aaa
cai?aoeaaaony oieueei oa eioi?iaoeey, eioi?ay iai?yioth ioiineony e aai
noa?a aeayoaeueiinoe. Eo/oei ?aoaieai iiaeao yaeyoueny ia?aiin /anoe
aacu aeeaea e iieueciaaoaeyi. I?e ?aoaiee yoie caaea/e iiaeiaiui
niiniaii iieo/aaony oa??eoi?eaeueii ?ani?aaeaeaiiay aaca aeaiiuo.
I?aaiecaoeey ?ani?aaeaeaiiie aacu aeaiiuo aeaao ianno i?aeiouanoa:
nieaeaaony a?aiy ioeeeea nenoaiu, iiauoaaony iaaeaaeiinoue o?aiaiey
aeaiiuo, oiaiueoaaony noieiinoue aiia?aoiie /anoe ca n/ao nieaeaiey
iauaiia aeaiiuo, o?aiyueony ia iaeiii na?aa?a.

Yooaeoeaiinoue oaeie eioi?iaoeeiiiie nenoaiu iai?yioth caaeneo io
eioaineaiinoe o?aoeea: /ai ii ieaea, oai auno?aa ieoiathony n?aaenoaa,
aeiaeaiiua a a? iino?iaiea. Eeth/ii e oniaoiie ?aaeecaoeee yoeo nenoai
yaeyaony i?aaeeueiay i?aaiecaoeey ?ani?aaeaeaiey e o?aiaiey eioi?iaoeee.
Eaeaaeueiui niiniaii nieaeaiey o?aoeea a eaiaeao nayce yaeyaony
eniieueciaaiea oaoiieiaee «eeeaio-na?aa?», iieo/eaoae a iineaaeiea aiaeu
oe?ieia ?ani?ino?aiaiea.

A aeeieiiiii i?iaeoa ?anniio?aiu iauea iiaeoiaeu e ?aaeecaoeee
?ani?aaeaeaiiuo nenoai ia?aaioee aeaiiuo ia aaca oaoiieiaee
eeeaio-na?aa?, a oaeaea caaea/a nicaeaiey aeaenoaothuae eioi?iaoeeiiiie
nenoaiu ia i?eia?a nenoaiu aaoiiaoecaoeee ?an/aoia n aaiiaioaie AI
«Naycueeioi?i» ?I. Aeooaeueiinoue iino?iaiey yoie nenoaiu iaoneiaeaia
?aceei ?inoii eiee/anoaa i?aaeinoaaeyaiuo oneoa nayce, a oaeaea
ia?aoiaeii iaeioi?uo ?aeiiia ia iia?aiaiioth nenoaio oa?eoeeaoeee
?acaiai?ia.

A i?ioeanna iaienaiey aeeieiiiie ?aaiou aaoi?ii aaeanue ?ac?aaioea
a?oeoaeoo?u eioi?iaoeeiiiie nenoaiu, iaoaiecia ?aieeeaoeee aeaiiuo,
n?aaenoa oaeaeaiiiai aeinooia e oaeaeaiiiai aaeieieno?e?iaaiey nenoaiu,
no?oeoo?u AAe, a oaeaea iaeioi?uo eiiiiiaioia eeeaioneie /anoe nenoaiu
(ni?aai/iie neoaeau e ea?oioaee aaiiaioia).

1. Iniiaiua iiaeoiaeu e i?iaeoe?iaaieth ?ani?aaeaeaiiuo aac aeaiiuo

1.1 Iniiaiua iiiyoey oai?ee ?aeyoeeiiiuo aac aeaiiuo

A oceii niunea neiaa, aaca aeaiiuo – yoi iaeioi?ue iaai? aeaiiuo,
iaiaoiaeeiuo aeey ?aaiou (aeooaeueiua aeaiiua). Aeaiiua – yoi io?aaeaiea
iauaeoia ?aaeueiiai ie?a. A o?aaeeoeeiiiie oa?ieiieiaee iauaeou
?aaeueiiai ie?a, naaaeaiey i eioi?uo o?aiyony a aaca aeaiiuo,
iacuaathony nouiinoyie – entities, a eo aeooaeueiua i?eciaee –
ao?eaooaie (attributes). Eaaeaeue i?eciae eiie?aoiiai iauaeoa anoue
cia/aiea ao?eaooa.

A aaca aeaiiuo io?aaeathony ia oieueei oece/aneea iauaeou. Iia niiniaia
o?aieoue naaaeaiey ia aano?aeoeeyo, i?ioeannao, yaeaieyo – oi anoue iai
anai, n /ai noaeeeaaaony /aeiaae a naiae aeayoaeueiinoe. Oae, iai?eia?,
a aaca aeaiiuo iiaeii o?aieoue eioi?iaoeeth i caeacao ia iinoaaeo
aeaoaeae ia neeaae (oioy yoi ia oece/aneee iauaeo, a i?ioeann).
Ao?eaooaie nouiinoe “caeac” aoaeoo iacaaiea iinoaaeyaiie aeaoaee,
eiee/anoai aeaoaeae, iacaaiea iinoaaueea, n?ie iinoaaee e o.ae. Iauaeou
?aaeueiiai ie?a naycaiu ae?oa n ae?oaii iiiaeanoaii neiaeiuo
caaeneiinoae, eioi?ua iaiaoiaeeii o/eouaaoue a eioi?iaoeeiiiie
aeayoaeueiinoe. Ioiaoei, /oi a aaca aeaiiuo ioaeii o?aieoue oieueei
aeooaeueiua, cia/eiua nayce.

Oaeei ia?acii, a oe?ieii niunea neiaa aaca aeaiiuo – yoi niaieoiiinoue
iienaiee iauaeoia ?aaeueiiai ie?a e naycae iaaeaeo ieie, aeooaeueiuo
aeey eiie?aoiie i?eeeaaeiie iaeanoe.

Niinia, n iiiiuueth eioi?iai nouiinoe, ao?eaoou e nayce ioia?aaeathony
ia no?oeoo?u ii?aaeaeyaony iiaeaeueth aeaiiuo.

O?aaeeoeeiiii ana NOAAe eeanneoeoee?othony a caaeneiinoe io iiaeaee
aeaiiuo, eioi?ay eaaeeo a eo iniiaa. I?eiyoi auaeaeyoue ea?a?oe/aneoth,
naoaaoth e ?aeyoeeiiioth iiaeaee aeaiiuo. Eiiaaea e iei aeiaaaeytho
iiaeaeue aeaiiuo ia iniiaa eiaa?oe?iaaiiuo nieneia. Niioaaonoaaiii
aiai?yo ia ea?a?oe/aneeo, naoaauo, ?aeyoeeiiiuo NOAAe eee i NOAAe ia
aaca eiaa?oe?iaaiiuo nieneia.

Naiuie ?ani?ino?aiaiiuie ia naaiaeiyoiee aeaiue yaeythony ?aeyoeeiiiua
NOAAe. Iie noaee oaeoe/aneei i?iiuoeaiiui noaiaea?oii. E?aoei ?anniio?ei
?aeyoeeiiioth iiaeaeue aeaiiuo, ia aieeay a aa aeaoaee.

Iia auea ?ac?aaioaia Eiaeaeii aua a 1969-70 aiaeao ia iniiaa
iaoaiaoe/aneie oai?ee ioiioaiee e iie?aaony ia nenoaio iiiyoee,
aaaeiaeoeie ec eioi?uo yaeythony oaaeeoea, ioiioaiea, no?iea, noieaaoe,
ia?ae/iue eeth/, aiaoiee eeth/.

?aeyoeeiiiie n/eoaaony oaeay aaca aeaiiuo, a eioi?ie ana aeaiiua
i?aaenoaaeaiu aeey iieueciaaoaey a aeaea i?yiioaieueiuo oaaeeoe cia/aiee
aeaiiuo, e ana iia?aoeee iaae aacie aeaiiuo naiaeyony e iaieioeyoeeyi n
oaaeeoeaie. Oaaeeoea ninoieo ec no?ie e noieaoeia e eiaao eiy,
oieeaeueiia aioo?e aacu aeaiiuo. Oaaeeoea io?aaeaao oei iauaeoa
?aaeueiiai ie?a (nouiinoue), a eaaeaeay aa no?iea – eiie?aoiue iauaeo.

Cia/aiey ao?eaooia auae?athony ec iiiaeanoaa aeiionoeiuo cia/aiee,
eioi?ia iacuaaaony aeiiaiii (domain).

Eaaeaeue noieaaoe eiaao eiy, eioi?ia iau/ii caienuaaaony a aa?oiae /anoe
oaaeeoeu. Iii aeieaeii auoue oieeaeueiui a oaaeeoea, iaeiaei ?acee/iua
oaaeeoeu iiaoo eiaoue noieaoeu n iaeeiaeiauie eiaiaie. Ethaay oaaeeoea
aeieaeia eiaoue ii e?aeiae ia?a iaeei noieaaoe; noieaoeu ?aniieiaeaiu a
oaaeeoea a niioaaonoaee n ii?yaeeii neaaeiaaiey eo eiai i?e aa
nicaeaiee. A ioee/ea io noieaoeia, no?iee ia eiatho eiai; ii?yaeie eo
neaaeiaaiey a oaaeeoea ia ii?aaeaeai, a eiee/anoai eiae/anee ia
ia?aie/aii.

Oae eae no?iee a oaaeeoea ia oii?yaei/aiu, iaaiciiaeii aua?aoue no?ieo
ii aa iiceoeee. E?iia oiai, i?eaycea e iiia?o no?iee iaei??aeoia a
iiiaiiieueciaaoaeueneeo NOAAe. Ethaay oaaeeoea eiaao iaeei eee
ianeieueei noieaoeia, cia/aiey a eioi?uo iaeiicia/ii eaeaioeoeoee?otho
eaaeaeoth aa no?ieo. Oaeie noieaaoe (eee eiiaeiaoeey noieaoeia)
iacuaaaony ia?ae/iui eeth/ii (primary key). Anee oaaeeoea oaeiaeaoai?yao
yoiio o?aaiaaieth, iia iacuaaaony ioiioaieai (relation).

Acaeiinaycue oaaeeoe yaeyaony aaaeiaeoei yeaiaioii ?aeyoeeiiiie iiaeaee
aeaiiuo. Iia iiaeaea?aeeaaaony aiaoieie eeth/aie (foreign key).

Oaaeeoeu iaaiciiaeii o?aieoue e ia?aaaouaaoue, anee a aaca aeaiiuo
ionoonoaotho “aeaiiua i aeaiiuo”, iai?eia?, iienaoaee oaaeeoe, noieaoeia
e o.ae. Eo iacuaatho iau/ii iaoaaeaiiuie. Iaoaaeaiiua oaeaea
i?aaenoaaeaiu a oaaee/iie oi?ia e o?aiyony a neiaa?a aeaiiuo (data
dictionary).

Iiieii oaaeeoe, a aaca aeaiiuo iiaoo o?aieoueny e ae?oaea iauaeou, oaeea
eae ye?aiiua oi?iu, io/aou (reports), i?aaenoaaeaiey (views) e aeaaea
i?eeeaaeiua i?ia?aiiu, ?aaioathuea n aacie aeaiiuo.

Aeey iieueciaaoaeae eioi?iaoeeiiiie nenoaiu iaaeinoaoi/ii, /oiau aaca
aeaiiuo i?inoi io?aaeaea iauaeou ?aaeueiiai ie?a. Aaaeii, /oiau oaeia
io?aaeaiea auei iaeiicia/iui e iai?ioeai?a/eaui. A yoii neo/aa aiai?yo,
/oi aaca aeaiiuo oaeiaeaoai?yao oneiaeth oeaeinoiinoe (integrity).

Aeey oiai, /oiau aa?aioe?iaaoue ei??aeoiinoue e acaeiioth
iai?ioeai?a/eainoue aeaiiuo, ia aaco aeaiiuo iaeeaaeuaathony iaeioi?ua
ia?aie/aiey, eioi?ua iacuaatho ia?aie/aieyie oeaeinoiinoe (data
integrity constraints).

Nouanoaoao ianeieueei oeiia ia?aie/aiee oeaeinoiinoe. O?aaoaony,
iai?eia?, /oiau cia/aiey a noieaoea oaaeeoeu auae?aeenue oieueei ec
niioaaonoaothuaai aeiiaia. Ia i?aeoeea o/eouaatho e aieaa neiaeiua
ia?aie/aiey oeaeinoiinoe, iai?eia?, oeaeinoiinoue ii nnueeai
(referential integrity). Aa nooue caeeth/aaony a oii, /oi aiaoiee eeth/
ia iiaeao auoue oeacaoaeai ia ianouanoaothuoth no?ieo a oaaeeoea.
Ia?aie/aiey oeaeinoiinoe ?aaeecothony n iiiiuueth niaoeeaeueiuo
n?aaenoa, oaeeo eae i?eaeea (rules), o?eaaa?u (triggers) e aeiiaiu
(domains).

Naie ii naaa aeaiiua a eiiiuethoa?iie oi?ia ia i?aaenoaaeytho eioa?an
aeey iieueciaaoaey, anee ionoonoaotho n?aaenoaa aeinooia e iei. Aeinooi
e aeaiiui inouanoaeyaony a aeaea cai?inia e aaca aeaiiuo, eioi?ua
oi?ioee?othony ia noaiaea?oiii ycuea cai?inia. Naaiaeiy aeey
aieueoeinoaa NOAAe oaeei ycueii yaeyaony SQL.

Iiyaeaiea e ?acaeoey yoiai ycuea eae n?aaenoaa iienaiey aeinooia e aaca
aeaiiuo naycaii n nicaeaieai oai?ee ?aeyoeeiiiuo aac aeaiiuo. I?iia?ac
ycuea SQL aiciee a 1970 aiaeo a ?aieao iao/ii-enneaaeiaaoaeueneiai
i?iaeoa System/R, ?aaioa iaae eioi?ui aaeanue a eaai?aoi?ee Naioa-Oa?aca
oe?iu IBM. Iuia SQL – yoi noaiaea?o eioa?oaena n ?aeyoeeiiiuie NOAAe.
Iiioey?iinoue aai ianoieueei aaeeea, /oi ?ac?aaio/eee ia?aeyoeeiiiuo
NOAAe (iai?eia?, Adabas eee Betrieve), niaaaeatho naie nenoaiu
SQL-eioa?oaenii.

sscue SQL eiaao ioeoeeaeueiue noaiaea?o – ANSI/ISO. Aieueoeinoai
?ac?aaio/eeia NOAAe i?eaea?aeeaathony yoiai noaiaea?oa, iaeiaei /anoi
?anoe?ytho aai aeey ?aaeecaoeee iiauo aiciiaeiinoae ia?aaioee aeaiiuo.
Iiaua iaoaieciu oi?aaeaiey aeaiiuie iiaoo auoue eniieueciaaiu oieueei
/a?ac niaoeeaeueiua iia?aoi?u SQL, a iauai neo/aa ia aeeth/aiiua a
noaiaea?o ycuea.

SQL ia yaeyaony ycueii i?ia?aiie?iaaiey a o?aaeeoeeiiiii i?aaenoaaeaiee.
Ia iai ieooony ia i?ia?aiiu, a cai?inu e aaca aeaiiuo. Iiyoiio SQL –
aeaeea?aoeaiue ycue. Yoi icia/aao, /oi n aai iiiiuueth iiaeii
noi?ioee?iaaoue, /oi iaiaoiaeeii iieo/eoue, ii iaeuecy oeacaoue, eae yoi
neaaeoao naeaeaoue. A /anoiinoe, a ioee/ea io i?ioeaaeo?iuo ycueia
i?ia?aiie?iaaiey (Ne, Ianeaeue, Aaea), a ycuea SQL ionoonoaotho oaeea
iia?aoi?u, eae if…then…else, for, while, oioy neaaeoao oeacaoue, /oi
a ?anoe?aiee SQL aeey o?aieiuo i?ioeaaeo? e o?eaaa?ia (SQL/PTL –
SQL/Procedure And Trigger Language) iie i?enoonoaotho.

Cai?in ia ycuea SQL ninoieo ec iaeiiai eee ianeieueeeo iia?aoi?ia,
neaaeothueo iaeei ca ae?oaei e ?acaeaeaiiuo oi/eie n caiyoie.

Ieaea a oaa. 2.1 ia?a/eneaiu iaeaieaa aaaeiua iia?aoi?u, eioi?ua aoiaeyo
a noaiaea?o ANSI/ISO SQL.

Neioaenen iia?aoi?a Auiieiyaiia aeaenoaea

SELECT Aua?aoue aeaiiua ec aacu aeaiiuo

INSERT Anoaaeoue aeaiiua a oaaeeoeo

DELETE Oaeaeeoue aeaiiua ec oaaeeoeu

UPDATE Eciaieoue aeaiiua a oaaeeoea

GRANT Ia?aaeaoue i?aaa ia aeaenoaea iaae iauaeoii

REVOKE Ioia?aoue i?aaa ia aeaenoaea iaae iauaeoii

COMMIT Iiaeoaa?aeeoue o?aicaeoeeth

ROLLBACK Ioeaoeoue o?aicaeoeeth

CREATE Nicaeaoue iauaeo aacu aeaiiuo

DROP Oaeaeeoue iauaeo aacu aeaiiuo

Oaa. 2.1. Iniiaiua iia?aoi?u ycuea SQL.

A cai?inao ia ycuea SQL eniieuecothony eiaia, eioi?ua iaeiicia/ii
eaeaioeoeoee?otho iauaeou aacu aeaiiuo. Ia?yaeo n i?inouie,
eniieuecothony oaeaea neiaeiua eiaia – iai?eia?, eaaeeoeeaoeeiiiia eiy
noieaoea (qualified column name) ii?aaeaeyao eiy noieaoea e eiy
oaaeeoeu, eioi?ie ii i?eiaaeeaaeeo.

Eaaeaeue noieaaoe a ethaie oaaeeoea o?aieo aeaiiua ii?aaeaeaiiuo oeiia.
?acee/atho aaciaua oeiu aeaiiuo – no?iee neiaieia oeene?iaaiiie aeeeiu,
oeaeua e aauanoaaiiua /enea, e aeiiieieoaeueiua oeiu aeaiiuo – no?iee
neiaieia ia?aiaiiie aeeeiu, aeaiaaeiua aaeeieoeu, aeaoo e a?aiy,
eiae/aneea aeaiiua (aeaa cia/aiey – “ENOEIA” e “EIAEUe”). A ycuea SQL
iiaeii eniieueciaaoue /eneiaua, no?ieiaua, neiaieueiua eiinoaiou e
eiinoaiou oeia “aeaoa” e “a?aiy”.

Iaeiei ec n?aaenoa, iaania/eaathueo auno?ue aeinooi e oaaeeoeai,
yaeythony eiaeaenu. Eiaeaen – yoi no?oeoo?a aacu aeaiiuo,
i?aaenoaaeythuay niaie oeacaoaeue ia eiie?aoioth no?ieo oaaeeoeu.
Eiaeaen niaea?aeeo cia/aiey, acyoua ec iaeiiai eee ianeieueeeo noieaoeia
eiie?aoiie no?iee oaaeeoeu, e nnueeo ia yoo no?ieo. Cia/aiey a eiaeaena
oii?yaei/aiu, /oi iicaieyao NOAAe auiieiyoue auno?ue iiene a oaaeeoea.

Anee eiaeaenia aeey oaaeeoeu ia nouanoaoao, oi aeey auiieiaiey cai?ina
NOAAe aeieaeia i?iniio?aoue anth oaaeeoeo, iineaaeiaaoaeueii auae?ay ec
iaa no?iee e i?iaa?yy aeey eaaeaeie ec ieo oneiaea auai?a. Aeey aieueoeo
oaaeeoe oaeie cai?in aoaeao auiieiyoueny i/aiue aeieai.

Anee aea aue i?aaeaa?eoaeueii nicaeai eiaeaen ii noieaoeai, aoiaeyuei o
oneiaea WHERE cai?ina, oi a?aiy iienea a oaaeeoea aoaeao nie?auaii aei
ieieioia. Eiaeaen nicaeaaony iia?aoi?ii SQL CREATE INDEX (NICAeAOUe
EIAeAEN).

Aeey iieueciaaoaey NOAAe eioa?an i?aaenoaaeytho ia ioaeaeueiua iia?aoi?u
ycuea SQL, a iaeioi?ay eo iineaaeiaaoaeueiinoue, ioi?ieaiiay eae aaeeiia
oeaeia e eiathuay niune n aai oi/ee c?aiey. Eaaeaeay oaeay
iineaaeiaaoaeueiinoue iia?aoi?ia ycuea SQL ?aaeecoao ii?aaeaeaiiia
aeaenoaea iaae aacie aeaiiuo. Iii inouanoaeyaony ca ianeieueei oaaia, ia
eaaeaeii ec eioi?uo iaae oaaeeoeaie aacu aeaiiuo auiieiythony iaeioi?ua
iia?aoeee. Oae, a aaieianeie nenoaia ia?aaiae iaeioi?ie noiiu n
e?aoein?i/iiai n/aoa ia aeieain?i/iue auiieiyaony a ianeieueei
iia?aoeee. N?aaee ieo – niyoea noiiu n e?aoein?i/iiai n/aoa, ca/eneaiea
ia aeieain?i/iue n/ao.

Anee a i?ioeanna auiieiaiey yoiai aeaenoaey i?iecieaeao naie, iai?eia?,
eiaaea ia?aay iia?aoeey aoaeao auiieiaia, a aoi?ay – iao, oi aeaiueae
aoaeoo iioa?yiu. Neaaeiaaoaeueii, ethaia aeaenoaea iaae aacie aeaiiuo
aeieaeii auoue auiieiaii oeaeeeii, eee ia auiieiyoueny aiana. Oaeia
aeaenoaea iieo/eei iacaaiea o?aicaeoeee.

Ia?aaioea o?aicaeoeee iie?aaony ia aeo?iae, eioi?ue eniieuecoaony aeey
ioeaoa o?aicaeoeee e ainnoaiiaeaiey ninoiyiey aacu aeaiiuo

1.2 Na?aa? aacu aeaiiuo

1.2.1 Oaoiieiaey e iiaeaee “eeeaio-na?aa?”

“Eeeaio-na?aa?” – yoi iiaeaeue acaeiiaeaenoaey eiiiuethoa?ia a naoe. Eae
i?aaeei, eiiiuethoa?u ia yaeythony ?aaiii?aaiuie. Eaaeaeue ec ieo eiaao
naia, ioee/iia io ae?oaeo, iacia/aiea, ea?aao ii?aaeaeaiioth ?ieue.
Iaeioi?ua eiiiuethoa?u a naoe aeaaeatho e ?anii?yaeathony
eioi?iaoeeiiii-au/eneeoaeueiuie ?ano?naie, oaeeie eae i?ioeanni?u,
oaeeiaay nenoaia, ii/oiaay neoaeaa, neoaeaa ia/aoe, aaca aeaiiuo.
Ae?oaea eiatho aiciiaeiinoue ia?auaoueny e yoei neoaeaai, iieuecoynue
oneoaaie ia?auo. Eiiiuethoa?, oi?aaeythuee oai eee eiui ?ano?nii,
i?eiyoi iacuaaoue na?aa?ii yoiai ?ano?na, a eiiiuethoa?, aeaeathuee ei
ainiieueciaaoueny – eeeaioii. Eiie?aoiue na?aa? ii?aaeaeyaony aeaeii
?ano?na, eioi?ui ii aeaaeaao. Oae, anee ?ano?nii yaeythony aacu aeaiiuo,
oi ?a/ue eaeao i na?aa?a aac aeaiiuo, iacia/aiea eioi?iai –
ianeoaeeaaoue cai?inu eeeaioia, naycaiiua n ia?aaioeie aeaiiuo; anee
?ano?n – yoi oaeeiaay nenoaia, oi aiai?yo i oaeeiaii na?aa?a eee
oaee-na?aa?a e o.ae.

A naoe iaeei e oio aea eiiiuethoa? iiaeao auiieiyoue eae ?ieue eeeaioa,
oae e ?ieue na?aa?a. Iai?eia?, a eioi?iaoeeiiiie nenoaia, aeeth/athuae
ia?niiaeueiua eiiiuethoa?u, aieueooth YAI e ieie-eiiiuethoa? iiae
oi?aaeaieai UNIX, iineaaeiee iiaeao aunooiaoue eae a ea/anoaa na?aa?a
aacu aeaiiuo, ianeoaeeaay cai?inu io eeeaioia – ia?niiaeueiuo
eiiiuethoa?ia, oae e a ea/anoaa eeeaioa, iai?aaeyy cai?inu aieueoie YAI.

Yoio aea i?eioeei ?ani?ino?aiyaony e ia acaeiiaeaenoaea i?ia?aii. Anee
iaeia ec ieo auiieiyao iaeioi?ua ooieoeee, i?aaeinoaaeyy ae?oaei
niioaaonoaothuee iaai? oneoa, oi oaeay i?ia?aiia ?anniao?eaaaony a
ea/anoaa na?aa?a. I?ia?aiiu, eioi?ua iieuecothony yoeie oneoaaie,
i?eiyoi iacuaaoue eeeaioaie. Oae, yae?i ?aeyoeeiiiie SQL-i?eaioe?iaaiiie
NOAAe /anoi iacuaatho na?aa?ii aacu aeaiiuo eee SQL-na?aa?ii, a
i?ia?aiio, ia?auathuothny e iaio ca oneoaaie ii ia?aaioea aeaiiuo –
SQL-eeeaioii.

Ia?aiia/aeueii NOAAe eiaee oeaio?aeeciaaiioth a?oeoaeoo?o. A iae naia
NOAAe e i?eeeaaeiua i?ia?aiiu, eioi?ua ?aaioaee n aacaie aeaiiuo,
ooieoeeiie?iaaee ia oeaio?aeueiii eiiiuethoa?a (aieueoay YAI eee
ieie-eiiiuethoa?). Oai aea ?aniieaaaeenue aacu aeaiiuo. E oeaio?aeueiiio
eiiiuethoa?o auee iiaeeeth/aiu oa?ieiaeu, aunooiaaoea a ea/anoaa ?aai/eo
iano iieueciaaoaeae. Ana i?ioeannu, naycaiiua n ia?aaioeie aeaiiuo:
iiaeaea?aeea aaiaea, inouanoaeyaiiai iieueciaaoaeai, oi?ie?iaaiea,
iioeiecaoeey e auiieiaiea cai?inia, iaiai n ono?ienoaaie aiaoiae iaiyoe
e o.ae., auiieiyeenue ia oeaio?aeueiii eiiiuethoa?a, /oi i?aaeuyaeyei
aeanoeea o?aaiaaiey e aai i?iecaiaeeoaeueiinoe. Iniaaiiinoe NOAAe
ia?aiai iieieaiey iai?yioth naycaiu n a?oeoaeoo?ie aieueoeo YAI e
ieie-eiiiuethoa?ia e aaeaeaaoii io?aaeatho ana eo i?aeiouanoaa e
iaaeinoaoee.

A ianoiyuaa a?aiy oaeoe/aneei noaiaea?oii aeey iiiaiiieueciaaoaeueneeo
NOAAe, noaea a?oeoaeoo?a “eeeaio-na?aa?”.

Anee i?aaeiieaaaaony, /oi i?iaeoe?oaiay eioi?iaoeeiiiay nenoaia (EN)
aoaeao iino?iaia ii oaoiieiaee “eeeaio-na?aa?”, oi yoi icia/aao, /oi
i?eeeaaeiua i?ia?aiiu, ?aaeeciaaiiua a aa ?aieao, aoaeoo eiaoue
?ani?aaeaeaiiue oa?aeoa?. Eiuie neiaaie, /anoue ooieoeee i?eeeaaeiie
i?ia?aiiu (eee, i?iua, i?eeiaeaiey) aoaeao ?aaeeciaaia a
i?ia?aiia-eeeaioa, ae?oaay – a i?ia?aiia-na?aa?a, i?e/ai aeey eo
acaeiiaeaenoaey aoaeao ii?aaeaeai iaeioi?ue i?ioieie.

Iniiaiie i?eioeei oaoiieiaee “eeeaio-na?aa?” caeeth/aaony a ?acaeaeaiee
ooieoeee noaiaea?oiiai eioa?aeoeaiiai i?eeiaeaiey ia /aou?a a?oiiu,
eiathuea ?acee/ioth i?e?iaeo. Ia?aay a?oiia – yoi ooieoeee aaiaea e
ioia?aaeaiey aeaiiuo. Aoi?ay a?oiia iauaaeeiyao /enoi i?eeeaaeiua
ooieoeee, oa?aeoa?iua aeey aeaiiie i?aaeiaoiie iaeanoe.

E o?aoueae a?oiia ioiinyony ooiaeaiaioaeueiua ooieoeee o?aiaiey e
oi?aaeaiey eioi?iaoeeiiiuie ?ano?naie (aacaie aeaiiuo, oaeeiauie
nenoaiaie e o.ae.). Iaeiiaoe, ooieoeee /aoaa?oie a?oiiu – neoaeaaiua,
ea?athuea ?ieue naycie iaaeaeo ooieoeeyie ia?auo o?ao a?oii. A
niioaaonoaee n yoei a ethaii i?eeiaeaiee auaeaeythony neaaeothuea
eiae/aneea eiiiiiaiou:

eiiiiiaio i?aaenoaaeaiey, ?aaeecothuee ooieoeee ia?aie a?oiiu;

i?eeeaaeiie eiiiiiaio, iiaeaea?aeeaathuee ooieoeee aoi?ie a?oiiu;

eiiiiiaio aeinooia e eioi?iaoeeiiiui ?ano?nai, iiaeaea?aeeaathuee
ooieoeee o?aoueae a?oiiu;

i?ioieie acaeiiaeaenoaey.

?acee/ey a ?aaeecaoeeyo oaoiieiaee “eeeaio-na?aa?” ii?aaeaeythony
/aou?ueiy oaeoi?aie. Ai-ia?auo, oai, a eaeea aeaeu i?ia?aiiiiai
iaania/aiey eioaa?e?iaai eaaeaeue ec yoeo eiiiiiaioia. Ai-aoi?uo, oai,
eaeea iaoaieciu i?ia?aiiiiai iaania/aiey eniieuecothony aeey ?aaeecaoeee
ooieoeee anao /aou?ao a?oii. A-o?aoueeo – eae eiae/aneea eiiiiiaiou
?ani?aaeaeythony iaaeaeo eiiiuethoa?aie a naoe. A-/aoaa?ouo, eaeea
iaoaieciu eniieuecothony aeey nayce eiiiiiaioia iaaeaeo niaie.

Auaeaeythony /aou?a iiaeoiaea, ?aaeeciaaiiua a neaaeothueo iiaeaeyo:

iiaeaeue oaeeiaiai na?aa?a (File Server – FS);

iiaeaeue aeinooia e oaeaeaiiui aeaiiui (Remote Data Access – RDA);

iiaeaeue naaa?a aacu aeaiiuo (DataBase Server – DBS);

iiaeaeue na?aa?a i?eeiaeaiee (Application Server – AS).

FS-iiaeaeue yaeyaony aaciaie aeey eieaeueiuo naoae ia?niiaeueiuo
eiiiuethoa?ia. A niioaaonoaee n yoie iiaeaeueth iaeei ec eiiiuethoa?ia a
naoe n/eoaaony oaeeiaui na?aa?ii e i?aaeinoaaeyao oneoae ii ia?aaioea
oaeeia ae?oaei eiiiuethoa?ai. Oaeeiaue na?aa? ?aaioaao iiae oi?aaeaieai
naoaaie iia?aoeeiiiie nenoaiu (iai?eia?, Novell NetWare) e ea?aao ?ieue
eiiiiiaioa aeinooia e eioi?iaoeeiiiui ?ano?nai (oi anoue e oaeeai). Ia
ae?oaeo eiiiuethoa?ao a naoe ooieoeeiie?oao i?eeiaeaiea, a eiaeao
eioi?iai niaiauaiu eiiiiiaio i?aaenoaaeaiey e i?eeeaaeiie eiiiiiaio.
I?ioieie iaiaia i?aaenoaaeyao niaie iaai? ieceio?iaiaauo auciaia,
iaania/eaathueo i?eeiaeaieth aeinooi e oaeeiaie nenoaia ia oaee-na?aa?a.

?en.1.1. Iiaeaeue oaeeiaiai na?aa?a.

FS-iiaeaeue iineoaeeea ooiaeaiaioii aeey ?anoe?aiey aiciiaeiinoae
ia?niiaeueiuo NOAAe a iai?aaeaiee iiaeaea?aeee iiiaiiieueciaaoaeueneiai
?aaeeia. A oaeeo nenoaiao ia ianeieueeeo ia?niiaeueiuo eiiiuethoa?ao
auiieiyaony eae i?eeeaaeiay i?ia?aiia, oae e eiiey NOAAe, a aacu aeaiiuo
niaea?aeaony a ?acaeaeyaiuo oaeeao, eioi?ua iaoiaeyony ia oaeeiaii
na?aa?a. Eiaaea i?eeeaaeiay i?ia?aiia ia?auaaony e aaca aeaiiuo, NOAAe
iai?aaeyao cai?in ia oaeeiaue na?aa?. A yoii cai?ina oeacaiu oaeeu, aaea
iaoiaeyony cai?aoeaaaiua aeaiiua. A ioaao ia cai?in oaeeiaue na?aa?
iai?aaeyao ii naoe o?aaoaiue aeie aeaiiuo. NOAAe, iieo/ea aai, auiieiyao
iaae aeaiiuie aeaenoaey, eioi?ua auee aeaeea?e?iaaiu a i?eeeaaeiie
i?ia?aiia.

E oaoiieiae/aneei iaaeinoaoeai iiaeaee ioiinyo aunieee naoaaie o?aoee
(ia?aaea/a iiiaeanoaa oaeeia, iaiaoiaeeiuo i?eeiaeaieth), oceee niaeo?
iia?aoeee iaieioee?iaaiey aeaiiuie (“aeaiiua – yoi oaeeu”), ionoonoaea
aaeaeaaoiuo n?aaenoa aaciianiinoe aeinooia e aeaiiui (caueoa oieueei ia
o?iaia oaeeiaie nenoaiu) e o.ae. Ana ia?a/eneaiiua iaaeinoaoee –
neaaenoaea aioo?aiia i?enoueo FS-iiaeaee ia?aie/aiee, ii?aaeaeyaiuo aa
oa?aeoa?ii.

Aieaa oaoiieiae/iay RDA-iiaeaeue nouanoaaiii ioee/aaony io FS-iiaeaee
oa?aeoa?ii eiiiiiaioa aeinooia e eioi?iaoeeiiiui ?ano?nai. Yoi, eae
i?aaeei, SQL-na?aa?. A RDA-iiaeaee eiaeu eiiiiiaioa i?aaenoaaeaiey e
i?eeeaaeiiai eiiiiiaioa niaiauaiu e auiieiythony ia
eiiiuethoa?a-eeeaioa. Iineaaeiee iiaeaea?aeeaaao eae ooieoeee aaiaea e
ioia?aaeaiey aeaiiuo, oae e /enoi i?eeeaaeiua ooieoeee. Aeinooi e
eioi?iaoeeiiiui ?ano?nai iaania/eaaaony eeai iia?aoi?aie niaoeeaeueiiai
ycuea (ycuea SQL, anee ?a/ue eaeao i aacao aeaiiuo) eee auciaaie
ooieoeee niaoeeaeueiie aeaeeioaee (anee eiaaony niioaaonoaothuee
eioa?oaen i?eeeaaeiiai i?ia?aiie?iaaiey – API).

?en 2.2. Iiaeaeue aeinooia e oaeaeaiiui aeaiiui.

Eeeaio iai?aaeyao cai?inu e eioi?iaoeeiiiui ?ano?nai (iai?eia?, e aacai
aeaiiuo) ii naoe oaeaeaiiiio eiiiuethoa?o. Ia iai ooieoeeiie?oao yae?i
NOAAe, eioi?ia ia?aaaouaaao cai?inu, auiieiyy i?aaeienaiiua a ieo
aeaenoaey e aica?auaao eeeaioo ?acoeueoao, ioi?ieaiiue eae aeie aeaiiuo.
I?e yoii eieoeeaoi?ii iaieioeyoeee n aeaiiuie aunooiatho i?ia?aiiu,
auiieiythueany ia eiiiuethoa?ao-eeeaioao, a oi a?aiy eae yae?o NOAAe
ioaiaeeony ianneaiay ?ieue – ianeoaeeaaiea cai?inia e ia?aaioea aeaiiuo.

RDA-iiaeaeue ecaaaeyao io iaaeinoaoeia, i?enoueo eae nenoaiai n
oeaio?aeeciaaiiie a?oeoaeoo?ie, oae e nenoaiai n oaeeiaui na?aa?ii.

I?aaeaea anaai, ia?aiin eiiiiiaioa i?aaenoaaeaiey e i?eeeaaeiiai
eiiiiiaioa ia eiiiuethoa?u-eeeaiou nouanoaaiii ?aca?oaeaao na?aa? AAe,
ieieiece?oy iauaa /enei i?ioeannia iia?aoeeiiiie nenoaiu. Na?aa? AAe
inaiaiaeaeaaony io ianaienoaaiiuo aio ooieoeee; i?ioeanni? eee
i?ioeanni?u na?aa?a oeaeeeii caa?oaeathony iia?aoeeyie ia?aaioee
aeaiiuo, cai?inia e o?aicaeoeee. Yoi noaiiaeony aiciiaeiui aeaaiaea?y
ioeaco io oa?ieiaeia e iniauaieth ?aai/eo iano eiiiuethoa?aie, eioi?ua
iaeaaeatho nianoaaiiuie eieaeueiuie au/eneeoaeueiuie ?ano?naie,
iieiinoueth eniieuecoaiuie i?ia?aiiaie ia?aaeiaai ieaia. N ae?oaie
noi?iiu, ?acei oiaiueoaaony caa?ocea naoe, oae eae ii iae ia?aaeathony
io eeeaioa e na?aa?o ia cai?inu ia aaiae-auaiae (eae a nenoaiao n
oaeeiaui na?aa?ii), a cai?inu ia ycuea SQL, a eo iauai nouanoaaiii
iaiueoa.

Iniiaiia aeinoieinoai RDA-iiaeaee caeeth/aaony a oieoeeaoeee eioa?oaena
“eeeaio-na?aa?” a aeaea ycuea SQL. Aeaenoaeoaeueii, acaeiiaeaenoaea
i?eeeaaeiiai eiiiiiaioa n yae?ii NOAAe iaaiciiaeii aac
noaiaea?oeciaaiiiai n?aaenoaa iauaiey. Cai?inu, iai?aaeyaiua i?ia?aiiie
yae?o, aeieaeiu auoue iiiyoiu iaaei noi?iiai. Aeey yoiai eo neaaeoao
noi?ioee?iaaoue ia niaoeeaeueiii ycuea. Ii a NOAAe oaea nouanoaoao ycue
SQL, i eioi?ii ?a/ue oea auoa. Iiyoiio auei au oeaeaniia?acii
eniieueciaaoue aai ia oieueei a ea/anoaa n?aaenoaa aeinooia e aeaiiui,
ii e eae noaiaea?oa iauaiey eeeaioa e na?aa?a.

E niaeaeaieth, RDA-iiaeaeue ia eeoaia ?yaea iaaeinoaoeia. Ai-ia?auo,
acaeiiaeaenoaea eeeaioa e na?aa?a iin?aaenoaii SQL-cai?inia nouanoaaiii
caa?oaeaao naoue. Ai-aoi?uo, oaeiaeaoai?eoaeueiia aaeieieno?e?iaaiea
i?eeiaeaiee a RDA-iiaeaee i?aeoe/anee iaaiciiaeii ec-ca niaiauaiey a
iaeiie i?ia?aiia ?acee/iuo ii naiae i?e?iaea ooieoeee (ooieoeee
i?aaenoaaeaiey e i?eeeaaeiua ooieoeee).

Ia?yaeo n RDA-iiaeaeueth ana aieueooth iiioey?iinoue i?eia?aoaao
ia?niaeoeaiay DBS-iiaeaeue. Iineaaeiyy ?aaeeciaaia a iaeioi?uo
?aeyoeeiiiuo NOAAe (Informix, Ingres, Sybase, Oracle, InterBase). Aa
iniiao ninoaaeyao iaoaieci o?aieiuo i?ioeaaeo? – n?aaenoai
i?ia?aiie?iaaiey SQL-na?aa?a. I?ioeaaeo?u o?aiyony a neiaa?a aacu
aeaiiuo, ?acaeaeythony iaaeaeo ianeieueeeie eeeaioaie e auiieiythony ia
oii aea eiiiuethoa?a, aaea ooieoeeiie?oao SQL-na?aa?. sscue, ia eioi?ii
?ac?aaaouaathony o?aieiua i?ioeaaeo?u (SQL/PTL), i?aaenoaaeyao niaie
i?ioeaaeo?iia ?anoe?aiea ycuea cai?inia SQL e oieeaeai aeey eaaeaeie
eiie?aoiie NOAAe.

A DBS-iiaeaee eiiiiiaio i?aaenoaaeaiey auiieiyaony ia
eiiiuethoa?a-eeeaioa, a oi a?aiy eae i?eeeaaeiie eiiiiiaio ioi?ieai eae
iaai? o?aieiuo i?ioeaaeo? e ooieoeeiie?oao ia eiiiuethoa?a-na?aa?a AAe.
Oai aea auiieiyaony eiiiiiaio aeinooia e aeaiiui, oi anoue yae?i NOAAe.
Aeinoieinoaa DBS-iiaeaee: aiciiaeiinoue oeaio?aeeciaaiiiai
aaeieieno?e?iaaiey i?eeeaaeiuo ooieoeee, e nieaeaiea o?aoeea (aianoi
SQL-cai?inia ii naoe iai?aaeythony auciau o?aieiuo i?ioeaaeo?),
aiciiaeiinoue ?acaeaeaiey i?ioeaaeo?u iaaeaeo ianeieueeeie
i?eeiaeaieyie, yeiiiiey ?ano?nia eiiiuethoa?a ca n/ao eniieueciaaiey
aaeeiiaeaeu nicaeaiiiai ieaia auiieiaiey i?ioeaaeo?u. E iaaeinoaoeai
iiaeii ioianoe ia?aie/aiiinoue n?aaenoa, eniieuecoaiuo aeey iaienaiey
o?aieiuo i?ioeaaeo?, eioi?ua i?aaenoaaeytho niaie ?aciiia?aciua
i?ioeaaeo?iua ?anoe?aiey SQL, ia auaea?aeeaathuea n?aaiaiey ii
ooieoeeiiaeueiui aiciiaeiinoyi n ycueaie o?aoueaai iieieaiey, oaeeie eae
C eee Pascal. Noa?a eo eniieueciaaiey ia?aie/aia eiie?aoiie NOAAe, a
aieueoeinoaa NOAAe ionoonoaotho aiciiaeiinoe ioeaaeee e oanoe?iaaiey
?ac?aaioaiiuo o?aieiuo i?ioeaaeo?.

?en.1.3. Iiaeaeue na?aa?a aac aeaiiuo.

Ia i?aeoeea /anoi eniieuecoaony niaoaiiua iiaeaee, eiaaea iiaeaea?aeea
oeaeinoiinoe aacu aeaiiuo e iaeioi?ua i?inoaeoea i?eeeaaeiua ooieoeee
auiieiythony o?aieiuie i?ioeaaeo?aie (DBS-iiaeaeue), a aieaa neiaeiua
ooieoeee ?aaeecothony iaiin?aaenoaaiii a i?eeeaaeiie i?ia?aiia, eioi?ay
?aaioaao ia eiiiuethoa?a-eeeaioa (RDA-iiaeaeue). Oae eee eia/a,
nia?aiaiiua iiiaiiieueciaaoaeueneea NOAAe iie?athony ia RDA- e
DBS-iiaeaee e i?e nicaeaiee EN, i?aaeiieaaathuai eniieueciaaiea oieueei
NOAAe, auae?atho iaeio ec yoeo aeaoo iiaeaeae, eeai eo ?acoiiia
ni/aoaiea.

A AS-iiaeaee i?ioeann, auiieiythueeny ia eiiiuethoa?a-eeeaioa,
ioaa/aao, eae iau/ii, ca eioa?oaen n iieueciaaoaeai (oi anoue ?aaeecoao
ooieoeee ia?aie a?oiiu). Ia?auaynue ca auiieiaieai oneoa e i?eeeaaeiiio
eiiiiiaioo, yoio i?ioeann ea?aao ?ieue eeeaioa i?eeiaeaiey (Application
Client – AC). I?eeeaaeiie eiiiiiaio ?aaeeciaai eae a?oiia i?ioeannia,
auiieiythueo i?eeeaaeiua ooieoeee e iacuaaaony na?aa?ii i?eeiaeaiey
(Application Server – AS). Ana iia?aoeee iaae eioi?iaoeeiiiuie ?ano?naie
auiieiythony niioaaonoaothuei eiiiiiaioii, ii ioiioaieth e eioi?iio AS
ea?aao ?ieue eeeaioa. Ec i?eeeaaeiuo eiiiiiaioia aeinooiiu ?ano?nu
?acee/iuo oeiia – aacu aeaiiuo, i/a?aaee, ii/oiaua neoaeau e ae?.

?en.1.4. Iiaeaeue na?aa?a i?eeiaeaiee.

RDA- e DBS-iiaeaee iie?athony ia aeaoocaaiioth noaio ?acaeaeaiey
ooieoeee. A RDA-iiaeaee i?eeeaaeiua ooieoeee i?eaeaiu i?ia?aiia-eeeaioo,
a DBS-iiaeaee ioaaonoaaiiinoue ca eo auiieiaiea aa?ao ia naay yae?i
NOAAe. A ia?aii neo/aa i?eeeaaeiie eiiiiiaio neeaaaony n eiiiiiaioii
i?aaenoaaeaiey, ai aoi?ii – eioaa?e?oaony a eiiiiiaio aeinooia e
eioi?iaoeeiiiui ?ano?nai. A AS-iiaeaee ?aaeeciaaia o?aocaaiiay noaia
?acaeaeaiey ooieoeee, aaea i?eeeaaeiie eiiiiiaio auaeaeai eae aaaeiaeoee
eciee?iaaiiue yeaiaio i?eeiaeaiey, aeey aai ii?aaeaeaiey eniieuecothony
oieaa?naeueiua iaoaieciu iiiaicaaea/iie iia?aoeeiiiie nenoaiu, e
noaiaea?oeciaaiu eioa?oaenu n aeaoiy ae?oaeie eiiiiiaioaie. AS-iiaeaeue
yaeyaony ooiaeaiaioii aeey iiieoi?ia ia?aaioee o?aicaeoeee (Transaction
Processing Monitors – TPM), eee, i?iua, iiieoi?ia o?aicaeoeee, eioi?ua
auaeaeythony eae iniaue aeae i?ia?aiiiiai iaania/aiey.

A ia?eiae nicaeaiey ia?auo NOAAe oaoiieiaey “eeeaio-na?aa?” oieueei
ca?iaeaeaeanue. Iiyoiio ecia/aeueii a a?oeoaeoo?a nenoai ia auei
aaeaeaaoiiai iaoaiecia i?aaiecaoeee acaeiiaeaenoaey oaeiai oeia, a
nia?aiaiiuo aea nenoaiao ii aeeciaiii iaiaoiaeei.

*oiau iiiyoue i?iaeaio, ?anniio?ei yaiethoeeth na?aa?ia aac aeaiiuo.
Ia?aia a?aiy aeiieie?iaaea iiaeaeue, eiaaea oi?aaeaiea aeaiiuie
(ooieoeey na?aa?a) e acaeiiaeaenoaea n iieueciaaoaeai auee niaiauaiu a
iaeiie i?ia?aiia. Caoai ooieoeee oi?aaeaiey aeaiiuie auee auaeaeaiu a
naiinoiyoaeueioth a?oiio – na?aa?, iaeiaei iiaeaeue acaeiiaeaenoaey
iieueciaaoaey n na?aa?ii niioaaonoaiaaea ia?aaeeaia “iaeei-e-iaeiiio”,
oi anoue na?aa? ianeoaeeaae cai?inu ?iaii iaeiiai iieueciaaoaey
(eeeaioa), e aeey ianeoaeeaaiey ianeieueeeo eeeaioia ioaeii auei
caionoeoue yeaeaaeaioiia /enei na?aa?ia. Auaeaeaiea na?aa?a a
ioaeaeueioth i?ia?aiio – ?aaiethoeeiiiue oaa, iicaieythuee, a /anoiinoe,
iiianoeoue na?aa? ia iaeio iaoeio, a i?ia?aiiiue eioa?oaen n
iieueciaaoaeai – ia ae?oaoth, inouanoaeyy acaeiiaeaenoaea iaaeaeo ieie
ii naoe. Iaeiaei iaiaoiaeeiinoue caionea aieueoiai /enea na?aa?ia aeey
ianeoaeeaaiey iiiaeanoaa iieueciaaoaeae neeueii ia?aie/eaaea
aiciiaeiinoe oaeie nenoaiu.

I?iaeaiu, aicieeathuea a iiaeaee “iaeei-e-iaeiiio”, ?aoathony a
a?oeoaeoo?a nenoai n auaeaeaiiui na?aa?ii, niiniaiui ia?aaaouaaoue
cai?inu io iiiaeo eeeaioia. Na?aa? aaeeinoaaiiue iaeaaeaao iiiiiieeae ia
oi?aaeaiea aeaiiuie e acaeiiaeaenoaoao iaeiia?aiaiii ni iiiaeie
eeeaioaie. Eiae/anee eaaeaeue eeeaio naycai n na?aa?ii ioaeaeueiie
ieoueth (thread) eee iioieii, ii eioi?iio ia?anueathony cai?inu. Oaeay
a?oeoaeoo?a iieo/eea iacaaiea iiiaiiioieiaie (multi-threaded).

Iia iicaieyao cia/eoaeueii oiaiueoeoue iaa?oceo ia iia?aoeeiiioth
nenoaio, aicieeathuoth i?e ?aaioa aieueoiai /enea iieueciaaoaeae. N
ae?oaie noi?iiu, aiciiaeiinoue acaeiiaeaenoaey n iaeiei na?aa?ii iiiaeo
eeeaioia iicaieyao a iieiie noaiaie eniieueciaaoue ?acaeaeyaiua iauaeou
(ia/eiay n ioe?uouo oaeeia e eii/ay aeaiiuie ec nenoaiiuo eaoaeiaia),
/oi neeueii oiaiueoaao iio?aaiinoe a iaiyoe e iauaa /enei i?ioeannia
iia?aoeeiiiie nenoaiu. Iai?eia?, nenoaiie n a?oeoaeoo?ie
“iaeei-e-iaeiiio” aoaeao nicaeaii 50 eiiee i?ioeannia NOAAe aeey 50
iieueciaaoaeae, oiaaea eae nenoaia n iiiaiiioieiaie a?oeoaeoo?ie aeey
yoiai iiiaaeiaeoueny oieueei iaeei na?aa?.

Iaeiaei oaeia ?aoaiea nicaeaao iiaoth i?iaeaio. Oae eae na?aa? iiaeao
auiieiyoueny oieueei ia iaeiii i?ioeanni?a, aicieeaao anoanoaaiiia
ia?aie/aiea ia i?eiaiaiea NOAAe aeey ioeueoei?ioeanni?iuo ieaooi?i. Anee
eiiiuethoa? eiaao, iai?eia?, /aou?a i?ioeanni?a, oi NOAAe n iaeiei
na?aa?ii eniieuecotho oieueei iaeei ec ieo, ia caa?oaeay inoaaoeany o?e.

A iaeioi?uo nenoaiao yoa i?iaeaia ?aoaaony caiaiie auaeaeaiiiai na?aa?a
ia aeeniao/a? eee ae?ooaeueiue na?aa? (virtual server), eioi?ue oa?yao
i?aai iiiiiieueii ?anii?yaeaoueny aeaiiuie, auiieiyy oieueei ooieoeee
aeeniao/a?ecaoeee cai?inia e aeooaeueiui na?aa?ai. Oaeei ia?acii, a
a?oeoaeoo?o nenoaiu aeiaaaeyaony iiaue neie, eioi?ue ?aciauaaony iaaeaeo
eeeaioii e na?aa?ii, /oi oaaee/eaaao o?aoo ?ano?nia ia iiaeaea?aeeo
aaeaina caa?ocee (load balancing) e ia?aie/eaaao aiciiaeiinoe oi?aaeaiey
acaeiiaeaenoaeai “eeeaio-na?aa?”. Ai-ia?auo, noaiiaeony iaaiciiaeiui
iai?aaeoue cai?in io eiie?aoiiai eeeaioa eiie?aoiiio na?aa?o, ai-aoi?uo,
na?aa?u noaiiayony ?aaiii?aaiuie – iaaiciiaeii onoaiaaeeaaoue i?ei?eoaou
aeey ianeoaeeaaiey cai?inia.

Nia?aiaiiia ?aoaiea i?iaeaiu NOAAe aeey ioeueoei?ioeanni?iuo ieaooi?i
caeeth/aaony a aiciiaeiinoe caionea ianeieueeeo na?aa?ia aacu aeaiiuo, a
oii /enea e ia ?acee/iuo i?ioeanni?ao. I?e yoii eaaeaeue ec na?aa?ia
aeieaeai auoue iiiaiiioieiaui. Anee aeaa yoe oneiaey auiieiaiu, oi anoue
iniiaaiea aiai?eoue i iiiaiiioieiaie a?oeoaeoo?a n ianeieueeeie
na?aa?aie (multi-threaded, multi-server architecture).

1.2.2 Iaoaieciu ?aaeecaoeee aeoeaiiai yae?a

I?ioanneiiaeueiua NOAAe iaeaaeatho iiuiui aeoeaiui na?aa?ii aacu
aeaiiuo. Eaeay aeoeaiiai na?aa?a i?eioeeieaeueii eciaiyao i?aaenoaaeaiea
i ?iee, ianooaaao e i?eioeeiao eniieueciaaiey NOAAe, a a /enoi
i?aeoe/aneii ieaia iicaieyao aua?aoue nia?aiaiiua, yooaeoeaiua iaoiaeu
iino?iaiey aeiaaeueiuo eioi?iaoeeiiiuo nenoai.

Iauaeou ?aaeueiiai ie?a, iiieii iaiin?aaenoaaiiuo, i?yiuo naycae, eiatho
ae?oa n ae?oaii eiua, aieaa neiaeiua i?e/eiii-neaaenoaaiiua nayce. Yoe
nayce e i?ioeannu aeieaeiu eaeei-oi ia?acii io?aaeaoueny a aaca aeaiiuo,
anee iu eiaai a aeaeo ia noaoe/iia o?aieeeua, a eioi?iaoeeiiioth
iiaeaeue /anoe ?aaeueiiai ie?a. Eiuie neiaaie, a aaca, iiieii nianoaaiii
aeaiiuo e iaiin?aaenoaaiiuo naycae iaaeaeo ieie, aeieaeiu o?aieoueny
ciaiey i aeaiiuo, a iia naia aeieaeia aaeaeaaoii io?aaeaoue i?ioeannu,
i?ienoiaeyuea a ?aaeueiii ie?a. Neaaeiaaoaeueii, iaiaoiaeeii eiaoue
n?aaenoaa o?aiaiey e oi?aaeaiey oaeie eioi?iaoeeae.

Aeaiiua o?aaiaaiey aueeaathony a ?aoaiea neaaeothueo caaea/.

Iaiaoiaeeii, /oiau aaca aeaiiuo a ethaie iiiaio a?aiaie i?aaeeueii
io?aaeaea ninoiyiea i?aaeiaoiie iaeanoe – aeaiiua aeieaeiu auoue acaeiii
iai?ioeai?a/eauie.

Aaca aeaiiuo aeieaeia io?aaeaoue iaeioi?ua i?aaeea i?aaeiaoiie iaeanoe,
caeiiu, ii eioi?ui iia ooieoeeiie?oao (business rules).

Iaiaoiaeei iinoiyiiue eiio?ieue ca ninoiyieai aacu aeaiiuo,
ioneaaeeaaiea anao eciaiaiee, e aaeaeaaoiay ?aaeoeey ia ieo.

Iaiaoiaeeii, /oiau aicieeiiaaiea iaeioi?ie neooaoeee a aaca aeaiiuo
/aoei e iia?aoeaii aeeyei ia oiae auiieiaiey i?eeeaaeiie i?ia?aiiu.
Iiiaea i?ia?aiiu o?aaotho iia?aoeaiiai iiiaauaiey i anao i?ienoiaeyueo a
aaca aeaiiuo eciaiaieyo.

Aaaeiay i?iaeaia NOAAe – eiio?ieue oeiia aeaiiuo. Oei aeaiiuo
ii?aaeaeyaony i?e nicaeaiee oaaeeoeu. Eaaeaeiio noieaoeo i?enaaeaaaony
iaeei ec noaiaea?oiuo oeiia aeaiiuo, ?ac?aoaiiuo a NOAAe. Eae i?aaeei,
yoi aeaiiua noaiaea?oiuo oeiia – /enea, oeaeua e aauanoaaiiua, no?iee
neiaieia, a oaeaea aeaiiua oeia “aeaoa”, “a?aiy” e “aeaiaaeiay
aaeeieoea”.

Eaeae, ?aaeeciaaiiua a NOAAe o?aoueaai iieieaiey, caeeth/athony a oii,
/oi ciaiey auiinyony ca ?aiee i?eeeaaeiuo i?ia?aii e ioi?ieythony eae
iauaeou aacu aeaiiuo. Ooieoeee i?eiaiaiey ciaiee ia/eiaao auiieiyoue
iaiin?aaenoaaiii na?aa? aac aeaiiuo.

Oaeay a?oeoaeoo?a yaeyaony aiieiuaieai eiioeaioeee aeoeaiiai na?aa?a.
Iia ?aaeecoaony /aou?ueiy nouiinoyie:

i?ioeaaeo?aie aacu aeaiiuo;

i?aaeeaie (o?eaaa?aie);

niauoeyie a aaca aeaiiuo;

oeiaie aeaiiuo, ii?aaeaeyaiuie iieueciaaoaeai;

1.2.3 O?aieiua i?ioeaaeo?u

A ?acee/iuo NOAAe iie iinyo iacaaiea o?aieiuo (stored), i?eniaaeeiaiiuo,
?acaeaeyaiuo e o.ae. Ieaea aoaeai iieueciaaoueny oa?ieiieiaeae, i?eiyoie
a NOAAe InterBase.

Eniieueciaaiea i?ioeaaeo? aacu aeaiiuo i?aneaaeoao /aou?a oeaee:

Iaania/eaaaony iiaue iacaaeneiue o?iaaiue oeaio?aeeciaaiiiai eiio?iey
aeinooia e aeaiiui, inouanoaeyaiue aaeieieno?aoi?ii aacu aeaiiuo.

Iaeia i?ioeaaeo?a iiaeao eniieueciaaoueny ianeieueeeie i?eeeaaeiuie
i?ia?aiiaie – yoi iicaieyao nouanoaaiii nie?aoeoue a?aiy iaienaiey
i?ia?aii ca n/ao ioi?ieaiey eo iaueo /anoae a aeaea i?ioeaaeo? aacu
aeaiiuo. I?ioeaaeo?a eiiieee?oaony e iiiauaaony a aaco aeaiiuo,
noaiiaynue aeinooiiie aeey iiiaie?aoiuo auciaia. Oae eae ieai aa
auiieiaiey ii?aaeaeyaony aaeeiiaeaeu i?e eiiieeyoeee, oi i?e
iineaaeothueo auciaao i?ioeaaeo?u oaca iioeiecaoeee i?iioneaaony, /oi
nouanoaaiii yeiiiieo au/eneeoaeueiua ?ano?nu nenoaiu.

Eniieueciaaiea i?ioeaaeo? aac aeaiiuo iicaieyao cia/eoaeueii nieceoue
o?aoee naoe a nenoaiao n a?oeoaeoo?ie “eeeaio-na?aa?”. I?eeeaaeiay
i?ia?aiia, aucuaathuay i?ioeaaeo?o, ia?aaeaao na?aa?o eeoue aa eiy e
ia?aiao?u. A i?ioeaaeo?a, eae i?aaeei, eiioeaio?e?othony iiaoi?ythueany
o?aaiaiou ec ianeieueeeo i?eeeaaeiuo i?ia?aii. Anee au yoe o?aaiaiou
inoaeenue /anoueth i?ia?aiiu, iie caa?oaeaee au naoue iinueeie iieiuo
SQL-cai?inia.

I?ioeaaeo?u aacu aeaiiuo a ni/aoaiee n i?aaeeaie, i?aaeinoaaeytho
aaeieieno?aoi?o iiuiua n?aaenoaa iiaeaea?aeee oeaeinoiinoe aacu aeaiiuo.

A nia?aiaiiuo NOAAe i?ioeaaeo?a o?aieony iaiin?aaenoaaiii a aaca aeaiiuo
e eiio?iee?oaony aa aaeieieno?aoi?ii. Iia eiaao ia?aiao?u e aica?auaao
cia/aiea. I?ioeaaeo?a aacu aeaiiuo nicaeaaony iia?aoi?ii CREATE
PROCEDURE (NICAeAOUe I?IOeAAeO?O) e niaea?aeeo ii?aaeaeaiey ia?aiaiiuo,
iia?aoi?u SQL (iai?eia?, SELECT, INSERT), iia?aoi?u i?iaa?ee oneiaee
(IF/THEN/ ELSE) iia?aoi?u oeeeea (FOR, WHILE), a oaeaea iaeioi?ua
ae?oaea.

1.2.4 I?aaeea (o?eaaa?u)

Iaoaieci i?aaee (o?eaaa?ia) iicaieyao i?ia?aiie?iaaoue ia?aaioeo
neooaoeee, aicieeathueo i?e ethauo eciaiaieyo a aaca aeaiiuo. I?aaeei
i?eaeaaony oaaeeoea aacu aeaiiuo e i?eiaiyaony i?e auiieiaiee iaae
oaaeeoeae iia?aoeee aeeth/aiey, oaeaeaiey eee iaiiaeaiey no?ie.

I?eiaiaiea i?aaeea caeeth/aaony a i?iaa?ea noi?ioee?iaaiiuo a iai
oneiaee, i?e auiieiaiee eioi?uo i?ienoiaeeo aucia niaoeeoeoee?iaaiiie
aioo?e i?aaeea i?ioeaaeo?u aacu aeaiiuo. Aaaeii, /oi i?aaeei iiaeao
auoue i?eiaiaii eae aei, oae e iinea auiieiaiey iaiiaeaiey,
neaaeiaaoaeueii, aiciiaeia ioiaia iia?aoeee.

Oaeei ia?acii, i?aaeei iicaieyao ii?aaeaeeoue ?aaeoeeth na?aa?a ia
ethaia eciaiaiea ninoiyiey aacu aeaiiuo. I?aaeea (oae aea, eae e
i?ioeaaeo?u) o?aiyony iaiin?aaenoaaiii a aaca aeaiiuo iacaaeneii io
i?eeeaaeiuo i?ia?aii. Iaeia ec oeaeae iaoaiecia i?aaee – io?aaeaiea
iaeioi?uo aiaoieo i?aaee aeayoaeueiinoe i?aaiecaoeee.

Aaaeiaeoay oeaeue iaoaiecia i?aaee – iaania/aiea oeaeinoiinoe aacu
aeaiiuo. Iaeei ec aniaeoia oeaeinoiinoe – oeaeinoiinoue ii nnueeai
(referential integrity) – ioiineony e nayce aeaoo oaaeeoe iaaeaeo niaie.
Yoa naycue iiaeaea?aeeaaaony aiaoieie eeth/aie. Iaoaieci i?aaee
iicaieyao ?aaeeciaaoue e aieaa iauea ia?aie/aiey oeaeinoiinoe.

1.2.5 Iaoaieci niauoee

Iaoaieci niauoee a aaca aeaiiuo (database events) iicaieyao i?eeeaaeiui
i?ia?aiiai e na?aa?o aacu aeaiiuo oaaaeiieyoue ae?oaea i?ia?aiiu i
ianooieaiee a aaca aeaiiuo ii?aaeaeaiiiai niauoey e oai naiui
neio?iiece?iaaoue eo ?aaioo. Iia?aoi?u ycuea SQL, iaania/eaathuea
oaaaeiieaiea, iacuaatho neaiaeecaoi?aie niauoee a aaca aeaiiuo (database
event alerters). Ooieoeee oi?aaeaiey niauoeyie oeaeeeii eiaeaony ia
na?aa? aacu aeaiiuo.

Iaoaieci niauoee eniieuecoaony neaaeothuei ia?acii. Aia/aea a aaca
aeaiiuo aeey eaaeaeiai niauoey nicaeaaony oeaaeie, ninoiyiea eioi?iai
aoaeao iiiaauaoue i?eeeaaeiua i?ia?aiiu i oii, /oi iaeioi?ia niauoea
eiaei ianoi (iia?aoi? CREATE DBEVENT – NICAeAOUe NIAUOEA). Aeaeaa, ai
ana i?eeeaaeiua i?ia?aiiu, ia oiae auiieiaiey eioi?uo iiaeao iiaeeyoue
yoi niauoea, aeeth/aaony iia?aoi? REGISTER DBEVENT (CA?AAENO?E?IAAOUe
NIAUOEA), eioi?ue iiiaauaao na?aa? aacu aeaiiuo, /oi i?ia?aiia
caeioa?aniaaia a iieo/aiee niiauaiey i ianooieaiee niauoey. Oaia?ue
ethaay i?eeeaaeiay i?ia?aiia eee i?ioeaaeo?a aacu aeaiiuo iiaeao
aucaaoue niauoea iia?aoi?ii RAISE DBEVENT (AUCAAOUe NIAUOEA). Eae
oieueei niauoea i?iecioei, eaaeaeay ca?aaeno?e?iaaiiay i?ia?aiia iiaeao
iieo/eoue aai, aeey /aai iia aeieaeia cai?ineoue i/a?aaeiia niiauaiea ec
i/a?aaee niauoee (iia?aoi? GET DBEVENT – IIEO*EOUe NIAUOEA) e cai?ineoue
eioi?iaoeeth i niauoee, a /anoiinoe, aai eiy (iia?aoi? SQL INQUIRE_SQL).

1.3 Ia?aaioea ?ani?aaeaeaiiuo aeaiiuo

Iaeia ec aeaaiuo iniaaiiinoae nia?aiaiiuo eioi?iaoeeiiiuo nenoai –
?ani?aaeaeaiiue oa?aeoa?. Aic?anoaao eo ianooaa, iie ioaaouaatho ana
aieueoa /enei oi/ae ii anaio ie?o. Nia?aiaiiue o?iaaiue i?eiyoey
?aoaiee, iia?aoeaiia oi?aaeaiea eioi?iaoeeiiiuie ?ano?naie o?aaoao ana
aieueoae eo aeaoeaio?aeecaoeee. Eioi?iaoeeiiiua nenoaiu iaoiaeyony a
iinoiyiiii ?acaeoee – a ieo aeiaaaeythony iiaua naaiaiou, ?anoe?yaony
aeeaiacii ooieoeee oaea aeaenoaothueo.

Aeaaiay i?iaeaia oaeeo nenoai – i?aaiecaoeey ia?aaioee ?ani?aaeaeaiiuo
aeaiiuo. Aeaiiua iaoiaeyony ia eiiiuethoa?ao ?acee/iuo iiaeaeae e
i?iecaiaeeoaeae, ooieoeeiie?othueo iiae oi?aaeaieai ?acee/iuo
iia?aoeeiiiuo nenoai, a aeinooi e aeaiiui inouanoaeyaony ?acii?iaeiui
i?ia?aiiiui iaania/aieai. Naie eiiiuethoa?u oa??eoi?eaeueii oaeaeaiu
ae?oa io ae?oaa e iaoiaeyony a ?acee/iuo aaia?aoe/aneeo oi/eao ieaiaou.

Ioaaoii ia caaea/e ?aaeueiie aeecie noaee aeaa oaoiieiaee: oaoiieiaey
?ani?aaeaeaiiuo aac aeaiiuo (Distributed Database) e oaoiieiaey
oe?aaee?iaaiey aeaiiuo (Data Replication).

Iiae ?ani?aaeaeaiiie aacie aeaiiuo iiae?acoiaaatho aaco, aeeth/athuoth
o?aaiaiou ec ianeieueeeo aac aeaiiuo, eioi?ua ?aniieaaathony ia
?acee/iuo oceao naoe eiiiuethoa?ia, e, aiciiaeii, oi?aaeythony
?acee/iuie NOAAe. ?ani?aaeaeaiiay aaca aeaiiuo auaeyaeeo n oi/ee c?aiey
iieueciaaoaeae e i?eeeaaeiuo i?ia?aii eae iau/iay eieaeueiay aaca. A
yoii niunea neiai “?ani?aaeaeaiiay” io?aaeaao niinia i?aaiecaoeee aacu
aeaiiuo, ii ia aiaoithth aa oa?aeoa?enoeeo (“?ani?aaeaeaiiinoue” aacu ia
aeieaeia auoue aeaeia ecaia).

A ioee/ea io ?ani?aaeaeaiiuo aac, oe?aaee?iaaiea aeaiiuo i?aaeiieaaaao
ioeac io eo oece/aneiai ?ani?aaeaeaiey e iie?aaony ia eaeath
aeoaee?iaaiey aeaiiuo a ?acee/iuo oceao naoe eiiiuethoa?ia.

?aiaa auee ?anniio?aiu /aou?a iiaeaee oaoiieiaee “eeeaio-na?aa?”.
O?aaeeoeeiiiie e iaeaieaa iiioey?iie yaeyaony iiaeaeue aeinooia e
oaeaeaiiui aeaiiui (RDA-iiaeaeue). A niioaaonoaee n yoie iiaeaeueth,
eiaaony eiiiuethoa?, ia eioi?ii caioneathony i?ia?aiiu ia?aaeiaai ieaia
(a eioi?uo ?aaeeciaaiu eae ooieoeee eioa?oaena n iieueciaaoaeai, oae e
i?eeeaaeiua ooieoeee) – eeeaio (iacuaaaiue iau/ii eieaeueiui oceii –
local node), niaaeeiaiiue a naoe n eiiiuethoa?ii, ia eioi?ii auiieiyaony
na?aa? aacu aeaiiuo e iaoiaeeony naia aaca aeaiiuo (iau/ii aai iacuaatho
oaeaeaiiui oceii – remote node). Ana i?iaeaiu, aicieeathuea i?e
acaeiiaeaenoaee eeeaioa e na?aa?a, aeieaeai ?aoaoue niaoeeaeueiue
eiiiiiaio NOAAe, iacuaaaiue eiiioieeaoeeiiiui na?aa?ii (Communication
Server, DBMS Server Net). Aeey iiaeaea?aeee acaeiiaeaenoaey eeeaioa e
na?aa?a ii aeieaeai ooieoeeiie?iaaoue ia oaeaeaiiii ocea; a oi aea a?aiy
ia eieaeueiii ocea aeieaeia auiieiyoueny i?ia?aiia nayce,
acaeiiaeaenoaothuay n eiiioieeaoeeiiiui na?aa?ii (DBMS Client Net).

A iniiao acaeiiaeaenoaey i?eeeaaeiuo i?ia?aii – eeeaioia e na?aa?a aacu
aeaiiuo, iieiaeai ?yae ooiaeaiaioaeueiuo i?eioeeiia, ii?aaeaeythueo
ooieoeeiiaeueiua aiciiaeiinoe nia?aiaiiuo NOAAe a /anoe, eanathuaeny
naoaaiai acaeiiaeaenoaey e ?ani?aaeaeaiiie ia?aaioee aeaiiuo, n?aaee
eioi?uo:

I?ic?a/iinoue ?aniieiaeaiey;

I?ic?a/iinoue naoe;

Aaoiiaoe/aneia i?aia?aciaaiea oi?iaoia aeaiiuo;

Aaoiiaoe/aneay o?aineyoeey eiaeia;

Iaaeiia?aaaeueiinoue;

I?ic?a/iinoue ?aniieiaeaiey.

I?ic?a/iue (aeey iieueciaaoaey) aeinooi e oaeaeaiiui aeaiiui
i?aaeiieaaaao eniieueciaaiea a i?eeeaaeiuo i?ia?aiiao oaeiai eioa?oaena
n na?aa?ii AAe, eioi?ue iicaieyao ia?aiineoue aeaiiua a naoe n iaeiiai
ocea ia ae?oaie, ia o?aaoy i?e yoii iiaeeoeeaoeee oaenoa i?ia?aiiu.
Eiuie neiaaie, aeinooi e eioi?iaoeeiiiui ?ano?nai aeieaeai auoue
iieiinoueth i?ic?a/ai ioiineoaeueii ?aniieiaeaiey aeaiiuo.

Ethaie iieueciaaoaeue eee ethaay i?eeeaaeiay i?ia?aiia iia?e?oao n
iaeiie eee ianeieueeeie aacaie aeaiiuo. A oii neo/aa, eiaaea i?eeeaaeiay
i?ia?aiia e na?aa? AAe auiieiythony ia iaeiii e oii aea ocea, i?iaeaiu
?aniieiaeaiey ia aicieeaao. Aeey iieo/aiey aeinooia e aaca aeaiiuo,
iieueciaaoaeth eee i?ia?aiia aeinoaoi/ii oeacaoue eiy aacu.

Iaeiaei a oii neo/aa, eiaaea i?eeeaaeiay i?ia?aiia caioneaaony ia
eieaeueiii ocea, a aaca aeaiiuo iaoiaeeony ia oaeaeaiiii, aicieeaao
i?iaeaia eaeaioeoeeaoeee oaeaeaiiiai ocea. Aeey oiai, /oiau iieo/eoue
aeinooi e aaca aeaiiuo ia oaeaeaiiii ocea, iaiaoiaeeii oeacaoue eiy
oaeaeaiiiai ocea e eiy aacu aeaiiuo. Anee eniieueciaaoue aeanoei
oeene?iaaiiia eiy ocea a ia?a “eiy_ocea, eiy_AAe”, oi i?eeeaaeiay
i?ia?aiia noaiiaeony caaeneiie io ?aniieiaeaiey AAe. Iai?eia?, ia?auaiea
e AAe “host::stock”, aaea ia?aue eiiiiiaio anoue eiy ocea, aoaeao
caaeneiui io ?aniieiaeaiey.

Iaeii ec aiciiaeiuo ?aoaiee yoie i?iaeaiu ninoieo a eniieueciaaiee
ae?ooaeueiuo eiai oceia. Oi?aaeaiea eie iaania/eaaaony niaoeeaeueiui
i?ia?aiiiui eiiiiiaioii NOAAe – na?aa?ii eiai (Name Server), eioi?ue
aae?anoao cai?inu eeeaioia e na?aa?ai.

I?e onoaiiaea eiiiiiaioia DBMS Client Net ia eieaeueiuo oceao
auiieiyaony i?ioeaaeo?a eaeaioeoeeaoeee oceia, eiaaea ?aaeueiiio eiaie
oaeaeaiiiai ocea noaaeony a niioaaonoaea ae?ooaeueiia eiy, eioi?ia caoai
eniieuecoaony i?e ia?auaiee e aaca aeaiiuo. Anee aaca aeaiiuo ia?aianaia
ia ae?oaie ocae, oi ieeaeeo eciaiaiee a i?eeeaaeioth i?ia?aiio aiineoue
ia ioaeii – aeinoaoi/ii eeoue iinoaaeoue a niioaaonoaea ae?ooaeueiiio
eiaie eiy iiaiai ocea.

Eeeaio e na?aa? acaeiiaeaenoaotho ii naoe n eiie?aoiie oiiieiaeae; aeey
iiaeaea?aeee acaeiiaeaenoaey anaaaea eniieuecoaony ii?aaeaeaiiue
i?ioieie. Neaaeiaaoaeueii, iii aeieaeii auoue i?aaieciaaii oaeei
ia?acii, /oiau iaania/eaaoue iacaaeneiinoue eae io eniieuecoaiiai
naoaaiai aiia?aoiiai iaania/aiey, oae e io i?ioieieia naoaaiai iaiaia.
*oiau iaania/eoue i?ic?a/iue aeinooi iieueciaaoaeae e i?ia?aii e
oaeaeaiiui aeaiiui a naoe, iauaaeeiythuae ?acii?iaeiua eiiiuethoa?u,
eiiioieeaoeeiiiue na?aa? aeieaeai iiaeaea?aeeaaoue eae iiaeii aieaa
oe?ieee aeeaiacii naoaauo i?ioieieia (TCP/IP, DECnet, SNA, SPX/IPX,
NetBIOS, AppleTalk, e ae?.).

Eae oieueei ianeieueei eiiiuethoa?ia ?acee/iuo iiaeaeae iiae oi?aaeaieai
?acee/iuo iia?aoeeiiiuo nenoai niaaeeiythony a naoue, n?aco aicieeaao
aii?in i niaeaniaaiee oi?iaoia i?aaenoaaeaiey aeaiiuo. Aeaenoaeoaeueii,
a naoe iiaoo auoue eiiiuethoa?u, ioee/athueany ?ac?yaeiinoueth (16-oe,
32-o e 64-o ?ac?yaeiua i?ioeanni?u), ii?yaeeii neaaeiaaiey aaeo a neiaa,
i?aaenoaaeaieai /enae n ieaaathuae oi/eie e o.ae. Caaea/a
eiiioieeaoeeiiiiai na?aa?a ninoieo a oii, /oiau ia o?iaia iaiaia
aeaiiuie iaania/eoue niaeaniaaiea oi?iaoia iaaeaeo oaeaeaiiui e
eieaeueiui oceaie n oai, /oiau aeaiiua, ecaea/aiiua na?aa?ii ec aacu ia
oaeaeaiiii ocea e ia?aaeaiiua ii naoe, auee i?aaeeueii enoieeiaaiu
i?eeeaaeiie i?ia?aiiie ia eieaeueiii ocea.

A iaiaeii?iaeiie eiiiuethoa?iie n?aaea i?e acaeiiaeaenoaee eeeaioa e
na?aa?a aicieeaao oaeaea caaea/a o?aineyoeee eiaeia. Na?aa? iiaeao
?aaioaoue n iaeiie eiaeiaie oaaeeoeae (iai?eia?, EBCDIC), eeeaio – n
ae?oaie (iai?eia?, ASCII), i?e yoii i?ienoiaeeo ?anniaeaniaaiea
o?aeoiaee eiaeia neiaieia. Iiyoiio, anee ia eieaeueiii ocea
eniieuecoaony iaeia eiaeiaay oaaeeoea, a ia oaeaeaiiii – ae?oaay, oi i?e
ia?aaea/a cai?inia ii naoe e i?e iieo/aiee ioaaoia ia ieo iaiaoiaeeii
iaania/eoue o?aineyoeeth eiaeia. ?aoaiea yoie caaea/e oaeaea eiaeeony ia
eiiioieeaoeeiiiue na?aa?.

A ?aaeueiie aeecie na?aa? aacu aeaiiuo aeieaeai ianeoaeeaaoue
iaeiia?aiaiii iiiaeanoai cai?inia io eeeaioia – neaaeiaaoaeueii, a iaeei
iiiaio a?aiaie oaeeo ia? «eeeaio-na?aa?» iiaeao auoue ianeieueei. Oaeei
ia?acii, ana i?iaeaiu acaeiiaeaenoaey aeieaeiu ?aoaoueny
eiiioieeaoeeiiiui na?aa?ii aeey anao yoeo acaeiiaeaenoaothueo ia?.

Nenoaiu n a?oeoaeoo?ie “iaeei-e-iaeiiio” aeey ianeoaeeaaiey na?aa?ii
aacu aeaiiuo iaeiia?aiaiii iiiaeanoaa eeeaioia auioaeaeaiu caa?oaeaoue
ioaeaeueiue eiiioieeaoeeiiiue na?aa? aeey eaaeaeie ia?u “eeeaio-na?aa?”.
A ?acoeueoaoa iaa?ocea ia iia?aoeeiiioth nenoaio oaaee/eaaaony, ?acei
aic?anoaao iauaa /enei aa i?ioeannia, ?anoiaeothueo au/eneeoaeueiua
?ano?nu. Yoi – iaeei ec iaaeinoaoeia a?oeoaeoo?u “iaeei-e-iaeiiio”.

Eiaiii iiyoiio aeey nia?aiaiiuo ?ani?aaeaeaiiuo NOAAe aaaeii eiaoue
iiiaiiioieiaue eiiioieeaoeeiiiue na?aa?, eioi?ue aa?ao ia naay caaea/e
naoaaie iiaeaea?aeee iiiaeanoaa eeeaioia, iaeiia?aiaiii ia?auathueony e
na?aa?o. Ia eaaeaeii ocea naoe ii iiaeaea?aeeaaao iiiaeanoai ia?
niaaeeiaiee “eeeaio-na?aa?” e iicaieyao nouanoaiaaoue iaeiia?aiaiii
iiiaeanoao iacaaeneiuo naainia ?aaiou n aacaie aeaiiuo.

N oi/ee c?aiey eeeaioa aeinooi e ?ani?aaeaeaiiie aaca aeaiiuo aeieaeai
auaeyaeaoue oi/ii oae aea, eae aeinooi e oeaio?aeeciaaiiie AAe. I?e
i?aaiecaoeee i?ic?a/iiai aeinooia e ?ani?aaeaeaiiie aaca aeaiiuo
aicieeatho neaaeothuea caaea/e:

Oi?aaeaiea eiaiaie a ?ani?aaeaeaiiie n?aaea;

Iioeiecaoeey ?ani?aaeaeaiiuo cai?inia;

Oi?aaeaiea ?ani?aaeaeaiiuie o?aicaeoeeyie.

Ia?aay ?aoaaony iooai eniieueciaaiey aeiaaeueiiai neiaa?y aeaiiuo. Ii
o?aieo eioi?iaoeeth i ?ani?aaeaeaiiie aaca: ?aniieiaeaiea aeaiiuo,
aiciiaeiinoe ae?oaeo NOAAe (anee eniieuecoaony oethc), naaaeaiey i
nei?inoe ia?aaea/e ii naoe n ?acee/iie oiiieiaeae e o.ae.

Aeiaaeueiue neiaa?ue aeaiiuo – yoi iaoaieci ioneaaeeaaiey ?aniieiaeaiey
iauaeoia a ?ani?aaeaeaiiie AAe. Aeaiiua iiaoo o?aieoueny ia eieaeueiii
ocea, ia oaeaeaiiii ocea, eee ia iaieo oceao – eo ?aniieiaeaiea aeieaeii
inoaaaoueny i?ic?a/iui eae aeey eiia/iiai iieueciaaoaey, oae e aeey
i?ia?aii. Ia ioaeii yaiui ia?acii oeacuaaoue ianoi ?aniieiaeaiey aeaiiuo
– i?ia?aiia aeieaeia auoue iieiinoueth iacaaeneia io oiai, ia eaeeo
oceao ?aciauathony aeaiiua, n eioi?uie iia iia?e?oao.

*oi eanaaony aoi?ie caaea/e, oi iia o?aaoao eioaeeaeooaeueiiai ?aoaiey.
?ani?aaeaeaiiue cai?in cao?aaeaaao ianeieueei aac aeaiiuo ia ?acee/iuo
oceao, i?e/ai iauaiu auai?ee iiaoo auoue aanueia ?acee/iuie. Aiciiaeiu
neooaoeee, eiaaea ?acoeueoe?othuay oaaeeoea cai?ina i?aaenoaaeyao niaie
iauaaeeiaiea (join) aeaoo oaaeeoe, i?e/ai iaeia ec ieo iaoiaeeony ia
eieaeueiii ocea, a ae?oaay – ia oaeaeaiiii. Aeaiiue cai?in –
?ani?aaeaeaiiue, oae eae cao?aaeaaao oaaeeoeu, i?eiaaeeaaeauea ?acee/iui
aacai aeaiiuo. Aeey aai ii?iaeueiiai auiieiaiey iaiaoiaeeii eiaoue iaa
enoiaeiua oaaeeoeu ia iaeiii ocea. Neaaeiaaoaeueii, iaeia ec oaaeeoe
aeieaeia auoue ia?aaeaia ii naoe. I/aaeaeii, /oi yoi aeieaeia auoue
oaaeeoea iaiueoaai ?acia?a. Iiyoiio iioeiecaoi? ?ani?aaeaeaiiuo cai?inia
iaycaoaeueii aeieaeai o/eouaaoue ?acia?u oaaeeoe. A i?ioeaiii neo/aa
cai?in aoaeao auiieiyoueny iai?aaeneacoaii aeieai.

Iiieii ?acia?a oaaeeoe, iioeiecaoi? ?ani?aaeaeaiiuo cai?inia aeieaeai
o/eouaaoue oaeaea iiiaeanoai aeiiieieoaeueiuo ia?aiao?ia, a oii /enea
noaoenoeeo ?ani?aaeaeaiey aeaiiuo ii oceai, iauai aeaiiuo, ia?aaeaaaaiuo
iaaeaeo oceaie, nei?inoue eiiioieeaoeeiiiuo eeiee, no?oeoo?u o?aiaiey
aeaiiuo, niioiioaiea i?iecaiaeeoaeueiinoe i?ioeanni?ia ia ?aciuo oceao e
o.ae. Ana yoe aeaiiua eae ?ac e niaea?aeaony a aeiaaeueiii neiaa?a
aeaiiuo.

?aoaiea anao o?ao caaea/, aiceiaeaii ia niaoeeaeueiue eiiiiiaio NOAAe –
na?aa? ?ani?aaeaeaiiuo aac aeaiiuo (Distributed Database Server).

Anee aaca aeaiiuo ?aniieiaeaia ia iaeiii ocea, a na?aa? AAe e
i?eeeaaeiay i?ia?aiia auiieiythony oai aea, oi ia o?aaoaony ie
eiiioieeaoeeiiiue na?aa?, ie na?aa? ?ani?aaeaeaiiie AAe. Eiaaea aea
i?eeeaaeiay i?ia?aiia auiieiyaony ia eieaeueiii ocea, AAe iaoiaeeony ia
oaeaeaiiii ocea e oai aea auiieiyaony na?aa? AAe, oi ia oaeaeaiiii ocea
iaiaoiaeei eiiioieeaoeeiiiue na?aa?, a ia eieaeueiii – na?aeniay
eiiioieeaoeeiiiay i?ia?aiia.

Anee eieaeueiua AAe ?aniieiaeaiu ia ianeieueeeo oceao, oi aeey aeinooia
e ?ani?aaeaeaiiie AAe iaiaoiaeei e na?aa? ?ani?aaeaeaiiie AAe, e
eiiioieeaoeeiiiue na?aa?.

Aaaeiaeoaa o?aaiaaiea e nia?aiaiiui NOAAe – iaaeiia?aaaeueiinoue (eee
eioa?iia?aaaeueiinoue). Yoi ea/anoai iiaeii o?aeoiaaoue eae ioe?uoinoue
nenoaiu, iicaieythuoth ano?aeaaoue aa eae eiiiiiaio a neiaeioth
?acii?iaeioth ?ani?aaeaeaiioth n?aaeo. Iaaeiia?aaaeueiinoue aeinoeaaaony
eae ca n/ao eniieueciaaiey eioa?oaenia, niioaaonoaothueo
iaaeaeoia?iaeiui, iaoeeiiaeueiui e i?iiuoeaiiui noaiaea?oai, oae e ca
n/ao niaoeeaeueiuo ?aoaiee.

Aeey NOAAe yoi ea/anoai icia/aao neaaeothuaa:

niiniaiinoue i?eeiaeaiee, nicaeaiiuo n?aaenoaaie ?ac?aaioee aeaiiie
NOAAe, iia?e?iaaoue iaae aacaie aeaiiuo a “/oaeii” oi?iaoa oae, eae
aoaeoi yoi nianoaaiiua aacu aeaiiuo;

naienoai NOAAe, iicaieythuaa ae neoaeeoue a ea/anoaa iinoaaueea aeaiiuo
aeey ethauo i?eeiaeaiee, nicaeaiiuo n?aaenoaaie ?ac?aaioee o?aoueeo
oe?i, iiaeaea?aeeaathueo iaeioi?ue noaiaea?o ia?auaiey e aacai aeaiiuo.

Ia?aia aeinoeaaaony eniieueciaaieai oethcia, aoi?ia – eniieueciaaieai
eioa?oaenia ODBC (Open Database Connectivity) e BDE (Borland Database
Engine).

Nia?aiaiiua eioi?iaoeeiiiua nenoaiu o?aaotho aeinooia e ?acii?iaeiui
aacai aeaiiuo. Yoi icia/aao, /oi a i?eeeaaeiie i?ia?aiia aeey
?aaeecaoeee cai?inia e aacai aeaiiuo aeieaeiu auoue eniieueciaaiu oaeea
n?aaenoaa, /oiau cai?inu auee iiiyoiu ?acee/iui NOAAe, eae ?aeyoeeiiiui,
oae e iie?athueiny ia ae?oaea iiaeaee aeaiiuo. Iaeiei ec aiciiaeiuo
iooae yaeyaony iaiauaiiue iaai? ?acee/iuo aeeaeaeoia ycuea SQL.

Nouanoaoao aeueoa?iaoeaa oaoiieiaee ?ani?aaeaeaiiuo AAe – oe?aaee?iaaiea
aeaiiuo. I?eioeeieaeueiia ioee/ea oaoiieiaee oe?aaee?iaaiey aeaiiuo io
oaoiieiaee ?ani?aaeaeaiiuo aac aeaiiuo (eioi?oth /anoi aeey e?aoeinoe
iacuaatho oaoiieiaeae STAR) caeeth/aaony a ioeaca io ?ani?aaeaeaiiuo
aeaiiuo. Aa nooue ninoieo a oii, /oi ethaay AAe (eae aeey NOAAe, oae e
aeey ?aaioathueo n iae iieueciaaoaeae) anaaaea yaeyaony eieaeueiie;
aeaiiua anaaaea ?aciauathony eieaeueii ia oii ocea naoe, aaea iie
ia?aaaouaathony; ana o?aicaeoeee a nenoaia caaa?oathony eieaeueii.

Oe?aaee?iaaiea aeaiiuo – yoi aneio?iiiue ia?aiin eciaiaiee iauaeoia
enoiaeiie aacu aeaiiuo (source database) a AAe, i?eiaaeeaaeauea
?acee/iui oceai ?ani?aaeaeaiiie nenoaiu. Ooieoeee oe?aaee?iaaiey aeaiiuo
auiieiyao niaoeeaeueiue iiaeoeue NOAAe – na?aa? oe?aaee?iaaiey aeaiiuo,
iacuaaaiue ?aieeeaoi?ii (replicator). Aai caaea/a – iiaeaea?aeea
eaeaioe/iinoe aeaiiuo a i?eieiathueo aacao aeaiiuo (target database)
aeaiiui a enoiaeiie AAe. Neaiaeii aeey caionea ?aieeeaoi?a neoaeeo
n?aaaouaaiea o?eaaa?a, ia?aoaaouaathuaai ethaua eciaiaiey oe?aaee?oaiiai
iauaeoa AAe. Aiciiaeii e i?ia?aiiiia oi?aaeaiea ?aieeeaoi?ii
iin?aaenoaii neaiaeecaoi?ia i niauoeyo a aaca aeaiiuo.

A ea/anoaa aacena aeey oe?aaee?iaaiey aunooiaao o?aicaeoeey e AAe. A oi
aea a?aiy aiciiaeai ia?aiin eciaiaiee a?oiiaie o?aicaeoeee,
ia?eiaee/anee eee a iaeioi?ue iiiaio a?aiaie, /oi aeaao aiciiaeiinoue
enneaaeiaaoue ninoiyiea i?eieiathuae AAe ia ii?aaeaeaiiue iiiaio
a?aiaie.

Aeaoaee oe?aaee?iaaiey aeaiiuo iieiinoueth ne?uou io i?eeeaaeiie
i?ia?aiiu; aa ooieoeeiie?iaaiea ieeae ia caaeneo io ?aaiou ?aieeeaoi?a,
eioi?ue oeaeeeii iaoiaeeony a aaaeaiee aaeieieno?aoi?a AAe.
Neaaeiaaoaeueii, aeey ia?aiina i?ia?aiiu a ?ani?aaeaeaiioth n?aaeo n
oe?aaee?oaiuie aeaiiuie ia o?aaoaony aa iiaeeoeoee?iaaoue.

Iniaaiiinoue oaoiieiaee ?ani?aaeaeaiiuo AAe – neio?iiiia caaa?oaiea
o?aicaeoeee iaeiia?aiaiii ia ianeieueeeo oceao ?ani?aaeaeaiiie nenoaiu,
oi anoue neio?iiiay oeenaoeey eciaiaiee a ?ani?aaeaeaiiie AAe.
Iaaeinoaoie oaoiieiaee STAR – aeanoeea o?aaiaaiey e i?iecaiaeeoaeueiinoe
e iaaeaaeiinoe eaiaeia nayce. Anee AAe ?ani?aaeaeaia ii ianeieueeei
oa??eoi?eaeueii oaeaeaiiui oceai, iauaaeeiaiiui iaaeeaiiuie e
iaiaaeaaeiuie eaiaeaie nayce, a /enei iaeiia?aiaiii ?aaioathueo
iieueciaaoaeae ninoaaeyao aeanyoee e auoa, oi aa?iyoiinoue oiai, /oi
?ani?aaeaeaiiay o?aicaeoeey aoaeao caoeene?iaaia a iaic?eiii a?aiaiiii
eioa?aaea, noaiiaeony /?acau/aeii iaeie. A oaeeo oneiaeyo ia?aaioea
?ani?aaeaeaiiuo aeaiiuo i?aeoe/anee iaaiciiaeia.

?aaeueiie aeueoa?iaoeaie oaoiieiaee STAR yaeyaony oaoiieiaey
oe?aaee?iaaiey aeaiiuo, ia o?aaothuay neio?iiiie oeenaoeee eciaiaiee. A
aeaenoaeoaeueiinoe aeaeaei ia ai anao caaea/ao o?aaoaony iaania/aiea
eaeaioe/iinoe AAe ia ?acee/iuo oceao a ethaia a?aiy. Aeinoaoi/ii
iiaeaea?aeeaaoue oiaeaeanoaaiiinoue aeaiiuo eeoue a ii?aaeaeaiiua
e?eoe/iua iiiaiou a?aiaie. Neaaeiaaoaeueii, iiaeii iaeaieeaaoue
eciaiaiey a aeaiiuo a aeaea o?aicaeoeee a iaeiii ocea e ia?eiaee/anee
eiie?iaaoue yoe eciaiaiey ia ae?oaea oceu.

I?aeiouanoaa oaoiieiaee oe?aaee?iaaiey aeaiiuo:

Aeaiiua anaaaea ?aniieiaeaiu oai, aaea iie ia?aaaouaathony –
neaaeiaaoaeueii, nei?inoue aeinooia e iei nouanoaaiii oaaee/eaaaony.

Ia?aaea/a oieueei iia?aoeee, eciaiythueo aeaiiua (a ia anao iia?aoeee
aeinooia e oaeaeaiiui aeaiiui, eae a oaoiieiaee STAR), e e oiio aea a
aneio?iiiii ?aaeeia iicaieyao cia/eoaeueii oiaiueoeoue o?aoee.

Ni noi?iiu enoiaeiie AAe aeey i?eieiathueo AAe ?aieeeaoi? aunooiaao eae
i?ioeann, eieoeee?iaaiiue iaeiei iieueciaaoaeai, a oi a?aiy eae a
oece/anee ?ani?aaeaeaiiie n?aaea n eaaeaeui eieaeueiui na?aa?ii
?aaioatho ana iieueciaaoaee ?ani?aaeaeaiiie nenoaiu, eiieo?e?othuea ca
?ano?nu ae?oa n ae?oaii.

Ieeaeie i?iaeieaeeoaeueiue naie nayce ia a ninoiyiee ia?ooeoue ia?aaea/o
eciaiaiee. Aeaei a oii, /oi oe?aaee?iaaiea i?aaeiieaaaao aooa?ecaoeeth
iioiea eciaiaiee (o?aicaeoeee); iinea ainnoaiiaeaiey nayce ia?aaea/a
aiciaiiaeyaony n oie o?aicaeoeee, ia eioi?ie oe?aaee?iaaiea auei
i?a?aaii.

Oaoiieiaey oe?aaee?iaaiey aeaiiuo eiaao e iaaeinoaoee, auoaeathuea ec aa
niaoeeoeee. Iai?eia?, iaaiciiaeii iieiinoueth eneeth/eoue eiioeeeou
iaaeaeo aeaoiy aa?neyie iaeiie e oie aea caiene. Iie iiaoo aicieeiooue,
eiaaea aneaaenoaea aneio?iiiinoe ia?aaea/e aeaiiuo aeaa iieueciaaoaey ia
?aciuo oceao eni?aayo iaeio e oo aea caienue a oio iiiaio, iiea
eciaiaiey a aeaiiuo ec ia?aie aacu aeaiiuo aua ia auee ia?aianaiu ai
aoi?oth. Neaaeiaaoaeueii, i?e i?iaeoe?iaaiee ?ani?aaeaeaiiie n?aaeu n
eniieueciaaieai oaoiieiaee oe?aaee?iaaiey aeaiiuo iaiaoiaeeii
i?aaeoniio?aoue eiioeeeoiua neooaoeee e cai?ia?aiie?iaaoue ?aieeeaoi? ia
eaeie-eeai aa?eaio eo ?ac?aoaiey.

1.4 Acaeiiaeaenoaea n PC-i?eaioe?iaaiiuie NOAAe

Ia?aiia/aeueii i?ioanneiiaeueiua NOAAe nicaeaaaeenue aeey iiuiuo
aunieii?iecaiaeeoaeueiuo ieaooi?i – IBM, DEC, Helwett-Packard, Sun. Ii
caoai, o/eouaay ana aic?anoathuoth iiioey?iinoue e oe?ieia
?ani?ino?aiaiea ia?niiaeueiuo eiiiuethoa?ia, ?ac?aaio/eee i?enooieee e
ia?aiino (ii?oe?iaaieth) NOAAe a iia?aoeeiiiua n?aaeu
desktop-eiiiuethoa?ia (OS/2, NetWare, UnixWare, SCO UNIX).

A ianoiyuaa a?aiy aieueoeinoai eiiiaiee – iinoaaueeia NOAAe ?acaeaaao
o?e iai?aaeaiey naieo nenoai. Ai-ia?auo, niaa?oainoaiaaiea NOAAe aeey
ei?ii?aoeaiuo eioi?iaoeeiiiuo nenoai, eioi?ua oa?aeoa?ecothony aieueoei
/eneii iieueciaaoaeae (io 100 e auoa), aacaie aeaiiuo ia?iiiiai iauaia
(eo /anoi iacuaatho naa?oaieueoeie aacaie aeaiiuo – Very Large Data Base
– VLDB), niaoaiiui oa?aeoa?ii ia?aaioee aeaiiuo (?aoaiea caaea/
iia?aoeaiie ia?aaioee o?aicaeoeee e iiaeaea?aeee i?eiyoey ?aoaiee) e
o.ae. Yoi – o?aaeeoeeiiiay iaeanoue mainframe-nenoai e i?eaeeaeathueony
e iei ii i?iecaiaeeoaeueiinoe RISC-eiiiuethoa?ia.

Ae?oaia iai?aaeaiea – NOAAe, iiaeaea?aeeaathuea oae iacuaaaiua ?aai/ea
a?oiiu. Yoi iai?aaeaiea oa?aeoa?ecoaony ioiineoaeueii iaaieueoei
eiee/anoaii iieueciaaoaeae n nio?aiaieai, oai ia iaiaa, anao
“iiiaiiieueciaaoaeueneeo” ea/anoa. Nenoaiu yoiai eeanna i?eaioe?iaaiu
i?aeiouanoaaiii ia “ioeniua” i?eiaiaiey, ia o?aaothuea niaoeeaeueiuo
aiciiaeiinoae. Oae, aieueoeinoai nia?aiaiiuo iiiaiiieueciaaoaeueneeo
NOAAe eiatho aa?nee nenoaiu, ooieoeeiie?othuea a naoaaie iia?aoeeiiiie
nenoaia Novell NetWare. ssae?i NOAAe ioi?ieaii caeanue eae caa?oaeaaiue
iiaeoeue NetWare (NetWare Loadable Module – NLM), auiieiythueeny ia
oaeeiaii na?aa?a. Aaca aeaiiuo oaeaea ?aniieaaaaony ia oaeeiaii na?aa?a.
SQL-cai?inu iinooiatho e yae?o NOAAe io i?eeeaaeiuo i?ia?aii, eioi?ua
caioneathony ia noaioeeyo naoe – ia?niiaeueiuo eiiiuethoa?ao (ioiaoei,
/oi, ianiio?y ia eniieueciaaiea oaeeiaiai na?aa?a, caeanue iu eiaai
aeaei n RDA-iiaeaeueth).

Iaeiiaoe, iiaue eiioeuen a ?acaeoee iieo/eei iai?aaeaiea ianoieueiuo
(desktop) aa?nee NOAAe, i?eaioe?iaaiiuo ia ia?niiaeueiia eniieueciaaiea
– i?aeiouanoaaiii a iia?aoeeiiiie n?aaea MS Windows (nenoaiu yoiai
eeanna iieo/eee iaoi?iaeueiia ii?aaeaeaiea “light” eee “local”).

No?aieaiea eiiiaiee – iinoaaueeia NOAAe eiaoue oaeoe/anee ii o?e
aa?eaioa naieo nenoai, iie?uaathueo aanue niaeo? aiciiaeiuo i?eiaiaiee,
auaeyaeeo aeey iieueciaaoaeae /?acau/aeii i?eaeaeaoaeueii.
Aeaenoaeoaeueii, aeey niaoeeaeenoa eneeth/eoaeueii oaeiaii eiaoue ia
naiai ii?oaoeaiii eiiiuethoa?a eieaeueioth aaco aeaiiuo (iinoiyiii
eniieuecoaioth ai a?aiy eiiaiaee?iaie) a oii aea oi?iaoa e
ia?aaaouaaaioth ii oai aea i?aaeeai, /oi e noaoeeiia?ioth ei?ii?aoeaioth
aaco oe?iu, eoaea nia?aiiua aeaiiua iiaoo auoue aac o?oaea aeinoaaeaiu.

A iineaaeiea aiaeu (1987-94) a iaoae no?aia auei ?ac?aaioaii iiiaeanoai
i?ia?aii, i?eaioe?iaaiiuo ia eniieueciaaiea NOAAe oeia PARADOX, FoxPRO,
dBASE IV, Clipper. I?e ia?aoiaea ia aieaa iiuioth
iiiaiiieueciaaoaeueneoth NOAAe o iieueciaaoaeae aicieeaao anoanoaaiiia
aeaeaiea eioaa?e?iaaoue oaea nouanoaothuea ?ac?aaioee a yoo n?aaeo.
Iai?eia?, iiaeao aicieeiooue iio?aaiinoue o?aieoue eieaeueiua aeaiiua ia
ia?niiaeueiii eiiiuethoa?a e inouanoaeyoue e iei aeinooi n iiiiuueth
nenoaiu FoxPRO, e iaeiia?aiaiii eiaoue aeinooi e aeiaaeueiie aaca
aeaiiuo iiae oi?aaeaieai NOAAe Oracle. I?aaiecaoeey oaeiai aeinooia,
eiaaea i?ia?aiia iiaeao iaeiia?aiaiii ?aaioaoue e n ia?niiaeueiie, e n
iiiaiiieueciaaoaeueneie NOAAe, i?aaenoaaeyao niaie neiaeioth i?iaeaio ii
neaaeothuae i?e/eia.

Eae ecaanoii, ?ac?aaio/eee PC-i?eaioe?iaaiiuo NOAAe ia?aiia/aeueii
eniieueciaaee naie nianoaaiiue eioa?oaen e aacai aeaiiuo, ieeae ia
o/eouaay o?aaiaaiey noaiaea?oa ycuea SQL. Eeoue aiineaaenoaee iie noaee
iinoaiaiii aeeth/aoue a naie nenoaiu aiciiaeiinoe ?aaiou n aacie aeaiiuo
i?e iiiiue SQL. A oi aea a?aiy aeey enoeiii iiiaiiieueciaaoaeueneeo
NOAAe eioa?oaen SQL – oaeoe/aneee noaiaea?o. I?e yoii aicieeea caaea/a
niaeaniaaiey eioa?oaenia NOAAe ?acee/iuo eeannia. Iia iiaeao ?aoaoueny
ianeieueeeie niiniaaie, ii aieueoeinoai ec ieo eiatho /anoiue oa?aeoa?.
?anniio?ei iaeaieaa iauaa ?aoaiea yoie caaea/e.

Niaoeeaeenou oe?iu Microsoft ?ac?aaioaee noaiaea?o Open Database
Connectivity (ODBC). Ii i?aaenoaaeyao niaie noaiaea?o i?eeeaaeiiai
i?ia?aiiiiai eioa?oaena i?eeeaaeiuo (Application Programming Interface –
API) e iicaieyao i?ia?aiiai, ?aaioathuei a n?aaea Microsoft Windows,
acaeiiaeaenoaiaaoue (iin?aaenoaii iia?aoi?ia ycuea SQL) n ?acee/iuie
NOAAe, eae ia?niiaeueiuie, oae e iiiaiiieueciaaoaeueneeie,
ooieoeeiie?othueie a ?acee/iuo iia?aoeeiiiuo nenoaiao. Oaeoe/anee,
eioa?oaen ODBC oieaa?naeueiui ia?acii ioaeaeyao /enoi i?eeeaaeioth,
niaea?aeaoaeueioth noi?iio i?eeiaeaiee (ia?aaioea yeaeo?iiiuo oaaeeoe,
noaoenoe/aneee aiaeec, aeaeiaay a?aoeea) io nianoaaiii ia?aaioee e
iaiaia aeaiiuie n NOAAe. Iniiaiay oeaeue ODBC – naeaeaoue
acaeiiaeaenoaea i?eeiaeaiey e NOAAe i?ic?a/iui, ia caaenyuei io eeanna e
iniaaiiinoae eniieuecoaiie NOAAe (iiaeeueiui n oi/ee c?aiey
eniieuecoaiie NOAAe).

Ioiaoei, /oi noaiaea?o ODBC yaeyaony iaiouaieaiie /anoueth naiaenoaa
noaiaea?oia, iaeaa/athueo iaienaiea e iaania/eaathueo aa?oeeaeueioth
ioe?uoinoue i?eeiaeaiee (WOSA – Windows Open Services Architecture –
ioe?uoay a?oeoaeoo?a na?aenia nenoaiu Windows).

Eioa?oaen ODBC iaania/eaaao acaeiioth niaianoeiinoue na?aa?iuo e
eeeaioneeo eiiiiiaioia aeinooia e aeaiiui. Aeey ?aaeecaoeee
oieoeoee?iaaiiiai aeinooia e ?acee/iui NOAAe auei aaaaeaii iiiyoea
ae?aeaa?a ODBC (i?aaenoaaeythuaai niaie aeeiaie/anee caa?oaeaaioth
aeaeeioaeo).

ODBC-a?oeoaeoo?a niaea?aeeo /aou?a eiiiiiaioa:

i?eeiaeaiea;

iaiaaeaea? ae?aeaa?ia;

ae?aeaa?u;

enoi/ieee aeaiiuo.

?iee n?aaee ieo ?ani?aaeaeaiu neaaeothuei ia?acii. I?eeiaeaiea aucuaaao
ooieoeee ODBC aeey auiieiaiey SQL-eino?oeoeee, iieo/aao e eioa?i?aoe?oao
?acoeueoaou; iaiaaeaea? ae?aeaa?ia caa?oaeaao ODBC-ae?aeaa?u, eiaaea
yoiai o?aaoao i?eeiaeaiea; ODBC-ae?aeaa?u ia?aaaouaatho auciau ooieoeee
ODBC, ia?aaeatho iia?aoi?u SQL NOAAe e aica?auatho ?acoeueoao a
i?eeiaeaiea; enoi/iee aeaiiuo (data source) – iauaeo, ne?uaathuee NOAAe,
aeaoaee naoaaiai eioa?oaena, ?aniieiaeaiea e iieiia eiy aacu aeaiiuo e
o.ae.

Aeaenoaey, auiieiyaiua i?eeiaeaieai, eniieuecothuei eioa?oaen ODBC,
naiaeyony e neaaeothuaio. Aeey ia/aea naaina ?aaiou n aacie aeaiiuo
i?eeiaeaiea aeieaeii iiaeeeth/eoueny e enoi/ieeo aeaiiuo, aa
ne?uaathuaio. Caoai i?eeiaeaiea ia?auaaony e aaca aeaiiuo, iinueay
SQL-eino?oeoeee, cai?aoeaaao ?acoeueoaou, ioneaaeeaaao e ?aaae?oao ia
ioeaee e o.ae., oi anoue eiaao ianoi noaiaea?oiay noaia acaeiiaeaenoaey
i?eeiaeaiey e na?aa?a AAe, oa?aeoa?iay aeey RDA-iiaeaee. Aaaeii, /oi
noaiaea?o ODBC aeeth/aao ooieoeee oi?aaeaiey o?aicaeoeeyie (ia/aei,
oeenaoeey, ioeao o?aicaeoeee). Caaa?oea naain ?aaiou, i?eeiaeaiea
aeieaeii ioeeth/eoueny io enoi/ieea aeaiiuo.

Neie aeinooia e aeaiiui, iiaeiaiue ODBC eniieuecoao a naieo i?iaeoeoao
eiiiaiey Borland. Yoa nenoaia iineo iacaaiea Borland Database Engine
(BDE) e eiaao iaeioi?ua i?aeiouanoaa ii n?aaiaieth n ODBC.

1.5 Ia?aaioea o?aicaeoeee

O?aicaeoeey i?aaenoaaeyao niaie iineaaeiaaoaeueiinoue iia?aoi?ia ycuea
SQL, eioi?ay ?anniao?eaaaony eae iaeioi?ia iaaeaeeiia aeaenoaea iaae
aacie aeaiiuo, iniuneaiiia n oi/ee c?aiey iieueciaaoaey. A oi aea a?aiy,
yoi eiae/aneay aaeeieoea ?aaiou nenoaiu. O?aicaeoeey ?aaeecoao
iaeioi?oth i?eeeaaeioth ooieoeeth, iai?eia?, ia?aaiae aeaiaa n iaeiiai
n/aoa ia ae?oaie a aaieianeie nenoaia.

Nouanoaotho ?acee/iua iiaeaee o?aicaeoeee, eioi?ua iiaoo auoue
eeanneoeoee?iaaiu ia iniiaaiee ?acee/iuo naienoa, aeeth/athueo no?oeoo?o
o?aicaeoeee, ia?aeeaeueiinoue aioo?e o?aicaeoeee, i?iaeieaeeoaeueiinoue
e o.ae. *aua anaai eiatho a aeaeo o?aaeeoeeiiiua o?aicaeoeee,
oa?aeoa?ecoaiua /aou?ueiy eeanne/aneeie naienoaaie: aoiia?iinoe,
niaeaniaaiiinoe, eciee?iaaiiinoe, aeieaiaa/iinoe (i?i/iinoe) – ACID
(Atomicity, Consistency, Isolation, Durability). Eiiaaea o?aaeeoeeiiiua
o?aicaeoeee iacuaatho ACID-o?aicaeoeeyie. Oiiiyiooua auoa naienoaa
icia/atho neaaeothuaa:

Naienoai aoiia?iinoe au?aaeaaony a oii, /oi o?aicaeoeey aeieaeia auoue
auiieiaia a oeaeii eee ia auiieiaia aiana.

Naienoai niaeaniaaiiinoe aa?aioe?oao, /oi ii ia?a auiieiaiey o?aicaeoeee
aeaiiua ia?aoiaeyo ec iaeiiai niaeaniaaiiiai ninoiyiey a ae?oaia –
o?aicaeoeey ia ?ac?ooaao acaeiiie niaeaniaaiiinoe aeaiiuo.

Naienoai eciee?iaaiiinoe icia/aao, /oi eiieo?e?othuea ca aeinooi e aaca
aeaiiuo o?aicaeoeee oece/anee ia?aaaouaathony iineaaeiaaoaeueii,
eciee?iaaiii ae?oa io ae?oaa, ii aeey iieueciaaoaeae yoi auaeyaeeo oae,
eae aoaeoi iie auiieiythony ia?aeeaeueii.

Naienoai aeieaiaa/iinoe o?aeooaony neaaeothuei ia?acii: anee
o?aicaeoeey caaa?oaia oniaoii, oi oa eciaiaiey a aeaiiuo, eioi?ua auee
ath i?iecaaaeaiu, ia iiaoo auoue iioa?yiu ie i?e eaeeo ianoiyoaeuenoaao
(aeaaea a neo/aa iineaaeothueo ioeaie).

?anoe?aiiua o?aicaeoeee aeiioneatho oi?ie?iaaiea ec ACID-o?aicaeoeee
ea?a?oe/aneeo no?oeoo?. Anee eiie?aoiay iiaeaeue ineaaeyao iaeioi?ua ec
o?aaiaaiee ACID, oi ?a/ue eaeao ia ineaaeaiiie o?aicaeoeee.

Aiciiaeiu aeaa aa?eaioa caaa?oaiey o?aicaeoeee. Anee ana iia?aoi?u
auiieiaiu oniaoii, e a i?ioeanna auiieiaiey o?aicaeoeee ia i?iecioei
ieeaeeo naiaa i?ia?aiiiiai eee aiia?aoiiai iaania/aiey, o?aicaeoeey
oeene?oaony.

Oeenaoeey o?aicaeoeee – yoi aeaenoaea, iaania/eaathuaa caienue ia aeene
eciaiaiee a aaca aeaiiuo, eioi?ua auee naeaeaiu a i?ioeanna auiieiaiey
o?aicaeoeee. Aei oao ii?, iiea o?aicaeoeey ia caoeene?iaaia, aiciiaeii
aiioee?iaaiea yoeo eciaiaiee, ainnoaiiaeaiea aacu aeaiiuo a oi
ninoiyiea, a eioi?ii iia auea ia iiiaio ia/aea o?aicaeoeee. Oeenaoeey
icia/aao, /oi ana ?acoeueoaou auiieiaiey o?aicaeoeee noaiiayony
iinoiyiiuie. Iie noaioo aeaeeiuie ae?oaei o?aicaeoeeyi oieueei iinea
oiai, eae oaeouay o?aicaeoeey aoaeao caoeene?iaaia. Aei yoiai iiiaioa
ana aeaiiua, cao?aaeaaaiua o?aicaeoeeae, aoaeoo “aeaeiu” iieueciaaoaeth
a ninoiyiee ia ia/aei oaeouae o?aicaeoeee.

Anee a i?ioeanna auiieiaiey o?aicaeoeee i?iecioea ioeaea, aaca aeaiiuo
aeieaeia auoue aica?auaia a enoiaeiia ninoiyiea. Ioeao o?aicaeoeee – yoi
aeaenoaea, iaania/eaathuaa aiioee?iaaiea anao eciaiaiee aeaiiuo, eioi?ua
auee naeaeaiu iia?aoi?aie SQL a oaea oaeouae iacaaa?oaiiie o?aicaeoeee.

Eaaeaeue iia?aoi? a o?aicaeoeee auiieiyao naith /anoue ?aaiou, ii aeey
oniaoiiai caaa?oaiey anae ?aaiou a oeaeii o?aaoaony aaconeiaiia
caaa?oaiea eo anao. A?oiie?iaaiea iia?aoi?ia a o?aicaeoeee niiauaao
NOAAe, /oi any yoa a?oiia aeieaeia auoue auiieiaia eae aaeeiia oeaeia,
i?e/ai oaeia auiieiaiea aeieaeii iiaeaea?aeeaaoueny aaoiiaoe/anee.

A noaiaea?oa ANSI/ISO SQL ii?aaeaeaiu iiaeaeue o?aicaeoeee e ooieoeee
iia?aoi?ia COMMIT e ROLLBACK. Noaiaea?o ii?aaeaeyao, /oi o?aicaeoeey
ia/eiaaony n ia?aiai SQL-iia?aoi?a, eieoeee?oaiiai iieueciaaoaeai eee
niaea?aeauaainy a i?ia?aiia. Ana iineaaeothuea SQL-iia?aoi?u ninoaaeytho
oaei o?aicaeoeee. O?aicaeoeey caaa?oaaony iaeiei ec /aou?ao aiciiaeiuo
niiniaia:

iia?aoi? COMMIT icia/aao oniaoiia caaa?oaiea o?aicaeoeee; aai
eniieueciaaiea aeaeaao iinoiyiiuie eciaiaiey, aianaiiua a aaco aeaiiuo a
?aieao oaeouae o?aicaeoeee;

iia?aoi? ROLLBACK i?a?uaaao o?aicaeoeeth, ioiaiyy eciaiaiey, naeaeaiiua
a aaca aeaiiuo a ?aieao yoie o?aicaeoeee; iiaay o?aicaeoeey ia/eiaaony
iaiin?aaenoaaiii iinea eniieueciaaiey ROLLBACK;

oniaoiia caaa?oaiea i?ia?aiiu, a eioi?ie auea eieoeee?iaaia oaeouay
o?aicaeoeey, icia/aao oniaoiia caaa?oaiea o?aicaeoeee (eae aoaeoi aue
eniieueciaai iia?aoi? COMMIT);

ioeai/iia caaa?oaiea i?ia?aiiu i?a?uaaao o?aicaeoeeth (eae aoaeoi aue
eniieueciaai iia?aoi? ROLLBACK).

Ioeao e oeenaoeey o?aicaeoeee noaiiayony aiciiaeiuie aeaaiaea?y aeo?iaeo
o?aicaeoeee. Ii eniieuecoaony neaaeothuei ia?acii.

Ecaanoii, /oi ana iia?aoeee iaae ?aeyoeeiiiie aacie aeaiiuo – yoi
iia?aoeee iaae no?ieaie oaaeeoe. Neaaeiaaoaeueii, aeey iaania/aiey
ioeaoa oaaeeoe e i?aaeuaeouei ninoiyieyi aeinoaoi/ii o?aieoue ia
ninoiyiey anae oaaeeoeu, a eeoue oa aa no?iee, eioi?ua iiaeaa?aeenue
eciaiaieyi.

I?e auiieiaiee ethaiai iia?aoi?a SQL, eioi?ue iiaeeoeoee?oao aaco
aeaiiuo, NOAAe aaoiiaoe/anee caiineo i/a?aaeioth caienue a aeo?iae
o?aicaeoeee. Caienue ninoieo ec aeaoo eiiiiiaioia: ia?aue – yoi
ninoiyiea no?iee aei aianaiey eciaiaiee, aoi?ie – aa aea ninoiyiea iinea
aianaiey eciaiaiee. Oieueei iinea caianaiey caiene a aeo?iae o?aicaeoeee
(eaeaieiaey «write ahead log»), NOAAe aeaenoaeoaeueii iiaeeoeoee?oao
aaco aeaiiuo. Anee iinea aeaiiiai iia?aoi?a SQL aue auiieiai iia?aoi?
COMMIT, oi a aeo?iaea o?aicaeoeee aeaeaaony ioiaoea i caaa?oaiee oaeouae
o?aicaeoeee. Anee aea iinea iia?aoi?a SQL neaaeiaae iia?aoi? ROLLBACK,
oi NOAAe i?iniao?eaaao aeo?iae o?aicaeoeee e iouneeaaao caiene,
io?aaeathuea ninoiyiea eciaiaiiuo no?ie aei iiaeeoeeaoeee. Eniieuecoy
eo, NOAAe ainnoaiaaeeaaao oa no?iee a oaaeeoeao aacu aeaiiuo, eioi?ua
auee iiaeeoeoee?iaaiu oaeouae o?aicaeoeeae – oaeei ia?acii aiioee?othony
ana eciaiaiey a aaca aeaiiuo.

Aaaeiua i?iaeaiu iiiaiiieueciaaoaeueneeo NOAAe naycaiu n i?aaiecaoeeae n
iiiiuueth iaoaiecia o?aicaeoeee iaeiia?aiaiiiai aeinooia iiiaeanoaa
iieueciaaoaeae e iaeiei e oai aea aeaiiui. Iie e?aoei iiaoo auoue
noi?ioee?iaaiu eae iioa?y eciaiaiee, iacaoeene?iaaiiua eciaiaiey e ?yae
ae?oaeo, aieaa neiaeiuo i?iaeai.

Iioa?y eciaiaiee i?ienoiaeeo a neooaoeee, eiaaea aeaa eee ianeieueei
i?ia?aii /eoatho iaeie e oa aea aeaiiua, aiinyo a ieo eaeea-eeai
eciaiaiey e caoai iuoathony iaeiia?aiaiii caienaoue ?acoeueoao ii
i?aaeiaio ianoo. ?acoiaaony, a aaca aeaiiuo iiaoo auoue nio?aiaiu
eciaiaiey, auiieiaiiua oieueei iaeiie i?ia?aiiie – ae?oaea eciaiaiey
aoaeoo iioa?yiu.

I?iaeaia iacaoeene?iaaiiuo eciaiaiee aicieeaao a neo/aa, eiaaea a
i?ioeanna auiieiaiey o?aicaeoeee iaeiie i?ia?aiiie a aeaiiua auee
aianaiu eciaiaiey, eioi?ua ooo aea i?i/eoaea ae?oaay i?ia?aiia, iaeiaei
caoai a ia?aie i?ia?aiia o?aicaeoeey auea i?a?aaia iia?aoi?ii ROLLBACK.
Iieo/aaony, /oi aoi?ay i?ia?aiia i?i/eoaea iaaa?iua, iacaoeene?iaaiiua
aeaiiua.

Aeey ono?aiaiey iiaeiaiuo i?iaeai i?eiaiythony neaaeothuea i?aaeea:

A i?ioeanna auiieiaiey o?aicaeoeee iieueciaaoaeue (eee i?ia?aiia)
“aeaeeo” oieueei niaeaniaaiiua ninoiyiey aacu aeaiiuo. Iieueciaaoaeue
(eee i?ia?aiia) ieeiaaea ia iiaeao iieo/eoue aeinooi e iacaoeene?iaaiiui
eciaiaieyi a aeaiiuo, aeinoeaiooui a ?acoeueoaoa aeaenoaee ae?oaiai
iieueciaaoaey (i?ia?aiiu).

Anee aeaa o?aicaeoeee, A e B, auiieiythony ia?aeeaeueii, oi NOAAe
iieaaaao, /oi ?acoeueoao aoaeao oaeie aea, eae anee au:

o?aicaeoeey A auiieiyeanue ia?aie, a ca iae auea auiieiaia o?aicaeoeey
B;

o?aicaeoeey B auiieiyeanue ia?aie, a ca iae auea auiieiaia o?aicaeoeey
A.

Yoi oae iacuaaaiay na?eaeecaoeey o?aicaeoeee. Oaeoe/anee iia
aa?aioe?oao, /oi eaaeaeue iieueciaaoaeue (i?ia?aiia), ia?auathuayny e
aaca aeaiiuo, ?aaioaao n iae oae, eae aoaeoi ia nouanoaoao ae?oaeo
iieueciaaoaeae (i?ia?aii), iaeiia?aiaiii n iei ia?auathueony e oai aea
aeaiiui. Aeey i?aeoe/aneie ?aaeecaoeee yoie aeenoeeieeiu aieueoeinoai
eiiia?/aneeo NOAAe eniieuecotho iaoaieci aeiee?iaie.

O?aicaeoeee iiaoo iiianoue a ooieeiaoth neooaoeeth, ninoiyiea
ia?ac?aoeiie acaeiiaeiee?iaee. Aeey a? i?aaeioa?auaiey NOAAe
ia?eiaee/anee i?iaa?yao aeiee?iaee, onoaiiaeaiiua aeoeaiuie
o?aicaeoeeyie. Anee NOAAe iaia?oaeeaaao acaeiiaeiee?iaee, iia auae?aao
iaeio ec o?aicaeoeee, aucaaaooth neooaoeeth acaeiiaeiee?iaee, e
i?a?uaaao aa. Yoi inaiaiaeaeaao aeaiiua aeey aianaiey eciaiaiee
eiieo?e?othuae o?aicaeoeeae, ?ac?aoay ooieeiaoth neooaoeeth. I?ia?aiia,
eioi?ay eieoeee?iaaea i?a?aaiioth o?aicaeoeeth, iieo/aao niiauaiea ia
ioeaea, eioi?ie?othuaa aa i i?e/eia i?a?uaaiey (eiaea ianoi ooieeiaay
neooaoeey). Ecaaaeaoue eo iiaeao e i?aaeeueiay no?aoaaey aianaiey
eciaiaiee a aaco aeaiiuo. Iaeiei ec iaeaieaa i?inouo e yooaeoeaiuo
i?aaee iiaeao auoue neaaeothuaa: ana i?ia?aiiu, eioi?ua iaiiaeytho iaeie
e oa aea oaaeeoeu, aeieaeiu, ii ia?a aiciiaeiinoe, aeaeaoue yoi a
iaeeiaeiaie iineaaeiaaoaeueiinoe.

A nia?aiaiiuo NOAAe i?aaeoniio?ai oae iacuaaaiue i?ioieie aeaoooaciaie
(eee aeaoooaciie) oeenaoeee o?aicaeoeee (two-phase commit). Oaca 1
ia/eiaaony, eiaaea i?e ia?aaioea o?aicaeoeee ano?aoeeny iia?aoi? COMMIT.
Na?aa? ?ani?aaeaeaiiie AAe (eee eiiiiiaio NOAAe, ioaa/athuee ca
ia?aaioeo ?ani?aaeaeaiiuo o?aicaeoeee) iai?aaeyao oaaaeiieaiea
“iiaeaioiaeoueny e oeenaoeee” anai na?aa?ai eieaeueiuo AAe, auiieiythuei
?ani?aaeaeaiioth o?aicaeoeeth. Anee ana na?aa?u i?eaioiaeeenue e
oeenaoeee (oi anoue ioeeeeioeenue ia oaaaeiieaiea e ioeeee aue iieo/ai),
na?aa? ?ani?aaeaeaiiie AAe i?eieiaao ?aoaiea i oeenaoeee. Na?aa?u
eieaeueiuo AAe inoathony a ninoiyiee aioiaiinoe e iaeeaeatho io iaai
eiiaiaeu “caoeene?iaaoue”. Anee oioy au iaeei ec na?aa?ia ia ioeeeeioeny
ia oaaaeiieaiea a neeo eaeeo-eeai i?e/ei, aoaeue oi aiia?aoiay eee
i?ia?aiiiay ioeaea, oi na?aa? ?ani?aaeaeaiiie AAe ioeaouaaao eieaeueiua
o?aicaeoeee ia anao oceao, aeeth/ay aeaaea oa, eioi?ua iiaeaioiaeeenue e
oeenaoeee e iiiaanoeee aai ia yoii.

Oaca 2 – na?aa? ?ani?aaeaeaiiie AAe iai?aaeyao eiiaiaeo “caoeene?iaaoue”
anai oceai, cao?iiooui o?aicaeoeeae, e aa?aioe?oao, /oi o?aicaeoeee ia
ieo aoaeoo caoeene?iaaiu. Anee naycue n eieaeueiie aacie aeaiiuo
iioa?yia a eioa?aae a?aiaie iaaeaeo iiiaioii, eiaaea na?aa?
?ani?aaeaeaiiie AAe i?eieiaao ?aoaiea i oeenaoeee o?aicaeoeee e
iiiaioii, eiaaea na?aa? eieaeueiie AAe iiae/eiyaony aai eiiaiaea, oi
na?aa? ?ani?aaeaeaiiie AAe i?iaeieaeaao iiiuoee caaa?oeoue o?aicaeoeeth,
iiea naycue ia aoaeao ainnoaiiaeaia.

1.6 N?aaenoaa caueou aeaiiuo a NOAAe

Nouanoaaiiui aniaeoii nia?aiaiiuo NOAAe yaeyaony caueoa aeaiiuo. A naiii
iauai aeaea o?aaiaaiey e aaciianiinoe ?aeyoeeiiiuo NOAAe oi?ioee?othony
oae:

aeaiiua a ethaie oaaeeoea aeieaeiu auoue aeinooiiu ia anai
iieueciaaoaeyi, a eeoue iaeioi?ui ec ieo

iaeioi?ui iieueciaaoaeyi aeieaeii auoue ?ac?aoaii iaiiaeyoue aeaiiua a
oaaeeoeao, a oi a?aiy eae aeey ae?oaeo aeiioneaaony eeoue auai? aeaiiuo
ec yoeo aea oaaeeoe

aeey iaeioi?uo oaaeeoe iaiaoiaeeii iaania/eoue auai?i/iue aeinooi e aa
noieaoeai

iaeioi?ui iieueciaaoaeyi aeieaeai auoue cai?auai iaiin?aaenoaaiiue
(/a?ac cai?inu) aeinooi e oaaeeoeai, ii ?ac?aoai aeinooi e yoei aea
oaaeeoeai a aeeaeiaa n i?eeeaaeiie i?ia?aiiie.

Noaia aeinooia e aeaiiui ai anao ?aeyoeeiiiuo NOAAe auaeyaeeo i?eia?ii
iaeeiaeiai e aace?oaony ia o?ao i?eioeeiao:

Iieueciaaoaee NOAAe ?anniao?eaathony eae iniiaiua aeaenoaothuea eeoea,
aeaeathuea iieo/eoue aeinooi e aeaiiui. NOAAe io eiaie eiie?aoiiai
iieueciaaoaey auiieiyao iia?aoeee iaae aacie aeaiiuo, oi anoue
aeiaaaeyao no?iee a oaaeeoeu (INSERT), oaeaeyao no?iee (DELETE),
iaiiaeyao aeaiiua a no?ieao oaaeeoeu (UPDATE). Iia aeaeaao yoi a
caaeneiinoe io oiai, iaeaaeaao ee eiie?aoiue iieueciaaoaeue i?aaaie ia
auiieiaiea eiie?aoiuo iia?aoeee iaae eiie?aoiui iauaeoii aacu aeaiiuo.

Iauaeou aeinooia – yoi yeaiaiou aacu aeaiiuo, aeinooiii e eioi?ui iiaeii
oi?aaeyoue (?ac?aoaoue aeinooi eee caueuaoue io aeinooia). Iau/ii
iauaeoaie aeinooia yaeythony oaaeeoeu, iaeiaei eie iiaoo auoue e ae?oaea
iauaeou aacu aeaiiuo – oi?iu, io/aou, i?eeeaaeiua i?ia?aiiu e o.ae.
Eiie?aoiue iieueciaaoaeue iaeaaeaao eiie?aoiuie i?aaaie aeinooia e
eiie?aoiiio iauaeoo.

I?eaeeaaee (priveleges) – yoi iia?aoeee, eioi?ua ?ac?aoaii auiieiyoue
iieueciaaoaeth iaae eiie?aoiuie iauaeoaie.

Oaeei ia?acii, a NOAAe aaoi?ecaoeey aeinooia inouanoaeyaony n iiiiuueth
i?eaeeaaee. Onoaiiaeaiea e eiio?ieue i?eaeeaaee – caaea/a
aaeieieno?aoi?a aacu aeaiiuo.

I?eaeeaaee onoaiaaeeaathony e ioiaiythony niaoeeaeueiuie iia?aoi?aie
ycuea SQL – GRANT (IA?AAeAOUe) e REVOKE (IOIA?AOUe). Iia?aoi? GRANT
oeacuaaao eiie?aoiiai iieueciaaoaey, eioi?ue iieo/aao eiie?aoiua
i?eaeeaaee aeinooia e oeacaiiie oaaeeoea.

Eiie?aoiue iieueciaaoaeue NOAAe iiiciaaony ii oieeaeueiiio
eaeaioeoeeaoi?o (user-id). Ethaia aeaenoaea iaae aacie aeaiiuo, ethaie
iia?aoi? ycuea SQL auiieiyaony ia aiiieiii, ii io eiaie eiie?aoiiai
iieueciaaoaey. Eaeaioeoeeaoi? iieueciaaoaey ii?aaeaeyao iaai? aeinooiiuo
iauaeoia aacu aeaiiuo aeey eiie?aoiiai oece/aneiai eeoea eee a?oiiu
eeoe. Iaeiaei ii ie/aai ia niiauaao i iaoaiecia aai nayce n eiie?aoiui
iia?aoi?ii SQL. Aeey yoiai a aieueoeinoaa NOAAe eniieuecoaony naain
?aaiou n aacie aeaiiuo. Aeey caionea ia eiiiuethoa?a-eeeaioa i?ia?aiiu
ia?aaeiaai ieaia (iai?eia?, eioa?aeoeaiiai SQL) iieueciaaoaeue aeieaeai
niiaueoue NOAAe naie eaeaioeoeeaoi? e ia?ieue. Ana iia?aoeee iaae aacie
aeaiiuo, eioi?ua aoaeoo auiieiaiu iinea yoiai, NOAAe nayaeao n
eiie?aoiui iieueciaaoaeai, eioi?ue caionoee i?ia?aiio.

Iaeioi?ua NOAAe (Oracle, Sybase, InterBase) eniieuecotho nianoaaiioth
nenoaio ia?ieae, a ae?oaeo (Ingres, Informix, MS SQL Server) i?eiaiyaony
eaeaioeoeeaoi? iieueciaaoaey e aai ia?ieue ec iia?aoeeiiiie nenoaiu.

Aeey iaeaa/aiey i?ioeanna aaeieieno?e?iaaiey aieueoiai eiee/anoaa
iieueciaaoaeae eo iauaaeeiytho a a?oiiu. O?aaeeoeeiiii i?eiaiythony aeaa
niiniaa ii?aaeaeaiey a?oii iieueciaaoaeae:

Iaeei e oio aea eaeaioeoeeaoi? eniieuecoaony aeey aeinooia e aaca
aeaiiuo oeaeie a?oiiu oece/aneeo eeoe. Yoi oi?iuaao caaea/o
aaeieieno?aoi?a aacu aeaiiuo, oae eae aeinoaoi/ii iaeei ?ac onoaiiaeoue
i?eaeeaaee aeey yoiai “iaiauaiiiai” iieueciaaoaey. Iaeiaei oaeie niinia
a iniiaiii i?aaeiieaaaao ?ac?aoaiea ia i?iniio?, auoue iiaeao, ia
aeeth/aiea, ii ie a eiai neo/aa – ia oaeaeaiea e iaiiaeaiea. Eae oieueei
eaeaioeoeeaoi? (e ia?ieue) noaiiaeony ecaanoai aieueoiio /eneo ethaeae,
aicieeaao iianiinoue ianaieoeeiie?iaaiiiai aeinooia e aeaiiui
iinoi?iiieo eeoe.

Eiie?aoiiio oece/aneiio eeoeo i?enaaeaaaony oieeaeueiue eaeaioeoeeaoi?.
A yoii neo/aa aaeieieno?aoi? aacu aeaiiuo aeieaeai iicaaioeoueny i oii,
/oiau eaaeaeue iieueciaaoaeue iieo/ee nianoaaiiua i?eaeeaaee. Anee
eiee/anoai iieueciaaoaeae aacu aeaiiuo aic?anoaao, oi aaeieieno?aoi?o
noaiiaeony ana o?oaeiaa eiio?iee?iaaoue i?eaeeaaee. A i?aaiecaoeee,
ian/eouaathuae nauoa 100 iieueciaaoaeae, ?aoaiea yoie caaea/e iio?aaoao
io iaai ianno aieiaiey.

Iiaeaea?aeea, iiieii eaeaioeoeeaoi?a iieueciaaoaey, aua e
eaeaioeoeeaoi?a a?oiiu iieueciaaoaeae. Eaaeaeue iieueciaaoaeue, e?iia
nianoaaiiiai eaeaioeoeeaoi?a, eiaao oaeaea eaeaioeoeeaoi? a?oiiu, e
eioi?ie ii i?eiaaeeaaeeo. *aua anaai a?oiia iieueciaaoaeae niioaaonoaoao
no?oeoo?iiio iiae?acaeaeaieth i?aaiecaoeee, iai?eia?, ioaeaeo.
I?eaeeaaee onoaiaaeeaathony ia oieueei aeey ioaeaeueiuo iieueciaaoaeae,
ii e aeey eo a?oii.

Iaeia ec i?iaeai caueou aeaiiuo aicieeaao ii oie i?e/eia, /oi n aacie
aeaiiuo ?aaioatho eae i?eeeaaeiua i?ia?aiiu, oae e iieueciaaoaee,
eioi?ua eo caioneatho. *anoi iaiaoiaeeiinoue caionea iaeioi?uo
i?eeeaaeiuo i?ia?aii iieueciaaoaeyie, eioi?ua iaeaaeatho ?acee/iuie
i?aaaie aeinooia e aeaiiui, i?eaiaeeo e ia?ooaieth noaiu aaciianiinoe.

Iaeii ec ?aoaiee i?iaeaiu caeeth/aaony a oii, /oiau i?eeeaaeiie
i?ia?aiia oaeaea auee i?eaeaiu iaeioi?ua i?eaeeaaee aeinooia e iauaeoai
aacu aeaiiuo. A yoii neo/aa iieueciaaoaeue, ia iaeaaeathuee
niaoeeaeueiuie i?eaeeaaeyie aeinooia e iaeioi?ui iauaeoai aacu aeaiiuo,
iiaeao caionoeoue i?eeeaaeioth i?ia?aiio, eioi?ay eiaao oaeea
i?eaeeaaee.

A NOAAe Ingres e Oracle yoi ?aoaiea iaania/eaaaony iaoaieciii ?ieae
(role). ?ieue i?aaenoaaeyao niaie eiaiiaaiiue iauaeo, o?aiyueeny a aaca
aeaiiuo. ?ieue naycuaaaony n eiie?aoiie i?eeeaaeiie i?ia?aiiie aeey
i?eaeaiey iineaaeiae i?eaeeaaee aeinooia e aacai aeaiiuo, oaaeeoeai,
i?aaenoaaeaieyi e i?ioeaaeo?ai aacu aeaiiuo. ?ieue nicaeaaony e
oaeaeyaony aaeieieno?aoi?ii aacu aeaiiuo, ae iiaeao auoue i?eaeai
ii?aaeaeaiiue ia?ieue. Eae oieueei ?ieue nicaeaia, ae iiaeii
i?aaeinoaaeoue i?eaeeaaee aeinooia e iauaeoai aacu aeaiiuo.

Nia?aiaiiua eioi?iaoeeiiiua nenoaiu iaania/eaatho oaeaea ae?oaoth noaio
aaciianiinoe – iaycaoaeueiue eee i?eioaeeoaeueiue eiio?ieue aeinooia
(mandatory access control). Ii iniiaai ia ioeaca io iiiyoey aeaaeaeueoea
aeaiiuo e iie?aaony ia oae iacuaaaiua iaoee aaciianiinoe (security
labels), eioi?ua i?enaaeaathony aeaiiui i?e eo nicaeaiee. Eaaeaeay ec
iaoie niioaaonoaoao iaeioi?iio o?iaith aaciianiinoe. Iaoee neoaeao aeey
eeanneoeeaoeee aeaiiuo ii o?iaiyi.

Oae eae aeaiiua ?aneeanneoeoee?iaaiu ii o?iaiyi aaciianiinoe iaoeaie,
eiie?aoiue iieueciaaoaeue iieo/aao ia?aie/aiiue aeinooi e aeaiiui. Ii
iiaeao iia?e?iaaoue oieueei n aeaiiuie, ?aniieiaeaiiuie ia oii o?iaia
nae?aoiinoe, eioi?ue niioaaonoaoao aai noaoono. I?e yoii ii ia yaeyaony
aeaaeaeueoeai aeaiiuo.

Yoa noaia aaciianiinoe iie?aaony ia iaoaieci, iicaieythuee naycaoue
iaoee aaciianiinoe n eaaeaeie no?ieie ethaie oaaeeoeu a aaca aeaiiuo.
Ethaie iieueciaaoaeue iiaeao iio?aaiaaoue a naiai cai?ina ioia?aceoue
ethaoth oaaeeoeo ec aacu aeaiiuo, iaeiaei oaeaeeo ii oieueei oa no?iee,
o eioi?uo iaoee aaciianiinoe ia i?aauoatho o?iaaiue aai eiiiaoaioeee.

Yoi icia/aao, iai?eia?, /oi no?iee oaaeeoeu, ioia/aiiua eae no?iee
o?iaiy iaeneiaeueiie aaciianiinoe, iiaeao oaeaeaoue oieueei oio
iieueciaaoaeue, o eioi?iai o?iaaiue aaciianiinoe – iaeaunoee.
Iieueciaaoaee ii?aaeaeaiiiai o?iaiy nae?aoiinoe iiaoo aeaeaoue no?iee
oaaeeoeu, ioia/aiiua aeey eo o?iaiy aaciianiinoe, ?aaii eae e aeey anao
o?iaiae ieaea aeaiiiai. NOAAe i?iaa?yao o?iaaiue aaciianiinoe
iieueciaaoaey e, a ioaao ia aai cai?in, aica?auaao oieueei oa no?iee
oaaeeoeu, eioi?ua oaeiaeaoai?ytho cai?ino e niioaaonoaotho yoiio
o?iaith.

Ii ioeaieai yenia?oia, eiioeaioeey iiiaio?iaiaaie aaciianiinoe a
aeeaeaeoea aiaeu aoaeao eniieueciaaia a aieueoeinoaa eiiia?/aneeo NOAAe.

1.7 I?eiaiaiea CASE-n?aaenoa aeey eioi?iaoeeiiiiai iiaeaee?iaaiey a
nenoaiao ia?aaioee aeaiiuo .

A oneiaeyo ?uiea ana aieueoaa /enei eiiiaiee iniciatho i?aeiouanoaa
eniieueciaaiey eioi?iaoeeiiiuo nenoai (EN). *oiau iieo/eoue auaiaeo io
eniieueciaaiey eioi?iaoeeiiiie nenoaiu, aa neaaeoao nicaeaaaoue a
ei?ioeea n?iee e n oiaiueoaiiuie cao?aoaie. E?iia oiai, eioi?iaoeeiiiay
nenoaia aeieaeia auoue eaaei nii?iaiaeaeaaiie e oi?aaeyaiie.

Nicaeaiea eioi?iaoeeiiiie nenoaiu i?aaei?eyoey – neiaeiue e
iiiainooiai/aoue i?ioeann, eioi?ue niaea?aeeo oaco eioi?iaoeeiiiiai
iiaeaee?iaaiey. Eioi?iaoeeiiiay iiaeaeue – yoi niaoeeoeeaoeey no?oeoo?u
aeaiiuo e aecian i?aaee (i?aaee i?aaeiaoiie iaeanoe). Aeey iino?iaiey
eioi?iaoeeiiiie iiaeaee i?aaei?eyoey eniieuecotho oae iacuaaaiua
CASE-n?aaenoaa.

Computer Aided Software Engineering (CASE) – yoi oaoiieiaey
aaoiiaoece?iaaiiiai i?iaeoe?iaaiey eioi?iaoeeiiiuo nenoai, iicaieythuay
cia/eoaeueii onei?eoue i?ioeann eo ?ac?aaioee, nie?aoeoue cao?aou
o?oaea, a oaeaea iiauneoue ea/anoai i?iaeoe?iaaiey.

Iiae yoei neaaeoao iiieiaoue niaieoiiinoue iaoiaeia e n?aaenoa,
i?eiaiyaiuo a i?ia?aiiiie eiaeaia?ee.

Iniiaiia ioee/ea iaoiaeia i?ia?aiiiie eiaeaia?ee io iaiin?aaenoaaiiiai
i?ia?aiie?iaaiey, ai-ia?auo, oi, /oi i?ia?aiiiay eiaeaia?ey ioaeaeyao
aiaeec e i?iaeoe?iaaiea io i?ia?aiie?iaaiey (eiaee?iaaiey) eae oaeiaiai.
Ai-aoi?uo, i?ia?aiiiay eiaeaia?ey auaeaeyao a iauai oiaea ?ac?aaioee
?acee/iua oeiu aeayoaeueiinoe, auiieiyaiua ia ?acee/iuo oacao
aeeciaiiiai oeeeea.

Noaiaea?oiue iiaeoiae auaeaeyao a aeeciaiiii oeeeea i?ia?aiiiie
?ac?aaioee ianeieueei yoaiia:

aiaeec;

i?iaeoe?iaaiea;

i?ia?aiie?iaaiea;

oanoe?iaaiea;

nii?iaiaeaeaiea.

Ia?aiia/aeueii n/eoaeinue, /oi yoe yoaiu i?ioiaeyo iineaaeiaaoaeueii. A
ianoiyuaa a?aiy i?eiyoa iiaeaeue oae iacuaaaiie auno?ie i?ioioeiecaoeee,
a eioi?ie aica?aou e ia/aeo iniiaiie iineaaeiaaoaeueiinoe i?ienoiaeyo
?aaoey?ii, n eaaeaeui oeeeeii i?iaeoe?iaaiey. Ae?oaeie neiaaie o?aaoaony
iaeiia?aiaiiia auiieiaiea anao caaea/ anao oac aeeciaiiiai oeeeea, /oi
ia ioiaiyao ?acaeaeaiea aeaenoaee a niioaaonoaee n oacaie i?ioeanna
i?iaeoe?iaaiey.

Oaeia aiciiaeii oieueei n eniieueciaaieai CASE-n?aaenoa.

Ia yoaiao aiaeeca e i?iaeoe?iaaiey i?eieiathony ?aoaiey, eioi?ua
ieacuaatho ?aoathuaa aeeyiea ia eiia/iue i?iaeoeo. Iiyoiio iau/ii
CASE-n?aaenoaa i?eiaiytho i?aaeaea anaai ia yoeo yoaiao.

Iniiaiie /anoueth yoaia i?iaeoe?iaaiey yaeyaony iino?iaiea
eioi?iaoeeiiiie iiaeaee iauaeoa. I?e ?ac?aaioea i?eeeaaeiie nenoaiu ii
noaia “naa?oo – aiec”, eioi?iaoeeiiiay iiaeaeue iinoaiaiii aeiiieiyaony
e aeaoaeece?oaony.

Ia caaa?oathuee noaaeee yoaia i?iaeoe?iaaiey ia iniiaa eioi?iaoeeiiiie
iiaeaee auiieiyaony aaia?aoeey iauaeoia AAe: oaaeeoe, eiaeaenia, eeth/ae
iineaaeiaaoaeueiinoae e o.ae.

2. ?aaeecaoeey ?ani?aaeaeaiiie aacu aeaiiuo n oaeaeaiiui aeinooiii

A ea/anoaa i?eia?a ?aaeecaoeee ?ani?aaeaeaiiie aacu aeaiiuo ?anniio?ei
eioi?iaoeeiiioth nenoaio aeey aaoiiaoecaoeee ?an/aoia n aaiiaioaie AI
«Naycueeioi?i» ?I.

A aeaiiie i?aaiecaoeee aicieeaao caaea/a o/aoa oeiainiauo iinooieaiee ca
ieacaiiua oneoae nayce. Nae/an aeey aa auiieiaiey eniieuecoaony
i?ia?aiiiue eiiieaen «Ia?on», eioi?ue ?aaeecoao /anoue iaiaoiaeeiuo
ooieoeee. A iineaaeiaa a?aiy aicieeea caaea/a iia?aiaiiie oa?eoeeaoeee e
o/aoa i?iaaaeaiiuo oaeaoiiiuo ?acaiai?ia, /oi i?eaiaeeo e ?aceiio
oaaee/aieth iauaiia aeaiiuo, oee?eoee?othueo a nenoaia. E?iia oiai, aeey
au?aaioee iieeoeee oa?eoeeaoeee oneoa nayce iaiaoiaeeii aiaeece?iaaoue
iauai e no?oeoo?o ia/eneaiee, /oi o?aaoao iinoiyiiiai o?aiaiey aeaiiuo
ia ieacaiiuo oneoaao. N oaaee/aieai iioiea eioi?iaoeee iaiaoiaeeii
oaaee/eoue /enei iia?aoi?neeo iano aeey caianaiey aeaiiuo,
neaaeiaaoaeueii nenoaia aeieaeia oi?ioi ?aaioaoue a
iiiaiiieueciaaoaeueneie n?aaea. I?ia?aiia «Ia?on» iino?iaia ii
eaeaieiaee ianoieueiuo nenoai e iiyoiio a? ia?aiin a naoaaoth n?aaeo
aiciiaeai oieueei ii a?oeoaeoo?a oaee-na?aa?a. Oaeie iiaeoiae ioee/aaony
ieioie ianooaae?oaiinoueth e aeaeaao i?aeoe/anee iaaiciiaeiie ?aaioo
oaeaeaiiuo iieueciaaoaeae, Nouanoaothuay nenoaia ia iiaeao ia?aaaouaaoue
iaeaieeaaaiue iauai aeaiiuo, iiyoiio aicieeaao iaiaoiaeeiinoue nicaeaiey
iiaie nenoaiu ia?aaioee eioi?iaoeee, iino?iaiiie ii eaeaieiaee
eeeaio-na?aa?.

Iniiaiua o?aaiaaiey e nenoaia oaeiau:

nenoaia aaoiiaoecaoeee ?an/aoia n aaiiaioaie aeieaeia ia?aaaouaaoue
aeaiiua ii eiathueiny eeeaioai;

nenoaia aeieaeia o/eouaaoue ia/eneaiey ii ieacaiiui oneoaai;

nenoaia aeieaeia o/eouaaoue iieaoo, iinooieaooth n eeeaioa ca ieacaiiua
oneoae;

nenoaia aeieaeia eiaoue iaoaieci ?aaeno?aoeee eciaiaiee e aiciiaeiinoue
ioeaoa e iaeiiio ec i?aaeuaeoueo ninoiyiee;

nenoaia aeieaeia iaania/eaaoue aiciiaeiinoue iia?aoeaiiai aeinooia e
eioi?iaoeee;

nenoaia aeieaeia eiaoue ?acaeoua iaoaieciu iaania/aiey eioi?iaoeeiiiie
aaciianiinoe (caueoa io ianaieoeeiie?iaaiiiai aeinooia, ecauoi/iinoue
o?aiaiey eioi?iaoeee).

2.1 Aiaeec nouanoaothuae nenoaiu

Aeey ii?aaeaeaiey iio?aaiinoae a iino?iaiee nenoaiu ?an/aoa n aaiiaioaie
e ii?aaeaeaiey a? no?oeoo?u i?iaaaeai aiaeec oaea nouanoaothuae noaiu
iaiaia aeaiiuie.

Noaia ooieoeeiie?iaaiey i?aaiecaoeee a ia?aii i?eaeeaeaiee oaeiaa:

AI «Naycueeioi?i» ieacuaaao naiei eeeaioai oneoae a iaeanoe nayce.

Eeeaiou iiea/eaatho ieacaiiua oneoae.

?en.2.1. Noaia ooieoeeiie?iaaiey a ia?aii i?eaeeaeaiee.

Aioo?aiiyy no?oeoo?a i?aaei?eyoey a naiii iauai aeaea iiaeao auoue
i?aaenoaaeaia neaaeothuei ia?acii:

Eiaaony oeaio?aeueiia ioaeaeaiea (oi?aaeaiea nayce), eioi?ia
inouanoaeyao eiio?ieue ca aeayoaeueiinoueth anaai i?aaei?eyoey.

A eaaeaeii ?aeiia ?anioaeeee Ii?aeiaey ooieoeeiie?otho ?aeiiiua oceu
nayce (?ON) eee yenieoaoaoeeiiii-oaoie/aneea oceu nayce (YOON), eioi?ua
iai?yioth iiae/eiythony oi?aaeaieth nayce.

Nouanoaotho oeeeaeu AI «Naycueeioi?i», oaeea eae AON, ION, NON e o.ae.

Eaaeaeia ec iiae?acaeaeaiee iai?aaeyao a oi?aaeaiee nayce aaeaiany/iua
io/aou.

Nouanoaothuay nenoaia iaiaia eioi?iaoeeae e a? o?aiaiey oaeiaa:

?an/ao ca oneoae nayce eaaeaeue eeeaio i?iaiaeeo n ?ON eee YOON ii ianoo
onoaiiaee oaeaoiia.

A eaaeaeii ec ?ON eee YOON onoaiiaeai ia?niiaeueiue eiiiuethoa?, ia
eioi?ii ooieoeeiie?oao i?ia?aiiiue eiiieaen «Ia?on». A eiioea eaaeaeiai
ianyoea i?iaiaeeony ?an/ao ca oneoae nayce, a niioaaonoaea n eioi?ui
aunoaaeythony n/aoa eeeaioai.

Io/aou ii i?iaaaeaiiui ?an/aoai ia?anueathony ii yeaeo?iiiie ii/oa a
oi?aaeaiea nayce.

Iaaeinoaoee yoie noaiu i?iyaeythony a ionoonoaee iia?aoeaiiai aeinooia
e eioi?iaoeee ii i?aaeinoaaeaiiui oneoaai e iinooieaoei n?aaenoaai,
ieceie iaa?oci/iie niiniaiinoe nenoaiu, iaaiciiaeiinoe aiaeeca aeaiiuo
ca aeinoaoi/ii aeeeoaeueiue i?iiaaeooie a?aiaie.

2.2 Iiaay noaia iaiaia eioi?iaoeeae

O/eouaay ia?a/eneaiiua iaaeinoaoee aicieeea iaiaoiaeeiinoue
i?aaiecaoeee aaeeiiai eioi?iaoeeiiiiai i?ino?ainoaa aeey ?aoaiey
iinoaaeaiiuo caaea/. Nooue ?aoaiey a neaaeothuai:

I?iaanoe onoaiiaeo a eaaeaeii ec ?ON eee YOON na?aa?ia aeey ia?aaioee e
o?aiaiey aeaiiuo ii ioaeaeueii acyoiio ?aeiio.

A oi?aaeaiee nayce onoaiiaeoue na?aa?, eioi?ue aoaeao o?aieoue aeaiiua
?an/aoia n aaiiaioaie ii anae ?anioaeeea Ii?aeiaey.

Iaeaaeeoue eaiaeu nayce iaaeaeo ?aeiiiuie oceaie e oi?aaeaieai.

Iino?ieoue ?ani?aaeaeaiioth aaco aeaiiuo ii ?an/aoai ca oneoae nayce ii
anae Ii?aeiaee.

?acianoeoue iieo/aiioth aaco ia ?aeiiiuo na?aa?ao n ?aieeeaoeeae aeaiiuo
ia na?aa? oi?aaeaiey nayce.

Aeey oao ?aeiiia, onoaiiaea a eioi?uo auaeaeaiiuo na?aa?ia yeiiiie/anee
iaoeaeaniia?acia, iaania/eoue oaeaeaiiue aeinooi e aacai aeaiiuo ae?oaeo
?aeiiia.

?en. 2.2. Eaeaieiaey eioi?iaoeeiiiie nenoaiu ?an/aoia n aaiiaioaie.

Aeaiiay noaia iaeaaeaao neaaeothueie aeinoieinoaaie ii n?aaiaieth n
i?aaeuaeouae:

Ca n/ao eniieueciaaiey auaeaeaiiuo na?aa?ia ?acei aic?anoaao iaa?oci/iay
niiniaiinoue nenoaiu.

Ec-ca eniieueciaaiey oaoiieiaee eeeaio-na?aa? nieaeaaony o?aoee a
eaiaeao nayce, /oi iicaieyao iieo/eoue iia?aoeaiue aeinooi e
eioi?iaoeee, iaoiaeyuaeny ia oaeaeaiiii na?aa?a.

Iiyaeyaony aiciiaeiinoue oeaio?aeeciaaiiiai aaeieieno?e?iaaiey
iieo/aiiie nenoaiu.

Aiciiaeii aeaeia ?ani?aaeaeaiea i?aa iieueciaaoaeae ia aeinooi e
aeaiiui.

Ca n/ao ?aaeecaoeee i?eioeeia ecauoi/iinoe i?e o?aiaiee aeaiiuo
iiauoaaony iaaeaaeiinoue o?aiaiey. (A ethaie iiiaio a?aiaie a nenoaia
nouanoaoao aeaa eiiee aeaiiuo: iaeia ia na?aa?a oi?aaeaiey nayce,
ae?oaay ?ani?aaeaeaia iaaeaeo ?aeiiiuie na?aa?aie).

Aiciiaeii i?aeoe/anee iaia?aie/aiiia ianooaae?iaaiea nenoaiu.

2.3 Auai? iia?aoeeiiiie nenoaiu

A aeaiiia a?aiy ia ?uiea iia?aoeeiiiuo nenoai oe?iei i?aaenoaaeaiu
ianeieueei i?iaeoeoia:

UNIX-nenoaiu

Nenoaiu naiaenoaa Novell NetWare

Nenoaiu ia iniiaa Windows NT

E aeinoieinoaai nenoai UNIX (Solaris, AIX, Linux, BSD UNIX, UNIX System
V) ioiineony auoaniythuay iiiaicaaea/iinoue, noaaeeueiinoue, aunieay
i?iecaiaeeoaeueiinoue, iiaeaea?aeea ioeueoei?ioeanni?iuo nenoai e nenoai
n ianniaui ia?aeeaeeciii. Yoe nenoaiu i?aaenoaaeaiu ia ?uiea i/aiue
aeaaii, /oi iicaieyao aiai?eoue ia eo iaaeaaeiinoe. E eo iaaeinoaoeai
ioiineony aunieay noieiinoue i?ia?aiiiiai e aiia?aoiiai iaania/aiey
(aieueoeinoai nenoai ooieoeeiie?otho ia RISC ieaooi?iao). E?iia oiai,
nenoaiu ia aaca UNIX neiaeiu a aaeieieno?e?iaaiee e neaai
noaiaea?oeciaaiu, /oi cao?oaeiyao iino?iaiea ia eo iniiaa
eioaa?e?iaaiiuo ?aoaiee.

Nenoaiu ia iniiaa Novell NetWare iino?iaiu ia iniiaa ei?ii?aoeaiie
iiiaicaaea/iinoe, /oi aeaeaao i?aeoe/anee iaaiciiaeiui eo i?eiaiaiea a
ea/anoaa na?aa?ia i?eeiaeaiee e aac aeaiiuo. Aeeeoaeueiay o?aicaeoeey ni
noi?iiu iaeiiai ec eeeaioia na?aa?a Novell NetWare i?eaiaeeo e
iaaiciiaeiinoe aeinooia ae?oaeo eeeaioia e ?ano?nai na?aa?a. Ana
i?ioeannu ia na?aa?a auiieiythony a ioeaaii eieueoea caueou i?ioeanni?a,
oaeei ia?acii ioeaea a iaeiii ec ieo n aieueoie aa?iyoiinoueth i?eaiaeeo
e e?aoo anae nenoaiu aieioue aei iioa?e oaeeia. Yoi i?eaiaeeo e
iaaiciiaeiinoe auiieiaiey iieueciaaoaeueneeo i?ioeannia ia na?aa?a. A
ianoiyuaa a?aiy nenoaiu ia aaca Novell NetWare eniieuecothony a
aieueoeinoaa neo/aaa eae oaee-na?aa?u.

Nenoaiu Windows NT iiyaeeenue ia ?uiea aeinoaoi/ii aeaaii, ii oe?ieia
?ani?ino?aiaiea iie iieo/eee oieueei n iiiaioa auoiaea aa?nee 3.5.

A ieo ?aaeeciaaia auoaniythuay iiiaicaaea/iinoue, /oi aeaeaao yoe
nenoaiu oi?ioae iniiaie aeey na?aa?ia i?eeiaeaiee. Nenoaiu ia aaca
Windows NT ioaa/atho o?aaiaaieyi o?iaiy aaciianiinoe C2 Ieienoa?noaa
iai?iiu NOA, /oi iicaieyao eo eniieueciaaoue a naiuo ioaaonoaaiiuo
i?eeiaeaieyo. Windows NT ooieoeeiie?oao eae ia ieaooi?ia Intel, oae e ia
RISC ieaooi?iao, /oi aeaao aiciiaeiinoue eaaei ia?aueaaoue iiuiinoue
nenoaiu ii ia?a oaaee/aiey iioiea aeaiiuo. Oae eae a ea/anoaa eeeaioneeo
iano a nenoaia aoaeoo eniieueciaaoueny eiiiuethoa?u iiae oi?aaeaiee
Windows 95/Windows 3.11, eniieueciaaiea Windows NT a ea/anoaa na?aa?a
iicaieeo nicaeaoue oeaeinoioth eioi?iaoeeiiioth nenoaio. Neaaeoao
o/eouaaoue oaeaea e iaee/ea aeinoaoi/ii aieueoiai eiee/anoaa
i?ia?aiienoia, eiathueo iiuo ?aaiou n Windows 95, eioi?ua iiaoo iinea
aeiiieieoaeueiie iiaeaioiaee ?ac?aaaouaaoue na?aa?iua /anoe i?eeiaeaiee
iiae oi?aaeaieai Windows NT.

O/eouaay oaiaeaioeee ?acaeoey ?uiea iia?aoeeiiiuo nenoai a ea/anoaa
ieaooi?iu aeey ?aaeecaoeee eioi?iaoeeiiiie nenoaiu aua?aia Windows NT
4.0.

2.4 Auai? na?aa?a aac aeaiiuo

Iniiaiua o?aaiaaiey, i?aaeuyaeyaiua e na?aa?o aac aeaiiuo oaeiau:

Oi?ioay ianooaae?oaiinoue

Aunieay i?iecaiaeeoaeueiinoue

Eaaeinoue a aaeieieno?e?iaaiee

Iaee/ea iiuiuo eino?oiaioia aeey ?ac?aaioee i?eeiaeaiee

Ieceay oeaia ?aai/aai ianoa

A ianoiyuaa a?aiy ia ?uiea na?aa?ia aac aeaiiuo i?aaenoaaeaii
iiiaeanoai nenoai. N?aaee ieo Oracle, Informix, Sybase, Open Ingres, IBM
DB2, Borland InterBase, Microsoft SQL Server e ae?.

Iaeia ec iniaaiiinoae iinoaaeaiiie caaea/e – onoaiiaea na?aa?ia aac
aeaiiuo a ?aeiiao ?anioaeeee Ii?aeiaey. I?e yoii iniaoth ?ieue ea?aao
ionoonoaea a ianoao onoaiiaee na?aa?ia eaaeeoeoee?iaaiiuo
aaeieieno?aoi?ia, niiniaiuo oi?aaeyoue aacie aeaiiuo. Oaeei ia?acii,
iaeiei ec iniiaiuo o?aaiaaiee e na?aa?o aac aeaiiuo ia?yaeo n aunieie
i?iecaiaeeoaeueiinoueth e oi?ioae ianooaae?oaiinoueth yaeyaony i?inoioa
aaeieieno?e?iaaiey. E?iia oiai, na?aa? aeieaeai iiaeaea?aeeaaoue
?ani?aaeaeaiiua aacu aeaiiuo.

Enoiaey ec n?aaieoaeueiuo oa?aeoa?enoee aeaiiuo na?aa?ia aac aeaiiuo a
ea/anoaa ieaooi?iu aeey ?aaeecaoeee ei?ii?aoeaiie eioi?iaoeeiiiie
nenoaiu aue aua?ai na?aa? Borland InterBase 4.0 aeey Windows NT.

Borland InterBase Workgroup Server – na?aa? ?aeyoeeiiiuo aac aeaiiuo,
iioeiece?iaaiiue aeey ?aaeecaoeee oaoiieiaee upsizing (oe?oiiaiey)
iiiaiiieueciaaoaeueneeo i?eeiaeaiee.

Aa?ney InterBase 4.0 – na?aa?a, o?aaeeoeeiiii aeinooiiiai ia anao
iniiaiuo UNIX-ieaooi?iao (IBM, Sun, HP), iioeiece?iaaia aeey
eniieueciaaiey ia Novell NetWare e Windows NT e iaeaaeaao ?yaeii
ooieoeee, iaycaoaeueiuo aeey nia?aiaiiiai SQL-na?aa?a aac aeaiiuo. E
oaeei ooieoeeyi ioiinyony iaee/ea o?aieiuo i?ioeaaeo?, ?anoe?aiiay
iiaeaea?aeea o?eaaa?ia, aeaeea?aoeaiay nnuei/iay oeaeinoiinoue e o.ae.
Yoe ooieoeee niioaaonoaotho noaiaea?oo ANSI/ISO SQL92 eee, aaea
aiciiaeii, i?iaeoo SQL3.

Aaaeiie iniaaiiinoueth InterBase yaeyaony iiaeaea?aeea oaoiieiaee C/S
Express. Yoi iniaaiii iieacii i?e eniieueciaaiee InterBase 4.0 a
ea/anoaa upsizing n?aaenoaa, o.e. iicaieyao nio?aieoue i?eau/ioth
iaaeaaoeeiiioth iioaoeeth oaee-na?aa?iie iiaeaee i?e ia?aoiaea e
a?oeoaeoo?a C/S.

Aiciiaeiinoue iaania/eaaoue eae iaaeaaoeeiiiue, oae e SQL aeinooi e
aeaiiui, yaeyaony oieeaeueiie e aeaeaao InterBase 4.0, i?eaeaeaoaeueiui
n?aaenoaii aeey iino?iaiey eioi?iaoeeiiiuo nenoai ?acee/iiai ianooaaa –
io iaaieueoie ?aai/ae a?oiiu aei oeaeiai i?aaei?eyoey.

Borland InterBase Workgroup Server iaeaaeaao ?yaeii naienoa,
iicaieythueo ?aoaoue caaea/e iia?aoeaiie ia?aaioee o?aicaeoeee e
iaania/eaaoue ?aaeei iiaeaea?aeee i?eiyoey ?aoaiee. N?aaee oaeeo naienoa
aaaeiaeoeie yaeythony oaoiieiaey iiiaiaa?neiiiinoe (Versioning Engine),
iiaeaea?aeea ?ani?aaeaeaiiuo aac aeaiiuo e iaee/ea ianoaiaea?oiuo oeiia
aeaiiuo.

Oaoiieiaey iiiaiaa?neiiiinoe yae?a iaania/eaaao aaneiioeeeoiue aeinooi e
aeaiiui ca n/ao aaaeaiey ianeieueeeo iieieaiee caienae. Eiaaea
o?aicaeoeey iiaeeoeoee?oao caienue, InterBase nicaeaao iiaoth caienue.
Ai iiiaeo neo/ayo iiaay caienue i?aaenoaaeyao niaie eiiiaeoioth caienue
eciaiaiee. InterBase naycuaaao ana oaeea caiene e ia?acoao
iiiaiaa?neiiioth caienue. Eiaaea o?aicaeoeey noa?ooao, ae aeinooiia
iaeaieaa iicaeiyy aa?ney caiene, nicaeaiiay caaa?oaiiie o?aicaeoeeae.

Anee a i?ioeanna ?aaiou aeeeiiie o?aicaeoeee, oaeie eae iieo/aiea
a?oeaiie eiiee aacu aeaiiuo, aoaeoo aianaiu eciaiaiey a aaco aeaiiuo,
yoi ia ia?ooeo oeaeinoiue aeae a?oeaiie eiiee, oae eae yoa o?aicaeoeey
eiaao aeaei n i?aaeuaeouae aa?neae caiene. Oaeei ia?acii, o?aicaeoeey ii
/oaieth ieeiaaea ia eiioeeeooao n o?aicaeoeeae ii caiene.

Iiai/iui yooaeoii oaeie a?oeoaeoo?u yaeyaony iiauoaiiay aioiaiinoue
nenoaiu, o.e. a neo/aa aiia?aoiuo naiaa inouanoaeyaony ioeao e
i?aaeuaeouaio ninoiyieth n ioiaiie iacaaa?oaiiuo o?aicaeoeee e
?acoeueoaoa eo ?aaiou ii iaiiaeaieth aacu aeaiiuo.

I?aaeuaeouea aa?nee caienae aaaeoony aei oao ii?, iiea nouanoaoao
aeoeaiay o?aicaeoeey, ia/aaoayny aei iiiaioa iiaeeoeeaoeee aeaiiie
aa?nee. Aa?nee caiene, aieaa noa?ua, /ai naiay noa?ay aeoeaiay
o?aicaeoeey, oaeaeythony ec nenoaiu neaaeothuae o?aicaeoeeae n
inaiaiaeaeaieai caieiaaiuo nenoaiiuo ?ano?nia.

Oaoiieiaey iino?iaiey InterBase iicaieyao nicaeaaaoue ?ani?aaeaeaiiua
aacu aeaiiuo e iaania/eaaao aiciiaeiinoue aeey i?eeiaeaiey-eeeaioa
ioe?uoue iaiaoiaeeiia eiee/anoai AAe, /oi iaania/eaaaony iaoaieciii
aeaoooaciie oeenaoeee o?aicaeoeee (two-phase commit).

Iiieii iauai?eiyouo oeiia aeaiiuo, oaeeo eae aeoaaeoii-oeeo?iaay
eioi?iaoeey, aeaou e o.ae., InterBase iaeaaeaao aiciiaeiinoueth ?aaiou n
iano?oeoo?e?iaaiiuie aeaiiuie, nio?aiyy eo a aeaea iauaeoia oeia BLOB
(Binary Large Objects – aieueoea aeaie/iua iauaeou). A aeaea BLOB iiaeao
auoue nio?aiaia ethaay aeaie/iay eioi?iaoeey: ecia?aaeaiey,
ioeeo?iaaiiue caoe, eniieiyaiua iiaeoee i?ia?aii. Iniaaiiinoueth
?aaeecaoeee BLOB a InterBase yaeyaony naaiaioe?iaaiiue aeinooi e iei,
/oi iicaieyao oaaee/eoue i?iecaiaeeoaeueiinoue i?eeeaaeiuo nenoai.

Ae?oaei iao?aaeeoeeiiiui oeiii aeaiiuo, aeiionoeiui a InterBase,
yaeyaony iiiaiia?iue iannea. A InterBase a ea/anoaa iiey caiene iiaeao
auoue nio?aiai iannea i?iecaieueiuo aeaiiuo (e?iia BLOB) n
?acia?iinoueth io 1 aei 16. Iaee/ea oaeiai oeia aeaiiuo iicaieyao
yooaeoeaii no?ieoue i?eeiaeaiey, ?aaioathuea a oeiainiaie, i?iiuoeaiiie
e iao/ii-enneaaeiaaoaeueneie iaeanoe.

InterBase i?aaeeaaaao ?ac?aaio/eeo i?eeeaaeiuo nenoai ?yae aiciiaeiinoae
ii ?aaeecaoeee aeoeaiuo ooieoeee yae?a. Yoi iicaieyao ia?aianoe /anoue
i?eeiaeaiey n eiiiuethoa?a – eeeaioa ia na?aa?, /oi iiauoaao
i?iecaiaeeoaeueiinoue e iaeaa/aao nii?iaiaeaeaiea i?eeeaaeiuo nenoai

Aeaeea?aoeaiay oeaeinoiinoue iaania/eaaao iai?ioeai?a/eainoue aeaiiuo ia
na?aa?a. A ioee/ea io ?aaeecaoeee oeaeinoiinoe n iiiiuueth o?eaaa?ia
aeaeea?aoeaiay oeaeinoiinoue i?iua a i?eiaiaiee e ioeaaeea. Nouanoaotho
/aou?a eaoaai?ee n?aaenoa iaania/aiey aeaeea?aoeaiie oeaeinoiinoe:

Unique and Primary Key (oieeaeueiue ia?ae/iue eeth/) – aa?aioe?oao
oieeaeueiinoue cia/aiey eeth/aaiai iiey caiene;

Referential Integrity (nnuei/iay oeaeinoiinoue) – aa?aioe?oao
niioaaonoaea cia/aiey eeth/aaiai iiey caiene iiae/eiaiiie oaaeeoeu
cia/aieth eeth/aaiai iiey a aeaaiie oaaeeoea;

Check Constraint (ia?aie/aiea aeiionoeiinoe) – aa?aioe?oao, /oi i?aaeei
aeiionoeiinoe, naycaiiia n aeaiiui ia?aie/aieai, enoeiii aeey eaaeaeie
caiene a oaaeeoea;

Domain (aeiiai) – iicaieyao nicaeaoue iiaua iiaeoeiu n iienaieai
aeiionoeiuo cia/aiee e cia/aiee ii oiie/aieth.

O?aieiua i?ioeaaeo?u – o?aieiua i?ioeaaeo?u InterBase niioaaonoaotho
i?iaeoo ANSI/ISO SQL 3. A o?aieiuo i?ioeaaeo?ao aeiionoeiu eiino?oeoeee
begin….end, if…then…else, while, for, when e o. ae. Aioo?e
o?aieiuo i?ioeaaeo? iiaeao auoue i?aaeoniio?aia ia?aaioea eneeth/aiee.
Eneeth/aiey caoai iiaoo auoue ia?aaioaiu, eniieuecoy iia?aoi? WHEN.
O?aieiua i?ioeaaeo?u iiaoo auoue aeiaeaiiuie, a oaeaea ?aeo?neaiuie,
o.a. aucuaaoue naie naay.

O?eaaa?u – A InterBase aiciiaeii yaiia oeacaiea ii?yaeea auiieiaiey
o?eaaa?ia, anee o?eaaa?iia oneiaea auiieiyaony aeey ianeieueeeo
o?eaaa?ia iaeiia?aiaiii.

Neaiaeecaoi?u niauoee. InterBase iieiinoueth iiaeaea?aeeaaao iaoaieci
iiiaauaiey i niauoeyo a aaca aeaiiuo.

PC-eeeaiou iiaeeeth/athony e InterBase 4.0 n iiiiuueth oaoiieiaee
eioaa?e?iaaiiiai eioa?oaena e aacai aeaiiuo (Integrated Database
Application Programming Interface – IDAPI) oe?iu Borland, eioi?ay
yaeyaony iauae oaoiieiaeae i?iiaaeooi/iiai o?iaiy, eniieuecoaiie a oaeeo
i?ia?aiiiuo i?iaeoeoao Borland, eae Paradox e dBASE. Naaiaeiy IDAPI
iiaeaea?aeeaaao naycue c dBASE e Paradox /a?ac i?eaioe?iaaiiue ia
eioa?aeoeaioth ?aaioo eioa?oaen, a iiaeeeth/aiea e InterBase, Oracle e
Sybase – /a?ac i?eaioe?iaaiiue ia ?aaioo n iaai?aie eioa?oaen SQL
(Borland SQL Link).

Aeueoa?iaoeaiui niiniaii aeinooia e aeaiiui InterBase iiaeao auoue
oaoiieiaey ODBC. A eiiieaeo iinoaaee InterBase aoiaeeo ODBC ae?aeaa?, a
ana IDAPI-i?eeiaeaiey eiatho aiciiaeiinoue acaeiiaeaenoaiaaoue n
ODBC-niaianoeiui enoi/ieeii aeaiiuo.

N iiyaeaieai InterBase 4.0 n?aaenoaa IDAPI iiaeaea?aeeaatho aeey
InterBase 4.0 niaoeeaeueioth oaoiieiaeth nayce n aacie aeaiiuo, eioi?ay
iacuaaaony Express Link. ssaeyynue /anoueth oaoiieiaee IDAPI oe?iu
Borland, Express Link, ieioy nianoaaiiua n?aaenoaa ia?niiaeueiiai
i?eeiaeaiey, iaania/eaaao /a?ac IDAPI i?yioth naycue iaaeaeo
ia?niiaeueiuie i?eeiaeaieyie e na?aa?ii InterBase.

Iiaeiaiua ooieoeeiiaeueiua aiciiaeiinoe o?aaotho iaee/ey aeaoo
eiiiiiaioia: ae?aeaa?a e na?aa?a, eioi?ue iiaeao ioaa/aoue ia eiiaiaeu
ia?niiaeueiiai i?eeiaeaiey. N iiiiuueth InterBase 4.0 na?aa? aacu
aeaiiuo iiaeaea?aeeaaao aeaa iiaeaee acaeiiaeaenoaey n na?aa?ii. N
eniieueciaaieai Express Link, InterBase 4.0 iiaeao ooieoeeiie?iaaoue,
eae iiaeeeiiue na?aa? aeey eeeaioia Paradox e dBASE n iaiin?aaenoaaiiie
iiaeaea?aeeie a iaoaiecia aacu aeaiiuo oaeeo n?aaenoa, eae ia?aiauaiea
ii caienyi e eo iaiiaeaiea. *a?ac aeeiaie/aneea e ano?iaiiua auciau SQL
InterBase 4.0 iiaeao oaeaea iiaeaea?aeeaaoue iia?aoeeiiioth n?aaeo aeey
o?aaeeoeeiiiuo SQL-i?eeiaeaiee.

Oaeei ia?acii, InterBase 4.0 iiaeaea?aeeaaao aeaa eioa?oaeniuo
iia?aoeeiiiuo n?aaeu:

Oaoiieiaeth Express Link (eniieuecothuoth IDAPI) n iiaeaea?aeeie oaeeo
ia?niiaeueiuo eino?oiaioia, eae dBASE, Paradox e ae?oaea i?iaeoeou
Windows ia aaca IDAPI.

SQL, iicaieythuoth ?aaeeciaaoue aeinooi ia aaca noaoe/aneeo eee
aeeiaie/aneeo iia?aoi?ia SQL.

Iniiauaaynue ia eiie?aoiuo iio?aaiinoyo, i?eeiaeaiea iiaeao naiaiaeii
ni/aoaoue yoe iiaeaee.

Aeey acaeiiaeaenoaey n na?aa?ii ia?niiaeueiia i?eeiaeaiea ia PC,
aeeth/ay Paradox e dBASE, iiaeao aucuaaoue aaeieieno?aoi? IDAPI. Naie
ooieoeee IDAPI ii oa?aeoa?o auiieiyaiie eie ?aaiou iiae?acaeaeythony ia
ooieoeee ia?aiauaiey e ooieoeee SQL. Auciau SQL a IDAPI iniiaaiu ia
niaoeeoeeaoeee X-Open Call Level Interface, a oi a?aiy eae ?anoe?aiey
auciaia ia?niiaeueiuo i?eeiaeaiee IDAPI i?aaeiacia/aiu aeey ?aaeecaoeee
oa?aeoa?iie oaoiieiaee i?ia?aiie?iaaiey ia?niiaeueiuo i?eeiaeaiee. Aeey
iieo/aiey iauae ?aai/ae n?aaeu iaeioi?ua auciau eniieuecothony niaianoii
eae a ?aaeeia SQL, oae e a ?aaeeia ia?aiauaiey. ?aaeei acaeiiaeaenoaey
i?eeiaeaiey n na?aa?ii InterBase 4.0 iau/ii ii?aaeaeyaony ?aaeeiii
oaeouaai auciaa IDAPI. Eniieueciaaiea SQL eee ?aaeeia ia?aiauaiey
i?ic?a/ii aeey iieueciaaoaey.

Aeey iiaeaea?aeee i?eaioe?iaaiiiai ia caiene aeinooia iau/ii o?aaoaony
auiieiaiea ia i?iiaaeooi/iii o?iaia o?aineyoeee, i?aia?acothuae cai?inu
ia?niiaeueiiai i?eeiaeaiey a eiiaiaeu SQL. Iai?eia?, /oiau ioe?uoue
eiaeaeniue eo?ni?, o?ainee?othuee o?iaaiue no?ieo iia?aoi? SQL n
i?aaeeiaeaieai Order By, niioaaonoaothuei noieaoeai eiaeaena, a caoai
auiieiyao aai ia na?aa?a. Oeeueo?othuea au?aaeaiey caaa?oathony
i?aaeeiaeaieai Where naaia?e?iaaiiiai iia?aoi?a SQL. Na?aa? ?aeyoeeiiiie
aacu aeaiiuo yioee?oao /a?ac SQL naiaioeeo aeaiiuo ?aaioathuaai n
oii?yaei/aiiie eioi?iaoeeae ia?niiaeueiiai i?eeiaeaiey, /oi aaaeao e
caiaoiiio nieaeaieth i?iecaiaeeoaeueiinoe.

Iicaieyy ioe?uaaoue eo?ni?u aeey oaaeeoe e eiaeaenia aac eniieueciaaiey
iia?aoi?ia SQL, InterBase 4.0 n iiiiuueth iiiaiiieueciaaoaeueneie n?aaeu
eeeaio-na?aa? iaania/eaaao i?iecaiaeeoaeueiinoue, aeeceoth e
i?iecaiaeeoaeueiinoe eieaeueiiai ia?niiaeueiiai i?eeiaeaiey. Yoi
icia/aao, /oi eiaaea eo?ni? ioe?uaaaony aeey oaaeeoeu, oi caiene
aica?auathony a anoanoaaiiii ii?yaeea, a eiaaea ii ioe?uaaaony aeey
eiaeaena, oi iie aica?auathony a ioni?oe?iaaiiii ii?yaeea.

Aaaeiui aniaeoii aeecaeia InterBase 4.0 yaeyaony i?yiay, inouanoaeyaiay
ia o?iaia iaoaiecia aacu aeaiiuo iiaeaea?aeea iiaeiaiuo iia?aoeee
ia?aai?a. Aeey aieaa auno?ie auai?ee caienae ec oaaeeoe e eiaeaenia
InterBase 4.0 eniieuecoao niaoeeaeueiua no?oeoo?u aeaiiuo, aeai?eoiu e
i?ioieieu. Aeey iiaeaioiaee e auiieiaiey oaeeo iia?aoeee iia?aoi?u SQL
ia o?aaothony, iiyoiio ioiaaeaao iaiaoiaeeiinoue a i?iiaaeooi/iuo
o?ainee?othueo iiaeoeyo, a aooa?ecaoeey ?acoeueoe?othuaai iaai?a
naiaeeony n ieieioio. E?iia oiai, e aeaiiui ia?aeeaeueii iiaoo
ia?auaoueny eae iieueciaaoaee Express Link, oae e SQL.

Caeeaaeea – yoi iaoea caiene ioiineoaeueii aa iiceoeee n?aaee ae?oaeo
caienae. Iaoaieci InterBase 4.0 iiaeaea?aeeaaao caeeaaeee
iaiin?aaenoaaiii ia o?iaia na?aa?a, iicaieyy eniieueciaaoue auciau aeey
onoaiiaee, iieo/aiey e n?aaiaiey caeeaaeie. Caeeaaeea aeaenoaoao a
oa/aiea anaai iiaeeeth/aiey e aaca aeaiiuo e aeiionoeia aeaaea iinea
cae?uoey enoiaeiiai eo?ni?a e caaa?oaiey ia?aiia/aeueiie o?aicaeoeee.
Eniieuecoy aioo?aiiea eaeaioeoeeaoi?u caiene, InterBase 4.0
iiaeaea?aeeaaao auno?ua iia?aoeee n caeeaaeeaie.

Iiiaea ia?niiaeueiua i?eeiaeaiey ia eniieuecotho iiiyoey iiiaeanoaaiiie
o?aicaeoeee e i?aaeiieaaatho iau/ii, /oi eaaeaeay iia?aoeey aacu aeaiiuo
auiieiyaony iaiaaeeaiii. Aeey iiaeaea?aeee oaeiai i?aaenoaaeaiey
InterBase 4.0 eniieuecoao aiciiaeiinoue aaoiiaoe/aneie oeenaoeee,
eioi?ay i?eioaeeoaeueii eioa?i?aoe?oao eaaeaeia iaiiaeaiea eae iieioth
o?aicaeoeeth.

N yoie oeaeueth a InterBase 4.0 iiaeaea?aeeaaaony nio?aiaiea eiioaenoa
eo?ni?a. Yoi iicaieyao iiaeaea?aeeaaoue oaeouee eo?ni? aeaaea iinea
caaa?oaiey o?aicaeoeee.

Eiaaea na?aa? eniieuecoao a ea/anoaa naiaai eioa?oaena eneeth/eoaeueii
SQL, ii ia?aie/ai iaeaaaaiuie SQL i?aaeeaie aeiee?iaie o?aicaeoeee. A
niioaaonoaee n i?aaeeaie SQL iieueciaaoaeue iiaeao ii?aaeaeeoue o?iaaiue
auaeaeaiey, ii ia iiaeao oi?aaeyoue aeiee?iaeaie (eo onoaiiaeie e
ioiaiie). Ia?niiaeueiua i?eeiaeaiey eniieuecotho ia?aaeeaiu yaiuo e
iiiiiieueiuo aeiee?iaie e a iauai neo/aa ia i?eiaiytho iayaiuo
aeiee?iaie. Aieaa oiai, iiaeao iio?aaiaaoueny, /oiau cai?aoeaaaiua
i?eeiaeaieai aeiee?iaee nio?aiyeenue a oa/aiea o?aicaeoeee, iiea ia
aoaeoo yaiui ia?acii ioiaiaiu iieueciaaoaeai.

Aeey iaania/aiey iio?aaiinoae iieueciaaoaeae ia?niiaeueiuo i?eeiaeaiee
PC, InterBase 4.0 iiaeaea?aeeaaao yaiua aeiee?iaee, ii neaaeoao oaeaea e
noaiaea?oiie iiaeaee na?aa?a, eioi?ay iaania/eaaao yaiua aeiee?iaee aeey
o?aaeeoeeiiiuo iieueciaaoaeae SQL.

Ia?niiaeueiua i?eeiaeaiey /anoi iicaieytho iieueciaaoaeth i?iniao?eaaoue
aieueoea iauaiu aeaiiuo. Onoaiaaeeaaoue aeey oaeeo caienae aeiee?iaee ii
/oaieth iai?aeoe/ii. A oeie/iie nenoaia eeeaio-na?aa? eeeaioneia
i?eeiaeaiea auaiaeeo iieueciaaoaeth iaai? aeaiiuo, ia onoaiaaeeaay ia
na?aa?a ieeaeeo aeiee?iaie. Aeey iiaeaea?aeee oeaeinoiinoe e
niaeaniaaiiinoe aeaiiuo eeeaioneia i?eeiaeaiea auioaeaeaii neaaeiaaoue
iaeiei ec iooae:

*a?ac ?aaoey?iua eioa?aaeu iaiiaeyoue aeaiiua iooai ii?ina na?aa?a.

Eaii?e?iaaoue eciaiaiey e i?iaeieaeaoue auaiaeeoue noa?ua aeaiiua.
Eciaiaiey ?aniiciathony, oieueei anee iieueciaaoaeue iuoaaony iaiiaeoue
aeaiiua. A yoii neo/aa i?eeiaeaiea eioi?ie?oao iieueciaaoaeae, /oi
ae?oaia i?eeiaeaiea eciaieei aeaiiua, e io?aaeaao yoi eciaiaiea.

Aeiee?iaaoue ana eyoe?oaiua aeaiiua

A InterBase 4.0 i?aaeoniio?aia niaoeeaeueiay oaoiieiaey, eioi?ay
iacuaaaony iaiiaeaieai eyoa. Eniieuecoy yoi n?aaenoai, i?eeiaeaiea IDAPI
iiaeao eaeaioeoeoee?iaaoue aeeaiacii eioa?anothueo aai caienae e
?aaeno?e?oao yoi ia na?aa?a. Eiaaea a caiene ec yoiai aeeaiaciia
i?ienoiaeeo eciaiaiea (iai?eia?, ia?aeeaeueii ?aaioathuee iieueciaaoaeue
iiaeeoeoee?oao caienue), na?aa? eieoeee?oao niauoea, eioi?ia oaaaeiieyao
eeeaioneia i?eeiaeaiea n iiiiuueth iaoaieciia oaaaeiieaiey i niauoeyo –
InterBase 4.0 Event Alerters. Eeeaioneia i?eeiaeaiea iieo/aao yoi
niauoea e iiaeao eeai eaii?e?iaaoue aai, eeai cai?ineoue eciaiaiea
caienae a aeaiiii aeeaiaciia.

InterBase 4.0 aeiioneaao eniieueciaaiea aeey o?aiaiey aeaiiuo e ?aaiou n
ieie ianeieueeeo iaoeeiiaeueiuo iaai?ia neiaieia. Aeey anao no?ieiauo
iia?aoeee e iia?aoeee n iauaeoaie BLOB iiaeaea?aeeaathony eae 8-aeoiaua,
oae e 16-aeoiaua iaai?u. Caaeaiiue ii oiie/aieth iaai? neiaieia e
ii?yaeie n?aaiaiey iiaeii ii?aaeaeeoue aeey aacu aeaiiuo a oeaeii.
N?aaiaiea iiaeii oaeaea ii?aaeaeeoue n iiiiuueth i?aaeeiaeaiey Order By
a iia?aoi?a Select. Aeey niaoeeoeeaoeee neiaieia iaoeeiiaeueiuo
aeoaaeoia iiaeii eniieueciaaoue no?ieiaua eeoa?aeu n i?aoeenii eiaie
iaai?a neiaieia. A noaiaea?oiue eiiieaeo iinoaaee aeeth/aia iiaeaea?aeea
eiaeiaie oaaeeoeu ANSI 1251, yaeythuaeny noaiaea?oii i?e ?aaioa n
?onneei ycueii a n?aaea Windows.

2.5 Auai? n?aaenoa ?ac?aaioee

A ea/anoaa CASE-n?aaenoaa eniieueciaai i?ia?aiiiue i?iaeoeo ERWin 2.5
oe?iu Logic Works. ERwin – n?aaenoai ?ac?aaioee no?oeoo?u aacu aeaiiuo.
ERwin ni/aoaao a?aoe/aneee eioa?oaen Windows, eino?oiaiou aeey
iino?iaiey ER-aeeaa?aii, ?aaeaeoi?u aeey nicaeaiey eiae/aneiai e
oece/aneiai iienaiey iiaeaee aeaiiuo e i?ic?a/ioth iiaeaea?aeeo aaaeoueo
?aeyoeeiiiuo NOAAe e ianoieueiuo aac aeaiiuo. N iiiiuueth ERwin iiaeii
nicaeaaaoue eee i?iaiaeeoue ia?aoiia i?iaeoe?iaaiea (?aeiaeeie?eia) aac
aeaiiuo.

I?aaeuaeouea aa?nee ERwin – 1.5 e 2.1 – caaiaaaee ana aiciiaeiua i?ecu
n?aaee i?ia?aii naiaai eeanna, a oii /enea DBMS Readers’ Choice a 1992,
1993, 1994, 1995 aiaeao, Software Development Productivity Award 1993,
Data Based Advisor Readers’ choice 1992 e 1994. Oaeouay aa?ney i?iaeoeoa
– 2.6.

ERWin iicaieyao i?iaiaeeoue aiaeec nenoaiu eae a noaiaea?oa IDEF1X, oae
e a noaiaea?oa IE, /oi oaaee/eaaao oaeianoai ?aaiou n i?iaeoeoii. ERwin
iauaaeeiyao eiae/aneee e oece/aneee o?iaie i?aaenoaaeaiey iiaeaee a
aaeeioth aeeaa?aiio, /oi iicaieyao i?iaanoe aiaeec i?aaeiaoiie iaeanoe e
iieiinoueth ?ac?aaioaoue no?oeoo?u aacu aeaiiuo eniieuecoy oieueei iaeei
i?ia?aiiiue i?iaeoeo. Auai? yoiai i?iaeoeoa iaoneiaeai oaeaea
aiciiaeiinoueth eaaeiai ia?aiina ?ac?aaioaiiie iiaeaee ia ae?oaie
na?aa? aac aeaiiuo.

Aeey iaienaiey eeeaioneie /anoe i?eeiaeaiee eniieueciaaia n?aaea
?ac?aaio/eea Borland Delphi C/S 2.01. Delphi ioiineony e n?aaenoaai
auno?ie ?ac?aaioee i?eeiaeaiee (RAD – Rapid Applications Development).
Ii?aaeaeythuei oaeoi?ii i?e auai?a Delphi a ea/anoaa n?aaenoaa
?ac?aaioee eeeaioneie /anoe yaeyaony iaee/ea aieueoie aeaeeioaee
iauaeoia aeey auno?iai iino?iaiey i?eeiaeaiee, ?aaioathueo n aacaie
aeaiiuo. E?iia oiai, Delphi iiaeaea?aeeaaao eioa?oaen PVCS, /oi
iicaieyao aanoe ia?aeeaeueioth ?ac?aaioeo i?iaeoa ianeieueeeie
i?ia?aiienoaie.

Aeey ?ac?aaioee i?ioeannia, ooieoeeiie?othueo ia noi?iia na?aa?a
eniieueciaaia n?aaea ?ac?aaioee Microsoft Visual C 4.2 ec iaeaoa
Microsoft Developer Studio. Yoa n?aaea ni/aoaao a naaa iiuue ycuea C++,
oaeiaiua n?aaenoaa ioeaaeee i?ia?aii e iaaeaaoeee ii oaenoo. E?iia oiai,
iia iicaieyao eniieueciaaoue a i?ia?aiiao ana aiciiaeiinoe iia?aoeeiiiie
nenoaiu (RPC, RAS, TAPI, na?aenu Windows NT).

2.6 I?aaiecaoeey acaeiiaeaenoaey iaaeaeo na?aa?aie

2.6.1 Auai? iiaeaee ?ani?aaeaeaiiie aacu aeaiiuo

Oae eae aeey iaiaia aeaiiuie iaaeaeo na?aa?aie i?aaeiieaaaaony
eniieueciaaoue iaaeeaiiua aneio?iiiua eaiaeu nayce, a oaeaea o/eouaay
aieueoia eiee/anoai na?aa?ia a aeaiiie eioi?iaoeeiiiie nenoaia
eniieueciaai iaoaieci ?aieeeaoeee aeaiiuo. Iaaeinoaoee yoiai iaoaiecia,
oaeea eae caaea?aeea neio?iiecaoeee ?acee/iuo eiiee aeaiiuo, aeey
aeaiiie nenoaiu ea?atho iaeoth ?ieue.

2.6.2 Iiaeaeue acaeiiaeaenoaey

Aeey i?aaiecaoeee ?aieeeaoeee aeaiiuo e oaeaeaiiiai aaeieieno?e?iaaiey
na?aa?ia a ?aeiiao iaiaoiaeeii i?aaeoniio?aoue n?aaenoaa acaeiiaeaenoaey
iaaeaeo na?aa?aie. I?e aiaeeca i?ioeanna acaeiiaeaenoaey na?aa?ia iiaeii
auaeaeeoue neaaeothuea eiiiiiaiou nenoaiu:

I?ioeann-eeeaio (na?aa? 1)

N?aaea ia?aaea/e aeaiiuo

I?ioeann-na?aa? (na?aa? 2)

A yoie noaia a eaaeaeue eiie?aoiue iiiaio a?aiaie a ea/anoaa eeeaioa
aunooiaao iaeei ec acaeiiaeaenoaothueo na?aa?ia. Oaeei ia?acii, ia
eaaeaeii ec na?aa?ia a ethaie iiiaio a?aiaie aeieaeai auoue caiouai
i?ioeann, ioaa/athuee ca acaeiiaeaenoaea n oaeaeaiiui oceii naoe. A
Windows NT a ea/anoaa oaeiai i?ioeanna iiaeao aunooiaoue niaoeeaeueii
?ac?aaioaiiue na?aen iia?aoeeiiiie nenoaiu (system service). Ii aeieaeai
«oiaoue» ianeoaeeaaoue iiaeeeth/aiey oaeaeaiiuo eeeaioia, a oaeaea i?e
iaiaoiaeeiinoe nai aunooiaoue a ?iee eeeaioa. E?iia oiai, ia iaai iiaeii
aiceiaeeoue ooieoeee oaeaeaiiiai aaeieieno?e?iaaiey e ?aca?aiiai
eiie?iaaiey aeaiiuo.

Aeey i?aaiecaoeee iaiaia eioi?iaoeeae a iauai neo/aa iaiaoiaeeii
?ac?aaioaoue i?ioieie yoiai iaiaia, /oi naii ii naaa yaeyaony
aeinoaoi/ii neiaeiie caaea/ae. E?iia oiai, iaiaoiaeeii ?aaeeciaaoue
iiaeaea?aeeo na?aenii ?acee/iuo o?ainii?oiuo i?ioieieia (TCP/IP,
NetBIOS, IPX/SPX), /oi aueeaaaony a iiiaie?aoiia aeoaee?iaaiea
i?ia?aiiiiai eiaea. Aeey ?aoaiey yoie caaea/e eniieueciaai neie auciaa
oaeaeaiiuo i?ioeaaeo? Microsoft RPC (Microsoft Remote Procedure Call).

2.6.3 Eniieueciaaiea neiy RPC aeey ?ani?aaeaeaiiie ia?aaioee aeaiiuo ia
ieaooi?ia Windows NT

A niioaaonoaea n iiaeaeueth RPC ethaie na?aa? iiaeao ?anniao?eaaoueny
eae na?aa? au/eneaiee, o.a. ii iiaeao i?aaeinoaaeyoue naie
au/eneeoaeueiua iiuiinoe eeeaioai. ?aai/ay noaioeey iiaeao iineaoue
cai?in na?aa?o ia auiieiaiea ii?aaeaeaiiuo au/eneaiee e aica?ao
?acoeueoaoia. Eniieuecoy RPC, eeeaio ia oieueei eniieuecoao oaeeu e
i?eioa?u na?aa?a, ii e ?acaeaeyao aai oeaio?aeueiue i?ioeanni? n
ae?oaeie eiiiuethoa?aie a naoe.

Neie Microsoft RPC – oieueei /anoue noaiaea?oa n?aaeu aeey
?ani?aaeaeaiiuo au/eneaiee, iacaaiiie OSF (Open Software Foundation),
?ac?aaioaiiie a?oiiie eiiiaiee aeey ii?aaeaeaiey eiiiiiaioia naoaaie
n?aaeu, eioi?ay iiaeaea?aeeaaao ?ani?aaeaeaiiua au/eneaiey.

2.6.4 Eiiiiiaiou Microsoft RPC

Microsoft RPC aeeth/aao neaaeothuea iniiaiua eiiiiiaiou:

Eiiieeyoi? MIDL (Microsoft IDL)

Aeaeeioaee a?aiaie auiieiaiey e caaieiai/iua oaeeu.

Iiaeoee o?ainii?oiiai eioa?oaena

Na?aen ?ac?aoaiey eiai

Na?aen iiaeaea?aeee eiia/iie oi/ee

A iiaeaee PRC iiaeii oi?iaeueii ii?aaeaeeoue eioa?oaen aeey oaeaeaiiie
i?ioeaaeo?u, eniieuecoy ycue, niaoeeaeueii ?ac?aaioaiiue aeey yoie
oeaee. Yoio ycue – IDL (Interface Definition Language – ycue
ii?aaeaeaiey eioa?oaenia). Aeeaeaeo ycuea, ?aaeeciaaiiue oe?iie
Microsoft, iacaai MIDL (Microsoft IDL).

Iinea nicaeaiey eioa?oaena aai iienaiea ia?aaaouaaaony eiiieeyoi?ii
MIDL. MIDL eiiieeyoi? aaia?e?oao «caaeooee» (stubs), eioi?ua
o?ainee?otho auciau eieaeueiuo i?ioeaaeo? a auciau i?ioeaaeo?,
iaoiaeyueony ia na?aa?a. «Caaeooea» — yoi i?ioeaaeo?a-caiieieoaeue,
eioi?ay aeaeaao auciau aeaeeioa/iuo ooieoeee RPC aeey oi?aaeaiey
auciaaie oaeaeaiiuo i?ioeaaeo?. I?eiaiaiea caaeooae iaania/eaaao
i?ic?a/iinoue naoaaiai o?iaiy aeey ?ani?aaeaeaiiuo i?eeiaeaiee.
Eeeaioneay i?ia?aiia aucuaaao eo eae eieaeueiua i?ioeaaeo?u, aanue
eiae, eioi?ue ia?aaeaao aeaiiua ii naoe e i?eieiaao ?acoeueoaou,
aaia?e?oaony MIDL eiiieeyoi?ii e iaaeaeei aeey ?ac?aaio/eea.

2.6.5 Iaoaieci ?aaiou RPC

RPC iicaieyao eeeaioo iai?yioth aucuaaoue i?ioeaaeo?u, iaoiaeyueany a
i?ia?aiia ia oaeaeaiiii na?aa?a. Eeeaio e na?aa? eiatho ?acee/iua
aae?aniua i?ino?ainoaa; oae, eaaeaeue eiaao naith nianoaaiioth iaiyoue,
a eioi?ie ?ani?aaeaeaiu aeaiiua, eniieuecoaiua i?ioeaaeo?aie.
Neaaeothuee ?enoiie eeethno?e?oao a?oeoaeoo?o RPC:

?en.2.3. Iaoaieci ?aaiou RPC.

Eae iieacaii ia ?en.2.3, eeeaioneia i?eeiaeaiea aucuaaao eieaeueioth
caaeooeo aianoi eiaea, iaiin?aaenoaaiii ?aaeecothuaai iaiaoiaeeioth
i?ioeaaeo?o. Caaeooea eiiieee?oaony e eeieoaony n eeeaioneei
i?eeiaeaieai. Caaeooea eeeaioa auiieiyao neaaeothuea aeaenoaey:

Cai?aoeaaao iaiaoiaeeiua ia?aiao?u ec aae?aniiai i?ino?ainoaa eeeaioa

Ia?aaiaeeo ia?aiao?u a noaiaea?oioth oi?io i?aaenoaaeaiey aeaiiuo a naoe
(NDR – standard network data representation)

Aucuaaao iaiaoiaeeiua ooieoeee ec aeaeeioaee a?aiaie auiieiaiey RPC aeey
ionueee cai?ina n ia?aiao?aie ia na?aa?.

Caaeooea na?aa?a auiieiyao neaaeothuea oaae:

Aeaeeioaea a?aiaie auiieiaiey RPC i?eieiaao cai?in e aucuaaao
i?ioeaaeo?o caaeooee na?aa?a

Caaeooea na?aa?a i?eieiaao ia?aiao?a ec aooa?a e eiiaa?oe?oao eo ec
oi?iaoa NDR a oi?iao, i?ioeaaeo?u na?aa?a.

Caaeooea aucuaaao iaiaoiaeeioth i?ioeaaeo?o ia na?aa?a.

Oaeaeaiiay i?ioeaaeo?a auiieiyaony, aaia?e?oao auoiaeiua ia?aiao?u e
aica?auaaiia cia/aiea. Eiaaea i?ioeaaeo?a caaa?oaia, neaaeothuea oaae
aica?auatho aeaiiua eeeaioo:

Oaeaeaiiay i?ioeaaeo?a aica?auaao aeaiiua caaeooea na?aa?a

Caaeooea na?aa?a eiiaa?oe?oao aica?auaaiua ia?aiao?u a oi?iao NDR e
aica?auaao eo ooieoeee aeaeeioaee a?aiaie auiieiaiey RPC

Aeaeeioa/iua ooieoeee ia?aaeatho aeaiiua /a?ac naoue ia eeeaioneee
eiiiuethoa?

Eeeaio caaa?oaao i?ioeann i?eiyoeai aeaiiuo ec naoe e eo aica?aoii
aucuaathuae ooieoeee:

Eeeaioneay aeaeeioaea a?aiaie auiieiaiey RPC i?eieiaao cia/aiey,
aica?auaaiua oaeaeaiiie i?ioeaaeo?ie e aica?auaao eo caaeooea

Caaeooea eeeaioa eiiaa?oe?oao aeaiiua ec oi?iaoa NDR a oi?iao,
eniieuecoaiue eeeaioneei i?eeiaeaieai

I?eeiaeaiea eeeaioa i?iaeieaeaao naith ?aaioo.

Aeey Microsoft Windows e Windows NT aeaeeioaee a?aiaie auiieiaiey
eniieuecothony aeaoiy iooyie: eae noaoe/aneay aeaeeioaea, eeieoaiay a
i?eeiaeaiea; e aeaeeioaea, ?aaeeciaaiiay eae DLL.

Na?aa?iia i?eeiaeaiea niaea?aeeo auciau aeaeeioaee a?aiaie auiieiaiey
na?aa?a, eioi?ay ?aaeno?e?oao eioa?oaenu na?aa?a e iicaieyao na?aa?o
i?eieiaoue auciau oaeaeaiiuo i?ioeaaeo?. Na?aa?iia i?eeiaeaiea oaeaea
niaea?aeeo niaoeeoe/iua aeey eaaeaeiai i?eeiaeaiey i?ioeaaeo?u, eioi?ua
aucuaathony n eeeaioa.

Oaeei ia?acii, ?aaeeciaaa eiiioieeaoeeiiiue na?aen ia aaca neiy RPC,
iiaeii nouanoaaiii nyeiiiieoue a?aiy ia ?ac?aaioea i?ioieieia iaiaia
eioi?iaoeeae, a oaeaea iieo/eoue nenoaio, ?aaioathuoth ii ethaui
o?ainii?oiui i?ioieieai.

2.6.6 I?aaiecaoeey eiae/aneiai eaiaea ia?aaea/e aeaiiuo

Ae?oaie eiiiiiaio iiaeaee – n?aaea ia?aaea/e aeaiiuo iiaeao auoue
?aaeeciaaia ianeieueeeie niiniaaie. A i?inoaeoai neo/aa iia iiaeao auoue
iino?iaia ia aaca aneio?iiiuo eaiaeia nayce n eniieueciaaieai i?ioieieia
PPP (Point to Point Protocol), a oaeaea ia aaca nouanoaothueo naoae
X.25. Ia nenoaiiue na?aen iiaeii oaeaea aiceiaeeoue ioaaonoaaiiinoue ca
onoaiiaeaiea eiae/aneiai eaiaea iaaeaeo na?aa?aie.

A neo/aa eaiaeia X.25 aeey onoaiiaeaiey niaaeeiaiey eniieuecoaony
niaoeeaeueiay eaiaeiia?acothuay aiia?aoo?a (eiiiooaoi?u X.25).

?aoaieai ia/aeueiiai o?iaiy iiaeao neoaeeoue oaeaeaiiue aeinooi ii
i?ioieieo PPP (Point to Point Protocol). I?aaiecaoeey oaeaeaiiiai
aeinooia ii aneio?iiiui eaiaeai nayce ii i?ioieieo PPP ?anniio?aia
ieaea.

2.7 I?aaiecaoeey aeinooia oaeaeaiiuo iieueciaaoaeae

2.7.1 Iaiaoiaeeiinoue oaeaeaiiiai aeinooia

I?e ?aaeecaoeee aeaiiie nenoaiu yeiiiie/anee oeaeaniia?acii
onoaiaaeeaaoue na?aa?u aac aeaiiuo oieueei a oao ?aeiiao ?anioaeeee, a
eioi?uo eiee/anoai aaiiaioia aeinoaoi/ii aaeeei. Aeey ?aeiiia n iaeui
/eneii aaiiaioia iaeeo/oei ?aoaieai yaeyaony eniieueciaaiea na?aa?a aac
aeaiiuo aeeaeaeoaai ?ON. Aeey yoiai iaiaoiaeeii i?aaieciaaoue aeinooi
iia?aoi?ia e oa??eoi?eaeueii oaeaeaiiiio na?aa?o. N?aaeie ia?aaea/e
aeaiiuo a yoii neo/aa yaeythony oaeaoiiiua eeiee, i?ioieieii ia?aaea/e
ia naoaaii o?iaia – PPP (eee SLIP).

2.7.2 Eniieueciaaiea neiy RAS aeey oaeaeaiiiai aeinooia ia ieaooi?ia

Windows NT

Ia ieaooi?ia Windows NT caaea/a oaeaeaiiiai aeinooia ii i?ioieieo PPP
?aoaaony n iiiiuueth na?aa?a RAS (Remote Access Server – na?aa?
oaeaeaiiiai aeinooia). Na?aa? RAS – yoi i?ioeann, eioi?ue i?eieiaao e
ia?aaaouaaao cai?inu eeeaioia ia iiaeeeth/aiea /a?ac aneio?iiiua eeiee e
ia?aaea/o aeaiiuo. Noaia acaeiiaeaenoaey oaeaeaiiiai eeeaioa n na?aa?ii
RAS i?eaaaeaia ia ?en.2.4.

?en.2.4. Noaia oaeaeaiiiai aeinooia n eniieueciaaieai RAS.

A ea/anoaa o?ainii?oiiai i?ioieiea iiaoo eniieueciaaoueny i?ioieieu
TCP/IP, IPX/SPX, NetBIOS. Iiaeeeth/aiea eeeaioa /a?ac na?aa? oaeaeaiiiai
aeinooia aaniethoii i?ic?a/ii, o.a. eeeaio iiaeao ?aaioaoue n
oaeaeaiiuie na?aa?aie oae, eae anee au ii iaoiaeeeny a eieaeueiie naoe.

A nenoaia Windows NT nouanoaoao i?ia?aiiiue eioa?oaen i?eeiaeaiee
(Application Program Interface), eioi?ue iicaieyao onoaiiaeoue
eiae/aneee eaiae n oaeaeaiiie naoueth ii aneio?iiiiio niaaeeiaieth. Ii
iineo iacaaiea RAS API (Remote Access Service API).

Na?aen oaeaeaiiiai aeinooia (RAS) iicaieyao oaeaeaiiui iieueciaaoaeyi
iieo/eoue aeinooi e iaeiiio eee ianeieueeei RAS na?aa?ai oaeaea, eae e
ii eieaeueiie naoe.

Win32 RAS iicaieyao RAS-eeeaioo onoaiiaeoue niaaeeiaiea, iieo/eoue
eioi?iaoeeth i nouanoaothueo niaaeeiaieyo e caaa?oeoue niaaeeiaiea.
Naycue inouanoaeyaony ii i?ioieieai PPP eee SLIP. A ea/anoaa
o?ainii?oiiai i?ioieiea iiaoo auoue eniieueciaaiu noaee TCP/IP, IPX/SPX
e NetBIOS.

A Windows nouanoaotho noaiaea?oiua i?ia?aiiu aeey nayce /a?ac RAS,
oaeei ia?acii aeey ?aaiou n oaeaeaiiie aacie aeaiiuo iiaeii
eniieueciaaoue noaiaea?oiua n?aaenoaa Windows. 2.7.3 Iaania/aiea
eioi?iaoeeiiiie aaciianiinoe i?e oaeaeaiiii aeinooia

O/eouaay oi, /oi eioi?iaoeey ia na?aa?ao aac aeaiiuo iineo eiiia?/aneee
oa?aeoa?, iniaoth ?ieue ea?aao aii?in a? caueou io ianaieoeeiie?iaaiiiai
aeinooia. Nenoaia Windows NT eiaao na?oeoeeao niioaaonoaey o?iaith
aaciianiinoe C2 Ieienoa?noaa iai?iiu NOA. Aeaiiue o?iaaiue aaciianiinoe
i?aaeiieaaaao iaycaoaeueioth eaeaioeoeeaoeeth iieueciaaoaeae nenoaiu
aeey ii?aaeaeaiey i?aa aeinooia e ioaeaeueiui ?ano?nai nenoaiu.
Oaeaeaiiue aoiae a naoue oaeaea o?aaoao niioaaonoaothueo i?eaeeaaee,
e?iia oiai, ana iiiuoee oaeaeaiiiai aeinooia iaycaoaeueii oeene?othony a
aeo?iaea niauoee. A nenoaio Windows NT ano?iaia aiciiaeiinoue oeo?iaaiey
o?aoeea a eaiaeao ia?aaea/e aeaiiuo, oaeei ia?acii ceioiuoeaiiee,
eiathuee aiciiaeiinoue ia?aoaaoa aeaiiuo a eaiaeao nayce, ia iieo/aao
aeinooia e aeeciaiii aaaeiui aeaiiui (ia?iee e eiaia iieueciaaoaeae,
oeiainiaay eioi?iaoeey).

Iaeiei ec niiniaia ia?aie/aiey aeinooia oaeaeaiiuo iieueciaaoaeae e
?ano?nai naoe yaeyaony eniieueciaaiey oae iacuaaaiuo na?aa?ia-aa?uea?ia
(FireWalls) ia nouea aioo?aiiae e aiaoiae (eaeie a aeaiiii neo/aa
yaeyaony oaeaeaiiue iieueciaaoaeue) naoae. A aeaiiii neo/aa iiaeii aeaei
?aaoee?iaaoue i?aaa oaeaeaiiiai iieueciaaoaey ia aeinooi e ioaeaeueiui
eiiiuethoa?ai a naoe. E?iia oiai, na?aa?u-aa?uea?u ne?uaatho oiiieiaeth
naoe io aiaoiaai iieueciaaoaey. Ia ieaooi?ia Windows NT ooieoeee
na?aa?a-aa?uea?a auiieiyao i?iaeoeo Microsoft Proxy Server. Iaeiei ec
iiai/iuo yooaeoia eniieueciaaiey yoiai eeanna i?iaeoeoia yaeyaony
yeiiiiey IP-aae?ania.

2.8 I?iaeoe?iaaiea no?oeoo?u aacu aeaiiuo

Iino?iei eioi?iaoeeiiioth iiaeaeue nenoaiu ?an/aoa n aaiiaioaie.

A oiaea enneaaeiaaiey nouanoaothuae noaiu ?an/aoia auee auyaeaiu
neaaeothuea iniiaiua nouiinoe:

Eeeaio (aaiiaio, aeaaeaeaoe oaeaoiia)

Oneoaa

Iiae?acaeaeaiea

Ia/eneaiea

Oaeaoiiiue ?acaiai?, iiaeeaaeauee iia?aiaiiie oa?eoeeaoeee

Ia/eneaiea ca iia?aiaiiua ?acaiai?u (ca iaeei aeaiue)

Iieaoa

Eaoaai?ey eeeaioa

I?iaaaeaiiua ?an/aou

IDEF1X-aeeaa?aiia acaeiiaeaenoaey iaaeaeo yoeie nouiinoyie i?aaenoaaeaia
a I?eeiaeaiee 6.

Iinea ii?iaeecaoeee aeaiiuo e ?ac?aoaiey naycae «iiiaea ei iiiaei» iooai
aaaaeaiey a?aie/iuo nouiinoae aeeaa?aiia i?eieiaao aeae, oeacaiiue a

I?eeiaeaiee 6. E?iia oiai, aeey nouiinoae «Iiae?acaeaeaiea» e «Eaoaai?ey
aaiiaioa» aaaaeaia ia?aoiay iaeaeaioeoeoee?othuay naycue aeey
ea?a?oe/aneiai i?aaenoaaeaiey aeaiiuo.

Iinoaiiaea caaea/e o?aaoao iaee/ey iaoaiecia iiaeaea?aeee enoi?ee aeey
nouiinoae, aeeythueo ia ?acoeueoaou ?an/aoia. E nouiinoyi, aeey eioi?uo
aeieaeai iiaeaea?aeeaaoueny iaoaieci ?aaeno?aoeee eciaiaiee ioiinyony:

Eeeaio (aeaaeaeaoe oaeaoiia)

Oneoaa

Iiae?acaeaeaiea

Ia/eneaiea

Iinoiyiiia ia/eneaiea

Eaoaai?ey eeeaioa

Aeey ?aaeno?aoeee eciaiaiee eniieuecoaony no?oeoo?a aeaiiuo,
i?aaenoaaeaiiay ia ?en.2.5.

?en.2.5. No?oeoo?a aeaiiuo aeey iiaeaea?aeee iaoaiecia ?aaeno?aoeee
eciaiaiee

Nooue aeaiiie iiaeaee oaeiaa:

Eaaeaeay nouiinoue oa?aeoa?ecoaony iaai?ii ninoiyiee, eciaiythueony ai
a?aiaie.

Eaaeaeia ninoiyiea oa?aeoa?ecoaony iaai?ii ao?eaooia nouiinoe, a oaeaea
aeaoie ia/aea e aeaoie ieii/aiey ninoiyiey.

Nouiinoue iaeiicia/ii eaeaioeoeoee?oaony naiei aiaoiei eeth/ii e
aeooaeueiie aeaoie.

Aei/a?iea oaaeeoeu nnueathony ia nouiinoue ii a? aiaoiaio eeth/o.

I?e niaia ninoiyiey aiaoiee eeth/ ia iaiyaony.

Oeaeinoiinoue aeaiiuo iaania/eaaaony n iiiiuueth o?eaaa?ia ia na?aa?a.

Aeey aeaeueiaeoaai aiaeeca auaeaeei a no?oeoo?a aacu aeaiiuo ianeieueei
iiaenenoai:

Ea?oioaea aaiiaioia

Ia/eneaiey

Iia?aiaiiue o/ao

Iinea ii?aaeaeaiey ao?eaooia nouiinoae noaia aeaiiuo n o/aoii iaoaiecia
iiaeaea?aeee enoi?ee i?eieiaao aeae, i?eaaaeaiiue a I?eeiaeaiee 6.

SQL-ne?eio aeey aaia?aoeee aacu aeaiiuo i?aaenoaaeai a I?eeiaeaiee 1.

2.9 Noaia ?aieeeaoeee aeaiiuo

Oe?aaee?iaaiea aeaiiuo a nenoaia iino?iaii ii noaia n iaeiei na?aa?ii
iiaeienee (oeaio?aeueiue na?aa?) e iiiaeanoaii na?aa?ia ?aieeeaoeee
(?aeiiu).

?en.2.6. I?aaiecaoeey ?aieeeaoeee aeaiiuo.

Aeaiiua ia oeaio?aeueiii na?aa?a aeinooiiu oieueei aeey /oaiey /oiau
ecaaaeaoue eiioeeeoia ii iiaeeoeeaoeee caiene.

?en.2.7. Iiae?iaiay noaia ?aieeeaoeee aeaiiuo.

Noaia ?aieeeaoeee i?eaaaeaia ia ?en.2.7. ?anniio?ei i?ioeann ia?aaea/e
eciaiaiee iiae?iaiaa:

I?e eciaiaiee aeaiiuo a ?aieeoee?oaiie oaaeeoea iiaua aeaiiua /a?ac
o?eaaa? caienuaathony a aeo?iae eciaiaiee. E?iia oiai, ooaea caiineony
eiy oaaeeoeu, eiae naeaeaiiiai eciaiaiey e ia?ae/iue eeth/ eciaiaiiie
caiene.

I?e aicieeiiaaiee a aaca ii?aaeaeaiiiai niauoey (iai?eia? i?e aieueoii
eiee/anoaa caienae a aeo?iaea eciaiaiee) eee a ii?aaeaeaiiue iiiaio
a?aiaie eiiioieeaoeeiiiue na?aen caioneaao i?ioeann ?aieeeaoeee.

I?ioeann ?aieeeaoeee onoaiaaeeaaao niaaeeiaiea n na?aa?ii iiaeienee e
ia/eiaao neio?iiecaoeeth aeaiiuo.

Na?aa? iiaeienee i?eieiaao eciaiaiioth caienue e iiaeeoeoee?oao
niioaaonoaothuei ia?acii oaaeeoeo ia naiae noi?iia.

Anee a i?ioeanna eciaiaiey caiene aue naaia?e?iaai iiaue eeth/, oi ii
ia?aaeaaony ia na?aa? ?aieeeaoeee.

Na?aa? ?aieeeaoeee caiaiyao ia?ae/iue eeth/ ?aieeoee?oaiie caiene ia
eeth/, aica?auaaiue n na?aa?a iiaeienee e oaeaeyao niioaaonoaothuoth
caienue ec aeo?iaea eciaiaiee.

I?e ia?aaea/a eciaiaiee eiiioieeaoeeiiiui na?aenii eniieuecoaony
i?ioieie aeaoooaciie oeenaoeee o?aicaeoeee (Two-phase commit
transactions), /oi iicaieyao cano?aoiaaoueny io ioeaie.

I?e neio?iiecaoeee aeaiiuo iiaeiaiui iaoiaeii i?ioeann ?aieeeaoeee
iiaeao auoue i?a?aai a ethaie iiiaio a?aiaie e i?iaeieaeai iicaeiaa n
oie aea oi/ee. Aeaiiay iniaaiiinoue iicaieyao eniieueciaaoue oaeoth
noaio oe?aaee?iaaiey aeaaea ia i/aiue ieioeo eaiaeao nayce.

2.10 I?iaeoe?iaaiea eiiioieeaoeeiiiiai na?aa?a

2.10.1 Iinoaiiaea caaea/e

Aeey ?aoaiey caaea/ ?aieeeaoeee, ?aca?aiiai eiie?iaaiey, oaeaeaiiiai
aeinooia e oaeaeaiiiai oi?aaeaiey ia na?aa?a aac aeaiiuo iaiaoiaeei
i?ioeann, ieaie?othuee caione i?ioeannia e ia?aaaouaathuee iiaeeeth/aiey
oaeaeaiiuo iieueciaaoaeae. Iniiaiua o?aaiaaiey, i?aaeuyaeyaiua e
eiiioieeaoeeiiiiio na?aa?o oaeiau:

Oae eae eioi?iaoeeiiiay nenoaia iineo ?ani?aaeaeaiiue oa?aeoa?, a oaeaea
o/eouaay ionoonoaea eaaeeoeoee?iaaiiuo eaae?ia a ianoao onoaiiaee
na?aa?a iaiaoiaeeii i?aaeoniio?aoue aiciiaeiinoue oaeaeaiiiai
eiioeao?e?iaaiey nenoaiu.

Aeey iaeaa/aiey caaea/ aaeieieno?e?iaaiey iaiaoiaeeii eae iiaeii aieaa
iieii aaoiiaoece?iaaoue auiieiaiea iaeaieaa /anoi ano?a/athueony caaea/,
oaeeo eae ?aca?aiia eiie?iaaiea aeaiiuo e ?aieeeaoeey.

O/eouaay iaiaoiaeeiinoue aeaeueiaeoaai ?anoe?aiey nenoaiu iaiaoiaeeii
i?aaeoniio?aoue aiciiaeiinoue ia?aueaaiey ooieoeeiiaeueiinoe
eiiioieeaoeeiiiiai na?aa?a.

O/eouaay ?acii?iaeiinoue naoe iaiaoiaeeii iaania/eoue aiciiaeiinoue
iiaeeeth/aiey iieueciaaoaeae ii ianeieueeei i?ioieieai: TCP/IP, Named
Pipes, IPX/SPX, NetBIOS.

2.10.2 A?oeoaeoo?a eiiioieeaoeeiiiiai na?aa?a

O/eouaay niaoeeoeeo ieaooi?iu Windows NT eiiioieeaoeeiiiue na?aa?
iino?iai ii a?oeoaeoo?a nenoaiiiai na?aena (System Service). Aeey
?ac?aaioee eiiioieeaoeeiiiiai na?aa?a i?eiaiyeanue n?aaea ?ac?aaio/eea
Microsoft Developer Studio 4.2/Visual C++ Enterprise Edition.

A?oeoaeoo?a na?aa?a i?aaenoaaeaia a I?eeiaeaiee 2.

Aeey iaania/aiey ia?aueaaaiinoe nenoaiu i?iaaaeaii ?acaeaeaiea
ooieoeeiiaeueiinoe na?aa?a ia aeaa /anoe:

ssae?i na?aa?a – ianeoaeeaaao iiaeeeth/aiey oaeaeaiiuo iieueciaaoaeae,
ieaie?oao caione iieueciaaoaeueneeo caaea/ a oaeaea iaania/eaaao
aiciiaeiinoue oaeaeaiiiai eiioeao?e?iaaiey nenoaiu.

Iieueciaaoaeueneea caaea/e – iaania/eaatho ?aieeoee?iaaiea, ?aca?aiia
eiie?iaaiea, neio?iiecaoeeth ea?oioae, nuai aeaiiuo n aiia?aoo?u
iia?aiaiiiai o/aoa.

Iieueciaaoaeueneea caaea/e ?aaeeciaaiu a aeaea iiiaiiioi/iuo DLL.
Eaaeaeay iieueciaaoaeueneay caaea/a aeieaeia iaania/eaaoue aeaa oi/ee
aoiaea:

void TaskProc(void) – iniiaiie iioie – ?aaeecoao iaiaoiaeeioth
ooieoeeiiaeueiinoue.

void Terminate(void) – ooieoeey aeey i?eioaeeoaeueiiai inoaiiaa caaea/e
(iai?eia? i?e inoaiiaa na?aa?a)

Eioi?iaoeey i iieueciaaoaeueneeo caaea/ao o?aieony a ?aano?a Windows NT

(eeth/ HKEY_LOCAL_MACHINE\SOFTWARE\Svyazinform\CommService\Tasks,
?en.2.8).

?en.2.8. Eiioeao?aoeey caaea/ eiiioieeaoeeiiiiai na?aa?a a ?aano?a
Windows NT.

ssae?i ca?aa?a iino?iaii ii iiiaiiioi/iie a?oeoaeoo?a e aeeth/aao a naay
neaaeothuea iiaeoee:

Iiaeoeue eieoeeaeecaoeee – iniiaiay oi/ea aoiaea na?aena – ?aaeno?e?oao
na?aen a aeeniao/a?a na?aenia.

Iiaeoeue oi?aaeaiey na?aenii – ?aaeecoao ooieoeee caionea e inoaiiaa
na?aa?a.

Ieaie?iauee caaea/ – inouanoaeyao caione iieueciaaoaeueneeo caaea/ a
caaeaiiia a?aiy.

Iiaeoeue ianeoaeeaaiey iiaeeeth/aiee – ia?aaaouaaao cai?inu oaeaeaiiuo
iieueciaaoaeae, a oaeaea ioaa/aao ca oaeaeaiiia eiioeao?e?iaaiea
nenoaiu.

Iiaeoeue ?aaeno?aoeee niauoee – caienuaaao eioi?iaoeeth i ninoiyiee
na?aa?a a nenoaiiue aeo?iae niauoee.

2.10.3 Aniiiiaaoaeueiia i?ia?aiiiia iaania/aiea

Aeey onoaiiaee eiiioieeaoeeiiiiai na?aena ?ac?aaioaia i?ia?aiia,
?aaeno?e?othuay na?aen a nenoaia e nicaeathuay iaiaoiaeeiua eeth/e a
?aano?a Windows NT. Enoiaeiue eiae i?ia?aiiu i?aaenoaaeai a I?eeiaeaiee
4.

Aeey oaeaeaiey na?aa?a ?ac?aaioaia i?ia?aiia, auiieiythuay /enoeo
nenoaiiiai ?aano?a. Enoiaeiue oaeno i?ia?aiiu i?aaenoaaeai a I?eeiaeaiee
5.

Aeey oaeaeaiiiai eiioeao?e?iaaiey iieueciaaoaeueneeo caaea/ ?ac?aaioaii
eeeaioneia i?eeiaeaiea «Iaiaaeaea? caaea/ eiiioieeaoeeiiiiai na?aa?a».

Aeaiiay i?ia?aiia iicaieyao oi?aaeyoue nieneii iieueciaaoaeueneeo
caaea/ (eiaiaie iiaeoeae e a?aiaiai caionea). Aeaaiia ieii i?ia?aiiu
i?aaenoaaeaii ia ?en.2.9.

?en.2.9. Aeaaiia ieii i?ia?aiiu eiioeao?e?iaaiey eiiioieeaoeeiiiiai
na?aa?a.

?ac?aaioea i?ia?aiiu aaeanue n iiiiuueth iaeaoa Microsoft Visual C++
4.2. Iaoaieci ?aaeecaoeee yoie i?ia?aiiu auoiaeeo ca ?aiee aeaiiiai
aeeieiiiiai i?iaeoa.

3. Oaoieei-yeiiiie/aneia iainiiaaiea

Oeaeueth aeeieiiiiai i?iaeoa auei nicaeaiea eioi?iaoeeiiiie nenoaiu aeey
aaoiiaoecaoeee ?an/aoia n aaiiaioaie AI «Naycueeioi?i» ?I.

O/eouaay oi, /oi iauai aeeieiiiiai i?iaeoa ia iicaieyao ?ann/eoaoue
yeiiiie/aneee yooaeo io iao/ii-enneaaeiaaoaeueneeo ?ac?aaioie,
ia?aie/einy ninoaaeaieai ieaia auiieiaiey aeeieiiiiai i?iaeoa,
iino?iaieai eaioi/iiai a?aoeea auiieiaiey i?iaeoa e ?an/aoii niaou
cao?ao.

3.1 Ieai auiieiaiey aeeieiiiiai i?iaeoa

A niioaaonoaea n oaiie aeeieiiiiai i?iaeoa ii?aaeaeythony yoaiu IE? e
eo niaea?aeaiea. Yoaiu IE? iaiaoiaeeii iaeneiaeueii aeaoaeece?iaaoue.

Oaa.4.1. Yoaiu IE?.

? n/n Yoai e niaea?aeaiea ?aaiou Aeeeoaeueiinoue oeeeea, aei.
O?oaeiaieinoue a % io iauae o?oaeiaieinoe Eniieieoaeue

1 2 3 4 5

1 Iinoaiiaea caaea/e e ninoaaeaiea oaoie/aneiai caaeaiey 5 3,1 E1, ?, Ae

2 Ninoaaeaiea ieaia e eaeaiaea?iiai a?aoeea ?aaiou 1 0,7 Ae, ?

3 Iiaeai? e eco/aiea oaoie/aneie aeieoiaioaoeee e eeoa?aoo?u 14 10,55
Ae, ?

4 Iaienaiea aaiaeiie /anoe e eeoa?aoo?iiai iaci?a 5 4,35 Ae

5 Eioi?iaoeeiiiia iiaeaee?iaaiea nenoaiu 28 20,25 Ae, ?

6 ?ac?aaioea eiiioieeaoeeiiiiai na?aa?a 12 6,28 Ae

7 Ioeaaeea eiiioieeaoeeiiiiai na?aa?a 18 8,35 Ae, ?

1 2 3 4 5

8 Iaienaiea oai?aoe/aneie /anoe ?aaiou 15 14,07 Ae, ?

9 Auaiaeu ii oai?aoe/aneie /anoe i?iaeoa 2 2,1 Ae, ?

10 Iiaeai? aeaiiuo e ?an/ao yeiiiie/aneie /anoe i?iaeoa 4 2,85 Ae, E1

11 Aiaeec i?iaeaeaiiie ?aaiou 2 1,65 Ae

12 Ninoaaeaiea iiynieoaeueiie caienee e aeeieiiiiio i?iaeoo 12 8,4 Ae

13 Ioi?ieaiea a?aoe/aneie /anoe ?aaiou 12 10,75 Ae

14 Ioi?ieaiea i?eeiaeaiee e aeeieiiiiio i?iaeoo 5 3,025 Ae

15 Naea/a ?aaiou ia iocua ?oeiaiaeeoaeth 2 1,65 Ae

16 Naea/a ?aaiou ia ?aoeaice?iaaiea 2 1,2 Ae

17 Naea/a aeeieiiiiai i?iaeoa ia eaoaae?o 1 0,725 Ae

EOIAI: 140 100

I?eia/aiea: Ae-aeeieiiiee;

E1-eiaeaia?-eiinoeueoaio

?-?oeiaiaeeoaeue

E1-eiinoeueoaio ii yeiiiie/aneie /anoe

O?oaeiaieinoue auiieiaiey IE? ii?aaeaeyaony ii noiia yoaiia e aeaeia
?aaio, ioeaieaaaiuo yenia?oiui iooai a /aeiaaei-aeiyo e iineo
aa?iyoiinoiue oa?aeoa?, oae eae caaeneo io iiiaeanoaa o?oaeii
o/eouaaaiuo oaeoi?ia.

3.2 ?an/ao iaeeaeaaiie i?iaeieaeeoaeueiinoe auiieiaiey ?aaio e eo
aeenia?nee

Iaeeaeaaiay i?iaeieaeeoaeueiinoue ?aaio ?ann/eouaaaony ii oi?ioea:

aaea Tmin – iioeienoe/aneay ioeaiea a?aiaie ?ac?aaioee, enoiaeyuay ec

iaeaieaa aeaaii?eyoiuo oneiaee a? auiieiaiey;

O i.a. – iaeaieaa aa?iyoiay i?iaeieaeeoaeueiinoue auiieiaiey ?aaiou i?e

ii?iaeueiuo, /aua anaai ano?a/athueony oneiaeyo;

O max – iaeneiaeueiia a?aiy auiieiaiey ?aaiou i?e iaeaieaa

iaaeaaii?eyoiuo oneiaeyo a? auiieiaiey;

Iaeiia?aiaiii n ?an/aoii aaee/eiu Oiae. Ii?aaeaeytho aeenia?neth
(?aca?in) ii oi?ioea:

Aeenia?ney ii?aaeaeyao noaiaiue iaii?aaeaeaiiinoe auiieiaiey ?aaiou ca
iaeeaeaaiia a?aiy Oiae.

?an/aou iaeeaeaaiie i?iaeieaeeoaeueiinoe ?aaio naaaeaiu a oaaeeoeo.

Oaa.4.2. I?iaeieaeeoaeueiinoue ?aaio.

? n/n Yoai e niaea?aeaiea ?aaiou Tmin Ti.a. Tmax Tiae Di

1 2 3 4 5 6 7

1 Iinoaiiaea caaea/e e ninoaaeaiea oaoie/aneiai caaeaiey 3 5 7 5 0,44

2 Ninoaaeaiea ieaia e eaeaiaea?iiai a?aoeea ?aaiou 1 1 2 1,167 0,03

3 Iiaeai? e eco/aiea oaoie/aneie aeieoiaioaoeee e eeoa?aoo?u 12 14 16 14
0,44

4 Iaienaiea aaiaeiie /anoe e eeoa?aoo?iiai iaci?a 3 5 7 5 0,44

5 Eioi?iaoeeiiiia iiaeaee?iaaiea nenoaiu 26 28 29 27,8 0,25

6 ?ac?aaioea eiiioieeaoeeiiiiai na?aa?a 11 12 14 12,2 0,25

1 2 3 4 5 6 7

7 Ioeaaeea eiiioieeaoeeiiiiai na?aa?a 16 18 20 18 0,44

8 Iaienaiea oai?aoe/aneie /anoe ?aaiou 13 15 17 15 0,44

9 Auaiaeu ii oai?aoe/aneie /anoe i?iaeoa 1 2 2 1,8 0,027

10 Iiaeai? aeaiiuo e ?an/ao yeiiiie/aneie /anoe i?iaeoa 3 4 6 4,2 0,25

11 Aiaeec i?iaeaeaiiie ?aaiou 1 2 2 1,8 0,27

12 Ninoaaeaiea iiynieoaeueiie caienee e aeeieiiiiio i?iaeoo 10 12 14 12
0,44

13 Ioi?ieaiea a?aoe/aneie /anoe ?aaiou 11 12 13 12 0,44

14 Ioi?ieaiea i?eeiaeaiee e aeeieiiiiio i?iaeoo 4 5 5 4,8 0,027

15 Naea/a ?aaiou ia iocua ?oeiaiaeeoaeth 2 2 3 2,2 0,027

16 Naea/a ?aaiou ia ?aoeaice?iaaiea 1 2 3 2 0,11

17 Naea/a aeeieiiiiai i?iaeoa ia eaoaae?o 1 1 1 1 0

Aiaeec i?iaaaeaiiuo ?an/aoia iicaieyao naeaeaoue auaiae i oii, /oi
?an/aoiia iaeeaeaaiia a?aiy auiieiaiey ?aaiou i?eaeeaeaaony e iaeaieaa
aa?iyoiiio a?aiaie e ?aca?in a?aiaiiuo ia?aiao?ia ?aniieaaaaony a
eioa?aaea io 0 aei 0,44. Yoi aiai?eo i oii, /oi i?e i?iaaaeaiee ?aaio
iaiaoiaeeii no?iai niaethaeaoue a?aiaiiie ?aaeei.

3.3 Iino?iaiea eaioi/iiai a?aoeea auiieiaiey ?aaiou

Iaeiie ec iniiaiuo oeaeae ieaie?iaaiey i?iaaaeaiey ?aaiou yaeyaony
ii?aaeaeaiea eo iauae i?iaeieaeeoaeueiinoe. Iaeaieaa oaeiaiui, i?inoui e
iaaeyaeiui yaeyaony eaioi/iue a?aoee i?iaaaeaiey ?aaio.

I?iaeieaeeoaeueiinoue eaaeaeie ?aaiou Tn ii?aaeaeyaony ii oi?ioea:

aaea Ti – o?oaeiaieinoue ?aaio (/ae./aei.)

Ci – /eneaiiinoue eniieieoaeae (/ae.)

Oaa.4.3. Eaioi/iue a?aoee auiieiaiey ?aaio.

? n/n Yoai e niaea?aeaiea ?aaiou O?oaeiaieinoue (/ae./aei.)
*eneaiiinoue

(/ae.) Aeeeo-oue ?aaiou (aei.)

1 2 3 4 5

1 Iinoaiiaea caaea/e e ninoaaeaiea oaoie/aneiai caaeaiey 5 3 1,67

2 Ninoaaeaiea ieaia e eaeaiaea?iiai a?aoeea ?aaiou 1 2 0,5

3 Iiaeai? e eco/aiea oaoie/aneie aeieoiaioaoeee e eeoa?aoo?u 14 2 7

4 Iaienaiea aaiaeiie /anoe e eeoa?aoo?iiai iaci?a 5 1 5

5 Eioi?iaoeeiiiia iiaeaee?iaaiea nenoaiu 28 2 14

6 ?ac?aaioea eiiioieeaoeeiiiiai na?aa?a 12 1 12

7 Ioeaaeea eiiioieeaoeeiiiiai na?aa?a 18 2 9

8 Iaienaiea oai?aoe/aneie /anoe ?aaiou 15 2 7,5

9 Auaiaeu ii oai?aoe/aneie /anoe i?iaeoa 2 2 1

10 Iiaeai? aeaiiuo e ?an/ao yeiiiie/aneie /anoe i?iaeoa 4 2 2

11 Aiaeec i?iaeaeaiiie ?aaiou 2 1 2

12 Ninoaaeaiea iiynieoaeueiie caienee e aeeieiiiiio i?iaeoo 12 1 12

13 Ioi?ieaiea a?aoe/aneie /anoe ?aaiou 12 1 12

1 2 3 4 5

14 Ioi?ieaiea i?eeiaeaiee e aeeieiiiiio i?iaeoo 5 1 5

15 Naea/a ?aaiou ia iocua ?oeiaiaeeoaeth 2 1 2

16 Naea/a ?aaiou ia ?aoeaice?iaaiea 2 1 2

17 Naea/a aeeieiiiiai i?iaeoa ia eaoaae?o 1 1 1

EOIAI: 140

94,67

3.4 Ii?aaeaeaiea ieaiiaie naaanoieiinoe IE?

Oeaeueth ?an/aoa naaanoieiinoe IE? yaeyaony yeiiiie/anee iainiiaaiiie
ii?aaeaeaiea aaee/eiu cao?ao ia a? auiieiaiea. A ieaiiaoth
naaanoieiinoue aeeth/atho ana cao?aou, naycaiiua n auiieiaieai ?aaiou,
iacaaeneii io enoi/ieea oeiaine?iaaiey. Ii?aaeaeaiea cao?ao
i?iecaiaeeony iooai ninoaaeaiey cao?ao ia IE?.

Niaoa cao?ao ia IE? aeieaeia auoue i?aaenoaaeaia ii neaaeothuei
noaoueyi eaeueeoeyoeee:

Iaoa?eaeu, iieoiiua ecaeaeey e iieooaa?eeaou;

Niaoeiai?oaeiaaiea aeey iao/iuo enneaaeiaaiee;

?anoiaeu ia neeiaoth yeaeo?iyia?aeth.

Iniiaiay ca?aaioiay ieaoa i?iecaiaenoaaiiiai ia?niiaea;

Io/eneaiey ia nioeeaeueiia no?aoiaaiea;

Einaaiiua (iaeeaaeiua) ?anoiaeu ioaeaea(eaoaae?u);

I?iecaiaenoaaiiua eiiaiaee?iaee;

Eiio?aaaioiua ?aaiou, eioi?ua aeeth/atho noieiinoue ?aaio, auiieiyaiuo
aeey oaiu ae?oaeie i?aaiecaoeeyie.

Iieaoa oneoa iiuoiiai i?iecaiaenoaa, iaoiaeyuaainy ia naiinoiyoaeueiii
aaeaina;

Iauaoieaa?neoaoneea einaaiiua ?anoiaeu;

?anoiaeu ia iao/ii-oaoie/aneoth eioi?iaoeeth;

?anoiaeu ia ca?oaaaeiua eeoeaicee e iaoaiou;

Io/eneaiey a iaineiiiue oiiae;

Io/eneaiey a oiiae caiyoinoe;

Io/eneaiey ia iaaeeoeeineia no?aoiaaiea;

Cao?aou ia yenieoaoaoeeth iai?oaeiaaiey (aii?oecaoeeth).

1. ?an/ao noieiinoe iieoiiuo ecaeaeee i?aaenoaaeai a oaaeeoea.

Oaa.4.3. Noieiinoue iieoiiuo ecaeaeee.

Ecaeaeea Eiee/anoai Oeaia ca aaeeieoeo, ?oa Noiia, ?oa

Aeeneaoa 3.5’’ 1 5500 5500

Aaoiai 5 5000 25000

Aoiaaa 1 30000 30000

EOIAI:

60500

Niaoeiai?oaeiaaiea aeey ?aaio ia i?eiaiyeinue, ?anoiaeu ionoonoaotho.

?aaiou n eniieueciaaieai neeiaie yeaeo?iyia?aee ia i?iaiaeeeenue,
?anoiaeu ionoonoaotho.

A ea/anoaa aacu aeey ?an/aoa ca?aaioiie ieaou i?eieiaaony iany/iue
ieeaae eaiaeeaeaoa iaoe a ?acia?a 345000 ?oa. (13 ?ac?yae), /oi
ninoaaeyao a ia?an/aoa ia 1 o/aaiue /an ?aaiou i?e 800-/aniaie aiaeiaie
iaa?ocea :

(345000 * 12) / 800 = 5175 (?oa.//an)

?oeiaiaenoai aeeieiiiui i?iaeoe?iaaieai ioeaieaaaony i?aiiaeaaaoaeai a 6
o/aaiuo /ania. Oaeei ia?acii, iieo/ei iniiaioth ca?aaioioth ieaoo
i?iecaiaenoaaiiiai ia?niiaea a ?acia?a:

5175 * 26 = 134550 (?oa.)

Io/eneaiea ia nioeeaeueiia no?aoiaaiea. Ii oneiaeth aeiaiai?a
ninoaaeytho 5,4% io ca?aaioiie ieaou (i.4). Noiia ?anoiaeia ii noaouea
7265 ?oa.

Einaaiiua (iaeeaaeiua) ?anoiaeu eaoaae?u oneiaeyie aeiaiai?a ia
i?aaeoniio?aiu.

I?iecaiaenoaaiiua eiiaiaee?iaee oneiaeyie aeiaiai?a ia i?aaeoniio?aiu.

Eiio?aaaioiua ?aaiou ia i?iaiaeeeenue, ?anoiaeu ionoonoaotho.

Iieaoa oneoa iiuoiiai i?iecaiaenoaa, iaoiaeyuaainy ia naiinoiyoaeueiii
aaeaina ia i?iaiaeeeanue.

Iauaaocianeea ?anoiaeu. Ii oneiaeyi aeiaiai?a aa?oony 15% io ca?aaioiie
ieaou (io i.4) e ninoaaeytho 20183 ?oa.

?anoiaeu ia iao/ii-oaoie/aneoth eioi?iaoeeth ionoonoaotho.

?anoiaeu ia ca?oaaaeiua eeoeaicee e iaoaiou ionoonoaotho.

Io/eneaiey a iaineiiiue oiiae. Aeaiiua ?anoiaeu aa?oony a ?acia?a 1% io
iniiaiie ca?aaioiie ieaou i?iecaiaenoaaiiiai ia?niiaea (i.4) e
ninoaaeytho 1345 ?oa.

Io/eneaiey a oiiae caiyoinoe. ?anoiaeu ii aeaiiie noaouea 2% io iniiaiie
ca?aaioiie ieaou i?iecaiaenoaaiiiai ia?niiaea (i.4) eee 2691 ?oa.

Io/eneaiey ia iaaeeoeeineia no?aoiaaiea. Ia yoe ioaeaeu io/eneyaony 3,6%
io iniiaiie ca?aaioiie ieaou i?iecaiaenoaaiiiai ia?niiaea (i.4) eee 4844
?oa.

Cao?aou ia yenieoaoaoeeth iai?oaeiaaiey (aii?oecaoeeth). A i?ioeanna
?aaiou iaae i?iaeoii eniieueciaaeenue ia?niiaeueiue eiiiuethoa? IBM PC
Pentium 133 e i?eioa?. Io/eneaiey ia aii?oecaoeeth aeaiiie oaoieee
ninoaaeytho 3200 ?oa. ca 1 /an ?aaiou e ninoaaeytho i?e 300-/aniaie
yenieoaoaoeee eiiiuethoa?a e 5-/aniaie i?eioa?a

3200 * (300 + 5) = 976000 ?oa.

?acoeueoaou eaeueeoeyoeee ii noaoueyi naaaeaiu a oaaeeoeo

Oaa.4.4. Eaeueeoeyoeey ii noaoueyi ?anoiaeia.

Noaouey ?anoiaeia Noiia, ?oa.

Iaoa?eaeu, iieoiiua ecaeaeey e iieooaa?eeaou 60500

Iniiaiay ca?aaioiay ieaoa i?iecaiaenoaaiiiai ia?niiaea 134550

Io/eneaiey ia nioeeaeueiia no?aoiaaiea (5,4% io ca?ieaou) 7265

Io/eneaiey a oiiae caiyoinoe (2% io ca?ieaou) 2691

Io/eneaiey ia iaaeeoeeineia no?aoiaaiea (3,6 % io ca?ieaou) 4844

Iaeia ia niaea?aeaiea IAAe (1% io ieieiaeueiie ca?aaioiie ieaou) 835

Iauaoieaa?neoaoneea einaaiiua ?anoiaeu (15% io ca?ieaou) 20183

Io/eneaiey a iaineiiiue oiiae (1% io ca?ieaou) 1345

Cao?aou ia yenieoaoaoeeth iai?oaeiaaiey (aii?oecaoeeth) 976000

EOIAI: 1207213

Caeeth/aiea

Ca a?aiy ?aaiou iaae aeeieiiiui i?iaeoii ii oaia «I?aaiecaoeey
oaeaeaiiiai aeinooia e ?ani?aaeaeaiiui aacai aeaiiuo» auee eco/aiu
oai?aoe/aneea iniiau iino?iaiey ?ani?aaeaeaiiuo eioi?iaoeeiiiuo nenoai n
aiciiaeiinoueth iia?aoeaiiai oaeaeaiiiai aeinooia e aeaiiui.

?acoeueoaoii aeeieiiiiai i?iaeoe?iaaiey yaeyaony eioi?iaoeeiiiay
nenoaia aeey aaoiiaoecaoeee ?an/aoia n aaiiaioaie AI «Naycueeioi?i» ?I.
A oiaea ?aaiou auei i?iaaaeaii eioi?iaoeeiiiia iiaeaee?iaaiea iauaeoa,
iino?iaia no?oeoo?a aac aeaiiuo, ioaa/athuay i?aaeuyaeyaiui o?aaiaaieyi,
a oaeaea ?ac?aaioaia a?oeoaeoo?a eioi?iaoeeiiiie nenoaiu. E?iia oiai,
auei ?ac?aaioaii i?ia?aiiiia iaania/aiea aeey aaoiiaoecaoeee
aaeieieno?e?iaaiey e ?aoaiey caaea/ oaeaeaiiiai aeinooia, oaeaeaiiiai
oi?aaeaiey e ?aieeeaoeee aeaiiuo.

Ioaeaeueiay aeaaa iinayuaia oaoieei-yeiiiie/aneiio iainiiaaieth
aeaiiiai aeeieiiiiai i?iaeoa.

Nienie eeoa?aoo?u

Borland InterBase Workgroup Server. API Guide. – Borland International
Inc, 1995 – 330 c.

Borland InterBase Workgroup Server. DataDefinition Guide. – Borland
International Inc, 1995 – 212 c.

Borland InterBase Workgroup Server. Language Reference. – Borland
International Inc, 1995 – 234 c.

Borland InterBase Workgroup Server. Programmer’s Guide. – Borland
International Inc, 1995 – 340 c.

Microsoft Online Documentation: Win32 Programmers Reference.

R.Barker “CASE* Method – Entity Relationship Modelling”. – Oracle Inc.,
1990 – 243 c.

Aeeeea A.A., Ioneeaaa E.O. «Visual C++ 4. Eieaa aeey i?ia?aiienoia». –
I.: Ecaeaoaeueneee ioaeae «?onneay ?aaeaeoeey» OII «Channel Trading
Ltd.» , 1996. – 352 n. ee.

Aaeaoaiei A. «Eioi?iaoeeiiiay aaciianiinoue – iaci? iniiaiuo iieiaeaiee:
*1»: – Eioi?iaoeeiiiue atheeaoaiue Jet Info ?1/1996.

Aaeaoaiei A. «Eioi?iaoeeiiiay aaciianiinoue – iaci? iniiaiuo iieiaeaiee:
*2»: – Eioi?iaoeeiiiue atheeaoaiue Jet Info ?2/1996.

Aaeaoaiei A. «Eioi?iaoeeiiiay aaciianiinoue – iaci? iniiaiuo iieiaeaiee:
*3»: – Eioi?iaoeeiiiue atheeaoaiue Jet Info ?3/1996.

A?aaa? Ia?oei. “Aaaaeaiea a SQL”. Ia?. n aiae. – I.: Ecaeaoaeuenoai
“EI?E”, 1996. – 375 n., ee.

Coaaiia O. «Windows NT – auai? «i?ioe»». – I.: Ecaeaoaeueneee ioaeae
«?onneay ?aaeaeoeey» OII «Channel Trading Ltd.» , 1996. – 392 n. ee.

Eanoa? O. «Iniiau Windows NT e NTFS». Ia?. n aiae. – I: Ecaeaoaeueneee
ioaeae «?onneay ?aaeaeoeey» OII «Channel Trading Ltd.» , 1996. – 440 n.
ee.

Eaaeuaeaineee Aeaa. «NOAAe – ei?ioei i aeaaiii» : – Eioi?iaoeeiiiue
atheeaoaiue Jet Info ?3-5/1995.

Ea?ei E.N., *aeaeaaaa E.A., Aonueeiaa I.Ae.”Oaoieei-yeiiiie/aneia
iainiiaaiea aeeieiiiuo i?iaeoia”, Na?aine, 1983, 100 n.

«?aoaiey Microsoft» – Aui. 4. – I: AIIO «Oeiia?aoey Iiainoe», 1996. 124
n., ee.

«?aoaiey Microsoft» – Aui. 5. – I: AIIO «Oeiia?aoey Iiainoe», 1997. 132
n., ee.

?eooa? Aeae.. «Windows aeey i?ioanneiiaeia (I?ia?aiie?iaaiea a Win32 API
aeey Windows 95 e Windows NT)». Ia?. n aiae. – I: Ecaeaoaeueneee ioaeae
«?onneay ?aaeaeoeey» OII «Channel Trading Ltd.» , 1995. – 720 n. ee.

Iaiian E., Ith??ae O.. «Visual C++. ?oeiaiaenoai aeey i?ioanneiiaeia»:
ia?. n aiae. – Nia.: BHV – Naieo-Iaoa?ao?a, 1996. – 912 n., ee.

«Naoaaua n?aaenoaa Windows NT»: Ia?. n aiae. – NIa.: BHV –
Naieo-Iaoa?ao?a, 1996 – 496 n., ee.

O?ieia A.A., O?ieia A.A. «Microsoft Visual C++ e MFC». – I:
Aeeaeia-IEOE, 1996 – 288 n., ee.

O?ieia A.A., O?ieia A.A. «I?ia?aiie?iaaiea aeey Windows NT: *2». – I:
Aeeaeia-IEOE, 1997 – 271 n., ee.

ssia I. «Mastering Microsoft Visual C++». Ia?. n aiae.- E.: AAE+, I.:
YIO?II, 1997. – 704 n., ee.

I?eeiaeaiea 1

SQL-ne?eio aeey aaia?aoeee aacu aeaiiuo

CREATE GENERATOR genUslPropsKeys;

CREATE GENERATOR genUslProps;

CREATE GENERATOR genPhonesRegions;

CREATE GENERATOR genPhonesStations;

CREATE GENERATOR genPhonesStreets;

CREATE GENERATOR genPhonesBanks;

CREATE GENERATOR genTalksPay;

CREATE GENERATOR genTalks;

CREATE GENERATOR genNach;

CREATE GENERATOR genNachBillings;

CREATE GENERATOR genNachBillDates;

CREATE GENERATOR genNachConstUsl;

CREATE GENERATOR genUslDivisions;

CREATE GENERATOR genUslLgots;

CREATE GENERATOR genUslsKeys;

CREATE GENERATOR genUsls;

CREATE GENERATOR genUslCatKeys;

CREATE GENERATOR genUslCat;

CREATE GENERATOR genPhones;

CREATE GENERATOR genPhonesOwnersKeys;

CREATE GENERATOR genPhonesOwners;

CREATE GENERATOR genSysSettings;

CREATE GENERATOR genPhonesKeys;

CREATE GENERATOR genPlat;

CREATE GENERATOR genPhonesPostStations;

CREATE GENERATOR genSysLog;

CREATE GENERATOR genUslTypes;

CREATE GENERATOR genUslDivisionsKeys;

CREATE DOMAIN CALLTIME_TYPE INTEGER NOT NULL;

CREATE DOMAIN CURR_TYPE FLOAT DEFAULT 0 NOT NULL;

CREATE DOMAIN DATE_TYPE DATE NOT NULL;

CREATE DOMAIN DESCR_TYPE CHAR(32);

CREATE DOMAIN PHONE_TYPE CHAR(7) NOT NULL;

CREATE DOMAIN PROCENT_TYPE FLOAT DEFAULT 100 NOT NULL

CHECK (VALUE BETWEEN 0 AND 300);

CREATE TABLE Nach (

Code INTEGER NOT NULL,

Owner INTEGER NOT NULL,

Usl INTEGER NOT NULL,

Phone INTEGER,

UslSum CURR_TYPE,

NachDate DATE_TYPE,

BillDate DATE_TYPE

);

ALTER TABLE Nach

ADD CONSTRAINT XPKNach PRIMARY KEY (Code);

CREATE TABLE NachBillDates (

Code INTEGER NOT NULL,

BillingDate INTEGER NOT NULL

);

ALTER TABLE NachBillDates

ADD CONSTRAINT XPKBillDates PRIMARY KEY (Code);

CREATE TABLE NachBillings (

Code INTEGER NOT NULL,

Division INTEGER NOT NULL,

Owner INTEGER NOT NULL,

BillDateCode INTEGER NOT NULL

);

ALTER TABLE NachBillings

ADD CONSTRAINT XPKNachBillings PRIMARY KEY (Code);

CREATE TABLE NachConstUsl (

Code INTEGER NOT NULL,

Owner INTEGER NOT NULL,

Usl INTEGER NOT NULL,

Phone INTEGER NOT NULL,

UslSum CURR_TYPE,

BegDate DATE_TYPE,

EndDate DATE_TYPE

);

ALTER TABLE NachConstUsl

ADD CONSTRAINT XPKNachConstUsl PRIMARY KEY (Code);

CREATE TABLE Phones (

Code INTEGER NOT NULL,

Street INTEGER NOT NULL,

Owner INTEGER NOT NULL,

PKey INTEGER NOT NULL,

Comment DESCR_TYPE,

PhoneNmb PHONE_TYPE,

InstallDate DATE_TYPE,

RemoveDate DATE_TYPE,

BegDate DATE_TYPE,

EndDate DATE_TYPE

);

ALTER TABLE Phones

ADD CONSTRAINT XPKPhones PRIMARY KEY (Code);

CREATE TRIGGER Phones_BUH FOR Phones

BEFORE UPDATE POSITION 0

AS

BEGIN

/* Eciaiaiea BegDate */

IF (new.BegDate <> old.BegDate) THEN

BEGIN

IF (new.BegDate < old.BegDate) THENBEGIN/* ?anoe?aiea BegDate */UPDATE PhonesSET EndDate = new.BegDateWHERE ((new.BegDate BETWEEN BegDate AND EndDate) AND (PKey = new.PKey));ENDELSEBEGIN/* Noaeaiea BegDate */UPDATE PhonesSET EndDate = new.BegDateWHERE ((EndDate = old.BegDate) AND (PKey = new.PKey));ENDEND/* Eciaiaiea EndDate */IF (new.EndDate <> old.EndDate) THEN

BEGIN

IF (new.EndDate > old.EndDate) THEN

BEGIN

/* ?anoe?aiea EndDate */

UPDATE Phones

SET BegDate = new.EndDate

WHERE ((new.EndDate BETWEEN BegDate AND EndDate) AND (PKey =
new.PKey));

END

ELSE

BEGIN

/* Noaeaiea EndDate */

UPDATE Phones

SET BegDate = new.EndDate

WHERE ((BegDate = old.EndDate) AND (PKey = new.PKey));

END

END

/* Nai?ea ioni?a */

DELETE FROM Phones

WHERE ((BegDate >= new.BegDate) AND (EndDate <= new.EndDate) AND (PKey = new.PKey) AND (Code <> new.Code));

END ^

CREATE TRIGGER Phones_BIH FOR Phones

BEFORE INSERT POSITION 0

AS

BEGIN

DELETE FROM Phones

WHERE ((BegDate >= new.BegDate) AND (EndDate <= new.EndDate) AND (PKey = new.PKey));UPDATE PhonesSET BegDate = new.EndDateWHERE ((new.EndDate BETWEEN BegDate AND EndDate) AND (PKey = new.PKey));UPDATE PhonesSET EndDate = new.BegDateWHERE ((new.BegDate BETWEEN BegDate AND EndDate) AND (PKey = new.PKey));END ^CREATE TRIGGER Phones_BDH FOR PhonesBEFORE DELETE POSITION 0ASBEGINUPDATE PhonesSET EndDate = old.EndDateWHERE ((EndDate = old.BegDate) AND (PKey = old.PKey));END ^CREATE TABLE PhonesBanks (Code INTEGER NOT NULL,Name1 DESCR_TYPE,PMFO CHAR(12) NOT NULL,Name2 DESCR_TYPE,ELMFO CHAR(12) NOT NULL,PlatCount SMALLINT NOT NULL,Acc1 CHAR(12) NOT NULL,Acc2 CHAR(12) NOT NULL);CREATE INDEX XIEPhonesBanksName ON PhonesBanks(Name1,Name2);ALTER TABLE PhonesBanksADD CONSTRAINT XPKPhonesBanks PRIMARY KEY (Code);CREATE TABLE PhonesKeys (Code INTEGER NOT NULL);ALTER TABLE PhonesKeysADD CONSTRAINT XPKPhonesKeys PRIMARY KEY (Code);CREATE TABLE PhonesOwners (Code INTEGER NOT NULL,PKey INTEGER NOT NULL,Name1 DESCR_TYPE,Name2 DESCR_TYPE,Category INTEGER NOT NULL,Bank INTEGER,Street INTEGER NOT NULL,PostStation INTEGER,House CHAR(5),Corpus CHAR(3),Flat CHAR(3),Account CHAR(5),RS CHAR(9),INN CHAR(13),Nmb_Dogov CHAR(6),Date_Dogov DATE,BegDate DATE_TYPE,EndDate DATE_TYPE);ALTER TABLE PhonesOwnersADD CONSTRAINT XPKPhonesOwners PRIMARY KEY (Code);CREATE TRIGGER PhonesOwners_BUH FOR PhonesOwnersBEFORE UPDATE POSITION 0ASBEGIN/* Eciaiaiea BegDate */IF (new.BegDate <> old.BegDate) THEN

BEGIN

IF (new.BegDate < old.BegDate) THENBEGIN/* ?anoe?aiea BegDate */UPDATE PhonesOwnersSET EndDate = new.BegDateWHERE ((new.BegDate BETWEEN BegDate AND EndDate) AND (PKey = new.PKey));ENDELSEBEGIN/* Noaeaiea BegDate */UPDATE PhonesOwnersSET EndDate = new.BegDateWHERE ((EndDate = old.BegDate) AND (PKey = new.PKey));ENDEND/* Eciaiaiea EndDate */IF (new.EndDate <> old.EndDate) THEN

BEGIN

IF (new.EndDate > old.EndDate) THEN

BEGIN

/* ?anoe?aiea EndDate */

UPDATE PhonesOwners

SET BegDate = new.EndDate

WHERE ((new.EndDate BETWEEN BegDate AND EndDate) AND (PKey =
new.PKey));

END

ELSE

BEGIN

/* Noaeaiea EndDate */

UPDATE PhonesOwners

SET BegDate = new.EndDate

WHERE ((BegDate = old.EndDate) AND (PKey = new.PKey));

END

END

/* Nai?ea ioni?a */

DELETE FROM PhonesOwners

WHERE ((BegDate >= new.BegDate) AND (EndDate <= new.EndDate) AND (PKey = new.PKey) AND (Code <> new.Code));

END ^

CREATE TRIGGER PhonesOwners_BIH FOR PhonesOwners

BEFORE INSERT POSITION 0

AS

BEGIN

DELETE FROM PhonesOwners

WHERE ((BegDate >= new.BegDate) AND (EndDate <= new.EndDate) AND (PKey = new.PKey));UPDATE PhonesOwnersSET BegDate = new.EndDateWHERE ((new.EndDate BETWEEN BegDate AND EndDate) AND (PKey = new.PKey));UPDATE PhonesOwnersSET EndDate = new.BegDateWHERE ((new.BegDate BETWEEN BegDate AND EndDate) AND (PKey = new.PKey));END ^CREATE TRIGGER PhonesOwners_BDH FOR PhonesOwnersBEFORE DELETE POSITION 0ASBEGINUPDATE PhonesOwnersSET EndDate = old.EndDateWHERE ((EndDate = old.BegDate) AND (PKey = old.PKey));END ^CREATE TABLE PhonesOwnersKeys (Code INTEGER NOT NULL,InRest CURR_TYPE,OutRest CURR_TYPE,NDolg INTEGER NOT NULL);ALTER TABLE PhonesOwnersKeysADD CONSTRAINT XPKPhonesOwnersKeys PRIMARY KEY (Code);CREATE TABLE PhonesPostStations (Code INTEGER NOT NULL,Name DESCR_TYPE,Region INTEGER NOT NULL,PostIndex CHAR(6) NOT NULL,PostNmb CHAR(6) NOT NULL);CREATE UNIQUE INDEX XAKPhonesPostStationsIndex ON PhonesPostStations(PostIndex);CREATE UNIQUE INDEX XAKPhonesPostStationsPostNmb ON PhonesPostStations(PostNmb);CREATE INDEX XIEPhonesPostStationsName ON PhonesPostStations(Name);ALTER TABLE PhonesPostStationsADD CONSTRAINT XPKPhonesPostStations PRIMARY KEY (Code);CREATE TABLE PhonesRegions (Code INTEGER NOT NULL,Name DESCR_TYPE NOT NULL);CREATE INDEX XIEPhonesRegionsName ON PhonesRegions(Name);ALTER TABLE PhonesRegionsADD CONSTRAINT XPKPhonesRegions PRIMARY KEY (Code);CREATE TABLE PhonesStations (Code INTEGER NOT NULL,Region INTEGER NOT NULL,Name DESCR_TYPE NOT NULL);CREATE INDEX XIEPhonesStationsName ON PhonesStations(Name);ALTER TABLE PhonesStationsADD CONSTRAINT XPKPhonesStations PRIMARY KEY (Code);CREATE TABLE PhonesStreets (Code INTEGER NOT NULL,Station INTEGER NOT NULL,Region INTEGER NOT NULL,Name DESCR_TYPE);CREATE INDEX XIEPhonesStreetsName ON PhonesStreets(Name);ALTER TABLE PhonesStreetsADD CONSTRAINT XPKPhonesStreets PRIMARY KEY (Code);CREATE TABLE Plat (Code INTEGER NOT NULL,Owner INTEGER NOT NULL,ToUsl INTEGER,PlatDate DATE_TYPE,PlatType INTEGER NOT NULL,DocNmb CHAR(12) NOT NULL);ALTER TABLE PlatADD CONSTRAINT XPKPlat PRIMARY KEY (Code);CREATE TABLE SysLog (Code INTEGER NOT NULL,TableName CHAR(16) NOT NULL,OpType INTEGER NOT NULL,NewData CHAR(64) NOT NULL,OpDate DATE NOT NULL);ALTER TABLE SysLogADD CONSTRAINT XPKSysLog PRIMARY KEY (Code);CREATE TABLE SysSettings (Code INTEGER NOT NULL,TimeTalksUsl INTEGER NOT NULL,NullOwner INTEGER NOT NULL);ALTER TABLE SysSettingsADD CONSTRAINT XPKSysSettings PRIMARY KEY (Code);CREATE TABLE Talks (Code INTEGER NOT NULL,DayCode INTEGER NOT NULL,Phone INTEGER NOT NULL,ToPhone INTEGER NOT NULL,CallTime CALLTIME_TYPE,PhoneNmb PHONE_TYPE,HowLong INTEGER NOT NULL,ToPhoneNmb PHONE_TYPE,Calculated SMALLINT NOT NULL,CallDate DATE_TYPE);CREATE INDEX XAK1TalksCallDate ON Talks(CallDate);ALTER TABLE TalksADD CONSTRAINT XPKTalks PRIMARY KEY (Code);CREATE TABLE TalksPay (Code INTEGER NOT NULL,Phone INTEGER NOT NULL,TotalSum CURR_TYPE,TotalLgotTime CALLTIME_TYPE,TotalFullTime CALLTIME_TYPE,TotalTime COMPUTED BY (TotalLgotTime+TotalFullTime),CallDate DATE_TYPE);ALTER TABLE TalksPayADD CONSTRAINT XPKTalksPay PRIMARY KEY (Code);CREATE TABLE UslCat (Code INTEGER NOT NULL,PKey INTEGER NOT NULL,Name DESCR_TYPE,Parent INTEGER NOT NULL,BegDate DATE_TYPE,EndDate DATE_TYPE);CREATE INDEX XIEUslCatName ON UslCat(Name);CREATE INDEX XIEUslCatParent ON UslCat(Parent);ALTER TABLE UslCatADD CONSTRAINT XPKUslCat PRIMARY KEY (Code);CREATE TRIGGER UslCat_BUH FOR UslCatBEFORE UPDATE POSITION 0ASBEGIN/* Eciaiaiea BegDate */IF (new.BegDate <> old.BegDate) THEN

BEGIN

IF (new.BegDate < old.BegDate) THENBEGIN/* ?anoe?aiea BegDate */UPDATE UslCatSET EndDate = new.BegDateWHERE ((new.BegDate BETWEEN BegDate AND EndDate) AND (PKey = new.PKey));ENDELSEBEGIN/* Noaeaiea BegDate */UPDATE UslCatSET EndDate = new.BegDateWHERE ((EndDate = old.BegDate) AND (PKey = new.PKey));ENDEND/* Eciaiaiea EndDate */IF (new.EndDate <> old.EndDate) THEN

BEGIN

IF (new.EndDate > old.EndDate) THEN

BEGIN

/* ?anoe?aiea EndDate */

UPDATE UslCat

SET BegDate = new.EndDate

WHERE ((new.EndDate BETWEEN BegDate AND EndDate) AND (PKey =
new.PKey));

END

ELSE

BEGIN

/* Noaeaiea EndDate */

UPDATE UslCat

SET BegDate = new.EndDate

WHERE ((BegDate = old.EndDate) AND (PKey = new.PKey));

END

END

/* Nai?ea ioni?a */

DELETE FROM UslCat

WHERE ((BegDate >= new.BegDate) AND (EndDate <= new.EndDate) AND (PKey = new.PKey) AND (Code <> new.Code));

END ^

CREATE TRIGGER UslCat_BIH FOR UslCat

BEFORE INSERT POSITION 0

AS

BEGIN

DELETE FROM UslCat

WHERE ((BegDate >= new.BegDate) AND (EndDate <= new.EndDate) AND (PKey = new.PKey));UPDATE UslCatSET BegDate = new.EndDateWHERE ((new.EndDate BETWEEN BegDate AND EndDate) AND (PKey = new.PKey));UPDATE UslCatSET EndDate = new.BegDateWHERE ((new.BegDate BETWEEN BegDate AND EndDate) AND (PKey = new.PKey));END ^CREATE TRIGGER UslCat_BDH FOR UslCatBEFORE DELETE POSITION 0ASBEGINUPDATE UslCatSET EndDate = old.EndDateWHERE ((EndDate = old.BegDate) AND (PKey = old.PKey));END ^CREATE TABLE UslCatKeys (Code INTEGER NOT NULL);ALTER TABLE UslCatKeysADD CONSTRAINT XPKUslCatKeys PRIMARY KEY (Code);CREATE TABLE UslDivisions (Code INTEGER NOT NULL,Name DESCR_TYPE,PKey INTEGER NOT NULL,Parent INTEGER NOT NULL,BegDate DATE_TYPE,EndDate DATE_TYPE);CREATE INDEX XIEUslDivisionsname ON UslDivisions(Name);CREATE INDEX XIEUslDivisionsParent ON UslDivisions(Parent);ALTER TABLE UslDivisionsADD CONSTRAINT XPKUslDivisions PRIMARY KEY (Code);CREATE TRIGGER UslDivisions_BUH FOR UslDivisionsBEFORE UPDATE POSITION 0ASBEGIN/* Eciaiaiea BegDate */IF (new.BegDate <> old.BegDate) THEN

BEGIN

IF (new.BegDate < old.BegDate) THENBEGIN/* ?anoe?aiea BegDate */UPDATE UslDivisionsSET EndDate = new.BegDateWHERE ((new.BegDate BETWEEN BegDate AND EndDate) AND (PKey = new.PKey));ENDELSEBEGIN/* Noaeaiea BegDate */UPDATE UslDivisionsSET EndDate = new.BegDateWHERE ((EndDate = old.BegDate) AND (PKey = new.PKey));ENDEND/* Eciaiaiea EndDate */IF (new.EndDate <> old.EndDate) THEN

BEGIN

IF (new.EndDate > old.EndDate) THEN

BEGIN

/* ?anoe?aiea EndDate */

UPDATE UslDivisions

SET BegDate = new.EndDate

WHERE ((new.EndDate BETWEEN BegDate AND EndDate) AND (PKey =
new.PKey));

END

ELSE

BEGIN

/* Noaeaiea EndDate */

UPDATE UslDivisions

SET BegDate = new.EndDate

WHERE ((BegDate = old.EndDate) AND (PKey = new.PKey));

END

END

/* Nai?ea ioni?a */

DELETE FROM UslDivisions

WHERE ((BegDate >= new.BegDate) AND (EndDate <= new.EndDate) AND (PKey = new.PKey) AND (Code <> new.Code));

END ^

CREATE TRIGGER UslDivisions_BIH FOR UslDivisions

BEFORE INSERT POSITION 0

AS

BEGIN

DELETE FROM UslDivisions

WHERE ((BegDate >= new.BegDate) AND (EndDate <= new.EndDate) AND (PKey = new.PKey));UPDATE UslDivisionsSET BegDate = new.EndDateWHERE ((new.EndDate BETWEEN BegDate AND EndDate) AND (PKey = new.PKey));UPDATE UslDivisionsSET EndDate = new.BegDateWHERE ((new.BegDate BETWEEN BegDate AND EndDate) AND (PKey = new.PKey));END ^CREATE TRIGGER UslDivisions_BDH FOR UslDivisionsBEFORE DELETE POSITION 0ASBEGINUPDATE UslDivisionsSET EndDate = old.EndDateWHERE ((EndDate = old.BegDate) AND (PKey = old.PKey));END ^CREATE TABLE UslDivisionsKeys (Code INTEGER NOT NULL);ALTER TABLE UslDivisionsKeysADD CONSTRAINT XPKUslDivisionsKeys PRIMARY KEY (Code);CREATE TABLE UslLgots (Code INTEGER NOT NULL,Category INTEGER NOT NULL,Property INTEGER,Tax CURR_TYPE,Usl INTEGER NOT NULL,NachCoeff INTEGER NOT NULL,Nalog INTEGER NOT NULL,BegDate INTEGER NOT NULL,Info INTEGER NOT NULL,EndDate INTEGER NOT NULL);ALTER TABLE UslLgotsADD CONSTRAINT XPKUslLgots PRIMARY KEY (Code);CREATE TABLE UslProps (Code INTEGER NOT NULL,PKey INTEGER NOT NULL,Tag INTEGER NOT NULL,ValInteger INTEGER,ValFloat FLOAT,BegDate DATE_TYPE,EndDate DATE_TYPE);ALTER TABLE UslPropsADD CONSTRAINT XPKUslProps PRIMARY KEY (Code);CREATE TRIGGER UslProps_BUH FOR UslPropsBEFORE UPDATE POSITION 0ASBEGIN/* Eciaiaiea BegDate */IF (new.BegDate <> old.BegDate) THEN

BEGIN

IF (new.BegDate < old.BegDate) THENBEGIN/* ?anoe?aiea BegDate */UPDATE UslPropsSET EndDate = new.BegDateWHERE ((new.BegDate BETWEEN BegDate AND EndDate) AND (PKey = new.PKey));ENDELSEBEGIN/* Noaeaiea BegDate */UPDATE UslPropsSET EndDate = new.BegDateWHERE ((EndDate = old.BegDate) AND (PKey = new.PKey));ENDEND/* Eciaiaiea EndDate */IF (new.EndDate <> old.EndDate) THEN

BEGIN

IF (new.EndDate > old.EndDate) THEN

BEGIN

/* ?anoe?aiea EndDate */

UPDATE UslProps

SET BegDate = new.EndDate

WHERE ((new.EndDate BETWEEN BegDate AND EndDate) AND (PKey =
new.PKey));

END

ELSE

BEGIN

/* Noaeaiea EndDate */

UPDATE UslProps

SET BegDate = new.EndDate

WHERE ((BegDate = old.EndDate) AND (PKey = new.PKey));

END

END

/* Nai?ea ioni?a */

DELETE FROM UslProps

WHERE ((BegDate >= new.BegDate) AND (EndDate <= new.EndDate) AND (PKey = new.PKey) AND (Code <> new.Code));

END ^

CREATE TRIGGER UslProps_BIH FOR UslProps

BEFORE INSERT POSITION 0

AS

BEGIN

DELETE FROM UslProps

WHERE ((BegDate >= new.BegDate) AND (EndDate <= new.EndDate) AND (PKey = new.PKey));UPDATE UslPropsSET BegDate = new.EndDateWHERE ((new.EndDate BETWEEN BegDate AND EndDate) AND (PKey = new.PKey));UPDATE UslPropsSET EndDate = new.BegDateWHERE ((new.BegDate BETWEEN BegDate AND EndDate) AND (PKey = new.PKey));END ^CREATE TRIGGER UslProps_BDH FOR UslPropsBEFORE DELETE POSITION 0ASBEGINUPDATE UslPropsSET EndDate = old.EndDateWHERE ((EndDate = old.BegDate) AND (PKey = old.PKey));END ^CREATE TABLE UslPropsKeys (Code INTEGER NOT NULL);ALTER TABLE UslPropsKeysADD CONSTRAINT XPKUslPropsKeys PRIMARY KEY (Code);CREATE TABLE Usls (Code INTEGER NOT NULL,PKey INTEGER NOT NULL,Division INTEGER NOT NULL,UslType INTEGER NOT NULL,Name CHAR(64) NOT NULL,BegDate DATE_TYPE,EndDate DATE_TYPE);CREATE INDEX XIEUslsName ON Usls(Name);ALTER TABLE UslsADD CONSTRAINT XPKUsls PRIMARY KEY (Code);CREATE TRIGGER Usls_BUH FOR UslsBEFORE UPDATE POSITION 0ASBEGIN/* Eciaiaiea BegDate */IF (new.BegDate <> old.BegDate) THEN

BEGIN

IF (new.BegDate < old.BegDate) THENBEGIN/* ?anoe?aiea BegDate */UPDATE UslsSET EndDate = new.BegDateWHERE ((new.BegDate BETWEEN BegDate AND EndDate) AND (PKey = new.PKey));ENDELSEBEGIN/* Noaeaiea BegDate */UPDATE UslsSET EndDate = new.BegDateWHERE ((EndDate = old.BegDate) AND (PKey = new.PKey));ENDEND/* Eciaiaiea EndDate */IF (new.EndDate <> old.EndDate) THEN

BEGIN

IF (new.EndDate > old.EndDate) THEN

BEGIN

/* ?anoe?aiea EndDate */

UPDATE Usls

SET BegDate = new.EndDate

WHERE ((new.EndDate BETWEEN BegDate AND EndDate) AND (PKey =
new.PKey));

END

ELSE

BEGIN

/* Noaeaiea EndDate */

UPDATE Usls

SET BegDate = new.EndDate

WHERE ((BegDate = old.EndDate) AND (PKey = new.PKey));

END

END

/* Nai?ea ioni?a */

DELETE FROM Usls

WHERE ((BegDate >= new.BegDate) AND (EndDate <= new.EndDate) AND (PKey = new.PKey) AND (Code <> new.Code));

END ^

CREATE TRIGGER Usls_BIH FOR Usls

BEFORE INSERT POSITION 0

AS

BEGIN

DELETE FROM Usls

WHERE ((BegDate >= new.BegDate) AND (EndDate <= new.EndDate) AND (PKey = new.PKey));UPDATE UslsSET BegDate = new.EndDateWHERE ((new.EndDate BETWEEN BegDate AND EndDate) AND (PKey = new.PKey));UPDATE UslsSET EndDate = new.BegDateWHERE ((new.BegDate BETWEEN BegDate AND EndDate) AND (PKey = new.PKey));END ^CREATE TRIGGER Usls_BDH FOR UslsBEFORE DELETE POSITION 0ASBEGINUPDATE UslsSET EndDate = old.EndDateWHERE ((EndDate = old.BegDate) AND (PKey = old.PKey));END ^CREATE TABLE UslsKeys (Code INTEGER NOT NULL);ALTER TABLE UslsKeysADD CONSTRAINT XPKUslsKeys PRIMARY KEY (Code);CREATE TABLE UslTypes (Code INTEGER NOT NULL,Name DESCR_TYPE);ALTER TABLE UslTypesADD CONSTRAINT XPKUslTypes PRIMARY KEY (Code);ALTER TABLE NachADD CONSTRAINT R_59FOREIGN KEY (Usl)REFERENCES UslsKeys;ALTER TABLE NachADD CONSTRAINT R_57FOREIGN KEY (Phone)REFERENCES PhonesKeys;ALTER TABLE NachADD FOREIGN KEY (Owner)REFERENCES PhonesOwnersKeys;ALTER TABLE NachBillingsADD CONSTRAINT R_65FOREIGN KEY (Division)REFERENCES UslDivisionsKeys;ALTER TABLE NachBillingsADD FOREIGN KEY (BillDateCode)REFERENCES NachBillDates;ALTER TABLE NachBillingsADD FOREIGN KEY (Owner)REFERENCES PhonesOwnersKeys;ALTER TABLE NachConstUslADD CONSTRAINT R_60FOREIGN KEY (Usl)REFERENCES UslsKeys;ALTER TABLE NachConstUslADD CONSTRAINT R_58FOREIGN KEY (Phone)REFERENCES PhonesKeys;ALTER TABLE NachConstUslADD FOREIGN KEY (Owner)REFERENCES PhonesOwnersKeys;ALTER TABLE PhonesADD FOREIGN KEY (Owner)REFERENCES PhonesOwnersKeys;ALTER TABLE PhonesADD FOREIGN KEY (PKey)REFERENCES PhonesKeys;ALTER TABLE PhonesADD FOREIGN KEY (Street)REFERENCES PhonesStreets;ALTER TABLE PhonesOwnersADD FOREIGN KEY (PostStation)REFERENCES PhonesPostStations;ALTER TABLE PhonesOwnersADD FOREIGN KEY (Street)REFERENCES PhonesStreets;ALTER TABLE PhonesOwnersADD FOREIGN KEY (Bank)REFERENCES PhonesBanks;ALTER TABLE PhonesOwnersADD FOREIGN KEY (Category)REFERENCES UslCatKeys;ALTER TABLE PhonesOwnersADD FOREIGN KEY (PKey)REFERENCES PhonesOwnersKeys;ALTER TABLE PhonesPostStationsADD CONSTRAINT R_62FOREIGN KEY (Region)REFERENCES PhonesRegions;ALTER TABLE PhonesStationsADD FOREIGN KEY (Region)REFERENCES PhonesRegions;ALTER TABLE PhonesStreetsADD FOREIGN KEY (Region)REFERENCES PhonesRegions;ALTER TABLE PhonesStreetsADD FOREIGN KEY (Station)REFERENCES PhonesStations;ALTER TABLE PlatADD CONSTRAINT R_61FOREIGN KEY (ToUsl)REFERENCES UslsKeys;ALTER TABLE PlatADD FOREIGN KEY (Owner)REFERENCES PhonesOwnersKeys;ALTER TABLE SysSettingsADD FOREIGN KEY (NullOwner)REFERENCES PhonesOwnersKeys;ALTER TABLE SysSettingsADD FOREIGN KEY (TimeTalksUsl)REFERENCES UslsKeys;ALTER TABLE TalksADD FOREIGN KEY (ToPhone)REFERENCES PhonesKeys;ALTER TABLE TalksADD FOREIGN KEY (Phone)REFERENCES PhonesKeys;ALTER TABLE TalksADD FOREIGN KEY (DayCode)REFERENCES TalksPay;ALTER TABLE TalksPayADD FOREIGN KEY (Phone)REFERENCES PhonesKeys;ALTER TABLE UslCatADD FOREIGN KEY (PKey)REFERENCES UslCatKeys;ALTER TABLE UslDivisionsADD CONSTRAINT R_63FOREIGN KEY (PKey)REFERENCES UslDivisionsKeys;ALTER TABLE UslLgotsADD CONSTRAINT R_50FOREIGN KEY (Property)REFERENCES UslPropsKeys;ALTER TABLE UslLgotsADD FOREIGN KEY (Usl)REFERENCES UslsKeys;ALTER TABLE UslLgotsADD FOREIGN KEY (Category)REFERENCES UslCatKeys;ALTER TABLE UslPropsADD CONSTRAINT R_51FOREIGN KEY (PKey)REFERENCES UslPropsKeys;ALTER TABLE UslsADD CONSTRAINT R_64FOREIGN KEY (Division)REFERENCES UslDivisionsKeys;ALTER TABLE UslsADD FOREIGN KEY (UslType)REFERENCES UslTypes;ALTER TABLE UslsADD FOREIGN KEY (PKey)REFERENCES UslsKeys;CREATE PROCEDURE PrGenUslPropsKeysRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genUslPropsKeys, 1);END ^CREATE PROCEDURE PrGenUslPropsRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genUslProps, 1);END ^CREATE PROCEDURE PrGenPhonesRegionsRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genPhonesRegions, 1);END ^CREATE PROCEDURE PrGenPhonesStationsRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genPhonesStations, 1);END ^CREATE PROCEDURE PrGenPhonesStreetsRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genPhonesStreets, 1);END ^CREATE PROCEDURE PrGenPhonesBanksRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genPhonesBanks, 1);END ^CREATE PROCEDURE PrGenTalksPayRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genTalksPay, 1);END ^CREATE PROCEDURE PrGenTalksRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genTalks, 1);END ^CREATE PROCEDURE PrGenNachRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genNach, 1);END ^CREATE PROCEDURE PrGenNachBillingsRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genNachBillings, 1);END ^CREATE PROCEDURE PrGenNachBillDatesRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genNachBillDates, 1);END ^CREATE PROCEDURE PrGenNachConstUslRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genNachConstUsl, 1);END ^CREATE PROCEDURE PrGenUslDivisionsRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genUslDivisions, 1);END ^CREATE PROCEDURE PrGenUslLgotsRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genUslLgots, 1);END ^CREATE PROCEDURE PrGenUslsKeysRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genUslsKeys, 1);END ^CREATE PROCEDURE PrGenUslsRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genUsls, 1);END ^CREATE PROCEDURE PrGenUslCatKeysRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genUslCatKeys, 1);END ^CREATE PROCEDURE PrGenUslCatRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genUslCat, 1);END ^CREATE PROCEDURE PrGenPhonesRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genPhones, 1);END ^CREATE PROCEDURE PrGenPhonesOwnersKeysRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genPhonesOwnersKeys, 1);END ^CREATE PROCEDURE PrGenPhonesOwnersRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genPhonesOwners, 1);END ^CREATE PROCEDURE PrGenSysSettingsRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genSysSettings, 1);END ^CREATE PROCEDURE PrGenPhonesKeysRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genPhonesKeys, 1);END ^CREATE PROCEDURE PrGenPlatRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genPlat, 1);END ^CREATE PROCEDURE PrGenPhonesPostStationsRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genPhonesPostStations, 1);END ^CREATE PROCEDURE PrGenSysLogRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genSysLog, 1);END ^CREATE PROCEDURE PrGenUslTypesRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genUslTypes, 1);END ^CREATE PROCEDURE PrGenUslDivisionsKeysRETURNS (ACode INTEGER)ASBEGINACode = GEN_ID(genUslDivisionsKeys, 1);END ^^CREATE PROCEDURE TalksExamineOwner (APhoneNmb CHAR(7), ADate DATE)RETURNS (APhone INTEGER)ASDECLARE VARIABLE AStreet INTEGER;DECLARE VARIABLE NOwner INTEGER;DECLARE VARIABLE APhoneCode INTEGER;BEGINSELECT PKey FROM Phones WHERE (PhoneNmb = :APhoneNmb) AND (:ADate BETWEEN BegDate AND EndDate)INTO :APhone;IF (:APhone IS NULL) THENBEGINSELECT NullOwner FROM SysSettings INTO :NOwner;SELECT Street FROM PhonesOwnersWHERE (PKey = :NOwner) AND (:ADate BETWEEN PhonesOwners.BegDate AND PhonesOwners.EndDate)INTO :AStreet;IF (:AStreet IS NOT NULL) THENBEGINEXECUTE PROCEDURE PrGenPhonesKeys RETURNING_VALUES :APhone;INSERT INTO PhonesKeys (Code)VALUES (:APhone);INSERT INTO Phones(Owner, PKey, PhoneNmb, Street, InstallDate, RemoveDate, BegDate, EndDate)VALUES (:NOwner, :APhone, :APhoneNmb, :AStreet, :ADate, "12.12.2222", :ADate, "12.12.2222");ENDENDEND ^CREATE PROCEDURE TalksGetTaxASBEGINEXIT;END ^CREATE PROCEDURE TalksGetPay (APhone INTEGER, ADay DATE, ACallTime INTEGER, AHowLong INTEGER)RETURNS (APay FLOAT, ACalculated SMALLINT, IsLgot SMALLINT)ASDECLARE VARIABLE ATax FLOAT;DECLARE VARIABLE AProcNach FLOAT;DECLARE VARIABLE ATalksUsl INTEGER;DECLARE VARIABLE AOwner INTEGER;DECLARE VARIABLE ANalog FLOAT;BEGINACalculated = 0;SELECT TimeTalksUsl FROM SysSettings INTO :ATalksUsl;IF (:ATalksUsl IS NULL) THEN EXIT;SELECT Owner FROM Phones WHERE (PKey = :APhone) AND (:ADay BETWEEN BegDate AND EndDate)INTO :AOwner;IF (:AOwner IS NULL) THEN EXIT;EXECUTE PROCEDURE UslGetOwnerTax(:AOwner, :ATalksUsl, :ADay)RETURNING_VALUES :ATax, :AProcNach, :ANalog;IF (:ATax IS NULL) THEN EXIT;APay = ATax*AHowLong*AProcNach/3000;ACalculated = 1;END ^CREATE PROCEDURE TalksCallBilling (APhone INTEGER, ACallDate DATE, ACallTime INTEGER, AHowLong INTEGER)RETURNS (ATalksPayCode INTEGER, ACalculated SMALLINT)ASDECLARE VARIABLE APay FLOAT;DECLARE VARIABLE PayCode INTEGER;DECLARE VARIABLE IsLgot SMALLINT;DECLARE VARIABLE TTime INTEGER;DECLARE VARIABLE LTime INTEGER;BEGINEXECUTE PROCEDURE TalksGetPay(APhone, ACallDate, ACallTime, AHowLong)RETURNING_VALUES :APay, :ACalculated, :IsLgot;SELECT Code FROM TalksPay WHERE (Phone = :APhone) AND (CallDate = :ACallDate)INTO PayCode;IF (:ACalculated = 0) THEN EXIT;IF (:IsLgot = 0) THEN BEGINTTime = AHowLong;LTime = 0;ENDELSE BEGINLTime = AHowLong;TTime = 0;ENDIF (:PayCode IS NULL) THEN BEGINEXECUTE PROCEDURE PrGenTalksPay RETURNING_VALUES :PayCode;INSERT INTO TalksPay (Code, Phone, CallDate, TotalSum, TotalFullTime, TotalLgotTime)VALUES (:PayCode, :APhone, :ACallDate, :APay, :TTime, :LTime);ENDELSE BEGINUPDATE TalksPaySET TotalSum = TotalSum+:APay,TotalFullTime = TotalFullTime+:TTime,TotalLgotTime = TotalLgotTime+:LTimeWHERE Code = :PayCode;ENDEND ^CREATE PROCEDURE UslGetOwnerTax(AOwner INTEGER, AUsl INTEGER, ADate DATE)RETURNS (ATax FLOAT,AProcNach FLOAT,ANalog FLOAT)ASDECLARE VARIABLE ACategory INTEGER;BEGINSELECT Category FROM PhonesOwnersWHERE (PKey = :AOwner) AND (:ADate BETWEEN BegDate AND EndDate)INTO :ACategory;SELECT Tax, NachCoeff, Nalog FROM UslLgotsWHERE (Usl = :AUsl) AND (:ADate BETWEEN BegDate AND EndDate)INTO :ATax, :AProcNach, :ANalog;EXIT;ENDI?eeiaeaiea 2I?eeiaeaiea 3Enoiaeiua oaenou eiiioieeaoeeiiiiai na?aenaServiceMain.cOaee ServiceMain.c - Iiaeoeue eieoeeaeecaoeee e oi?aaeaiey na?aa?ii./*************************************************************//* Main unit for Communication Service *//* Copyright (c) 1997 by Malkov O.V. *//* JSC "Svyazinform" RM *//*************************************************************/#include

#include “DoService.h”

#include “CommonConfig.h”

/* Globals */

SERVICE_STATUS ServiceStatus;

SERVICE_STATUS_HANDLE ServiceStatusHandle;

/* Function Prototypes */

void WINAPI ServiceStart (DWORD argc, LPTSTR *argv);

VOID WINAPI ServiceCtrlHandler (IN DWORD opcode);

DWORD ServiceInitialization(DWORD argc, LPTSTR *argv,

DWORD *specificError);

VOID _CRTAPI1 main(int argc, char **argv)

{

int i;

SERVICE_TABLE_ENTRY DispatchTable[] = {

{ TEXT(“SiTime”), ServiceStart },

{ NULL, NULL }

};

/* Allow the user to override settings with command line switches */

for ( i = 1; i < argc; i++) {if ((*argv[i] == '-') || (*argv[i] == '/')) {switch (tolower(*(argv[i]+1))) {case 'p': // protocol sequencepszProtocolSequence = argv[++i];break;case 'e': // endpointpszEndpoint = argv[++i];break;default: ;}}}if (!StartServiceCtrlDispatcher( DispatchTable)) {/* Error Handling */}}void WINAPI ServiceStart(DWORD argc, LPTSTR *argv){DWORD status;DWORD specificError;ServiceStatus.dwServiceType = SERVICE_WIN32;ServiceStatus.dwCurrentState = SERVICE_START_PENDING;ServiceStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP |SERVICE_ACCEPT_PAUSE_CONTINUE;ServiceStatus.dwWin32ExitCode = 0;ServiceStatus.dwServiceSpecificExitCode = 0;ServiceStatus.dwCheckPoint = 0;ServiceStatus.dwWaitHint = 0;ServiceStatusHandle = RegisterServiceCtrlHandler(TEXT("SiTime"),ServiceCtrlHandler);if (ServiceStatusHandle == (SERVICE_STATUS_HANDLE)0) {/* Error Handling */return;}// Initialization code goes here.status = ServiceInitialization(argc,argv, &specificError);// Handle error conditionif (status != NO_ERROR) {ServiceStatus.dwCurrentState = SERVICE_STOPPED;ServiceStatus.dwCheckPoint = 0;ServiceStatus.dwWaitHint = 0;ServiceStatus.dwWin32ExitCode = status;ServiceStatus.dwServiceSpecificExitCode = specificError;SetServiceStatus (ServiceStatusHandle, &ServiceStatus);return;}// Initialization complete - report running statusServiceStatus.dwCurrentState = SERVICE_RUNNING;ServiceStatus.dwCheckPoint = 0;ServiceStatus.dwWaitHint = 0;if (!SetServiceStatus (ServiceStatusHandle, &ServiceStatus)) {status = GetLastError();}// This is where the service does its work. //ServerProcess();return;}/* stub initialization function */DWORD ServiceInitialization(DWORD argc, LPTSTR *argv,DWORD *specificError){*specificError = ServerInit();if (*specificError) return *specificError;return(0);}void WINAPI ServiceCtrlHandler ( IN DWORD Opcode){DWORD status;switch(Opcode) {case SERVICE_CONTROL_PAUSE:/* Do whatever it takes to pause here. */ServerDoPause();ServiceStatus.dwCurrentState = SERVICE_PAUSED;break;case SERVICE_CONTROL_CONTINUE:/* Do whatever it takes to continue here.*/ServerDoContinue();ServiceStatus.dwCurrentState = SERVICE_RUNNING;break;case SERVICE_CONTROL_STOP:/* Do whatever it takes to stop here. */ServerDoStop();ServiceStatus.dwWin32ExitCode = 0;ServiceStatus.dwCurrentState = SERVICE_STOPPED;ServiceStatus.dwCheckPoint = 0;ServiceStatus.dwWaitHint = 0;if (!SetServiceStatus (ServiceStatusHandle, &ServiceStatus)){status = GetLastError();}return;case SERVICE_CONTROL_INTERROGATE:/* fall through to send current status */break;default:/* Error handling */break;}/* Send current status.*/if (!SetServiceStatus (ServiceStatusHandle, &ServiceStatus)) {status = GetLastError();}return;}CommonConfig.cOaee CommonConfig.c - Oi?aaeaiea eiioeao?aoeeae#include

#include “CommonConfig.h”

#include “EventLog.h”

#define REGVALUENAME_LENGTH 255

DWORD ConfigWatchingThread;

HANDLE hConfigMutex = NULL;

HANDLE hTaskMutex = NULL;

unsigned char * pszProtocolSequence = “ncacn_np”;

unsigned char * pszSecurity = NULL;

unsigned char * pszEndpoint = “\\pipe\\CommServ”;

unsigned int cMinCalls = 1;

unsigned int cMaxCalls = 20;

unsigned int fDontWait = FALSE;

struct TASKENTRY TaskTable[TASK_COUNT];

int EntryCount = 0;

DWORD TaskThreads[TASK_COUNT];

int TaskCount = 0;

void UpdateVariables()

{

HKEY hKey;

DWORD dwIndex = 0;

DWORD VNameLength = REGVALUENAME_LENGTH;

char VName[REGVALUENAME_LENGTH];

DWORD dwLength = sizeof(struct TASKENTRY);

int i;

__try {

WaitForSingleObject(hConfigMutex, INFINITE);

// Eieoeeaeecaoeey oaaeeoeu caaea/

for (i = 0; i < TASK_COUNT; i++) {TaskTable[i].Active = FALSE;TaskTable[i].ExecTime = 0;ZeroMemory(&TaskTable[i].DllName, sizeof(TaskTable[i].DllName));TaskTable[i].TermProc = NULL;TaskTable[i].TaskThread = 0;}// Caa?ocea oaaeeoeu caaea/ ec ?aano?aif (RegOpenKeyEx(HKEY_LOCAL_MACHINE,REGISTRY_TASKS_PATH,0, KEY_ALL_ACCESS, &hKey) == ERROR_SUCCESS) {dwIndex = 0;EntryCount = 0;while (RegEnumValue(hKey,dwIndex,(char *)&VName,&VNameLength,NULL,NULL,(LPVOID)&TaskTable[dwIndex],&dwLength) == ERROR_SUCCESS) {if (dwLength != sizeof(struct TASKENTRY)) {LogEvent(EVENTLOG_ERROR_TYPE, "Invalid Task Parameter");break;}EntryCount+=1;dwIndex+=1;}RegCloseKey(hKey);} else LogEvent(EVENTLOG_ERROR_TYPE, "Error Loading Configuration");}__finally {ReleaseMutex(hConfigMutex);}}DoService.c#include

#include “DoService.h”

#include “..\Comm.h”

#include “CommonConfig.h”

#include “ClientHandler.h”

#include “EventLog.h”

#include “ShedulerServ.h”

void ServerProcess() {

hConfigMutex = CreateMutex(NULL, FALSE, NULL);

hTaskMutex = CreateMutex(NULL, FALSE, NULL);

CreateThread(NULL, 0, ShedulingProc, NULL, 0, &ShedulingThread);

CreateThread(NULL, 0, RPCClientHandling, NULL, 0,
&ClientHandlingThread);

}

DWORD ServerInit() {

RPC_STATUS status;

status = RpcServerUseProtseqEp(

pszProtocolSequence,

cMaxCalls,

pszEndpoint,

pszSecurity); // Security descriptor

if (status != NO_ERROR) {

return(1);

}

status = RpcServerRegisterIf(

CommService_ServerIfHandle, // !!!

NULL, // MgrTypeUuid

NULL); // MgrEpv; null means use default

if (status != NO_ERROR) {

return(2);

}

LogEvent(EVENTLOG_INFORMATION_TYPE, “\”Svyazinform\” Communicatin
Service Initialized”);

return(0);

}

void ServerDoPause()

{

SuspendThread(&ShedulingThread);

SuspendThread(&ClientHandlingThread);

LogEvent(EVENTLOG_INFORMATION_TYPE, “\”Svyazinform\” Communicatin
Service Paused”);

}

void ServerDoContinue()

{

ResumeThread(&ShedulingThread);

ResumeThread(&ClientHandlingThread);

LogEvent(EVENTLOG_INFORMATION_TYPE, “\”Svyazinform\” Communicatin
Service Resumed”);

}

void ServerDoStop() {

RPC_STATUS status;

status = RpcMgmtStopServerListening(NULL);

if (status != NO_ERROR) {

// Error handling

}

status = RpcServerUnregisterIf(NULL, NULL, FALSE);

if (status != NO_ERROR) {

// Error handling

}

TerminateTasks();

WaitForSingleObject(&ClientHandlingThread, 5000);

CloseHandle(&ClientHandlingThread);

InterlockedIncrement(&TerminateSheduling);

WaitForSingleObject(&ShedulingThread, 5000);

CloseHandle(&ShedulingThread);

WaitForSingleObject(hConfigMutex, 3000);

ReleaseMutex(hConfigMutex);

CloseHandle(hConfigMutex);

WaitForSingleObject(hTaskMutex, 3000);

ReleaseMutex(hTaskMutex);

CloseHandle(hTaskMutex);

LogEvent(EVENTLOG_INFORMATION_TYPE, “\”Svyazinform\” Communicatin
Service Stopped”);

}

/**************************************************************/

/* MIDL allocate and free */

/**************************************************************/

void __RPC_FAR * __RPC_USER midl_user_allocate(size_t len)

{

return(malloc(len));

}

void __RPC_USER midl_user_free(void __RPC_FAR * ptr)

{

free(ptr);

}

ClientHandler.c

/**********************************************************/

/* Yoio iiaeoeue ia?aaaouaaao iiaeeeth/aiey eeeaioia */

/**********************************************************/

#include

#include “ClientHandler.h”

#include “CommonConfig.h”

#include “../Comm.h”

DWORD ClientHandlingThread;

DWORD WINAPI RPCClientHandling(LPVOID ThreadParm)

{

RPC_STATUS status;

status = RpcServerListen(

cMinCalls,

cMaxCalls,

fDontWait);

if (status != NO_ERROR) {

return 1;

}

return 0;

}

void RefreshIniProps()

{

MessageBeep(1);

return;

}

EventLog.c

#include

#include “EventLog.h”

void LogEvent(WORD EventType, LPSTR EventMsg)

{

HANDLE h;

h = RegisterEventSource(NULL, /* uses local computer */

“CommServ”); /* source name */

if (h != NULL)

{

ReportEvent(h, /* event log handle */

EventType, /* event type */

0, /* category zero */

0x1003, /* event identifier */

NULL, /* no user security identifier */

1, /* one substitution string */

0, /* no data */

&EventMsg, /* address of string array */

NULL); /* address of data */

DeregisterEventSource(h);

}

return;

}

Comm_s.c

/* this ALWAYS GENERATED file contains the RPC server stubs */

/* File created by MIDL compiler version 3.00.15 */

/* at Tue Jun 03 11:35:46 1997

*/

/* Compiler settings for comm.idl:

Os, W1, Zp8, env=Win32, ms_ext, c_ext, oldnames

error checks: none

*/

//@@MIDL_FILE_HEADING( )

#include

#include “comm.h”

#define TYPE_FORMAT_STRING_SIZE 1

#define PROC_FORMAT_STRING_SIZE 3

typedef struct _MIDL_TYPE_FORMAT_STRING

{

short Pad;

unsigned char Format[ TYPE_FORMAT_STRING_SIZE ];

} MIDL_TYPE_FORMAT_STRING;

typedef struct _MIDL_PROC_FORMAT_STRING

{

short Pad;

unsigned char Format[ PROC_FORMAT_STRING_SIZE ];

} MIDL_PROC_FORMAT_STRING;

extern const MIDL_TYPE_FORMAT_STRING __MIDLTypeFormatString;

extern const MIDL_PROC_FORMAT_STRING __MIDLProcFormatString;

/* Standard interface: CommService, ver. 1.0,

GUID={0x4a25d2e0,0x6703,0x11d0,{0x89,0x27,0x00,0xa0,0x24,0x13,0x85,0x0e}
} */

extern RPC_DISPATCH_TABLE CommService_DispatchTable;

static const RPC_SERVER_INTERFACE CommService___RpcServerInterface =

{

sizeof(RPC_SERVER_INTERFACE),

{{0x4a25d2e0,0x6703,0x11d0,{0x89,0x27,0x00,0xa0,0x24,0x13,0x85,0x0e}},{1
,0}},

{{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2
,0}},

&CommService_DispatchTable,

0,

0,

0,

0,

0

};

RPC_IF_HANDLE CommService_ServerIfHandle = (RPC_IF_HANDLE)&
CommService___RpcServerInterface;

extern const MIDL_STUB_DESC CommService_StubDesc;

void __RPC_STUB

CommService_RefreshIniProps(

PRPC_MESSAGE _pRpcMessage )

{

MIDL_STUB_MESSAGE _StubMsg;

RPC_STATUS _Status;

((void)(_Status));

NdrServerInitializeNew(

_pRpcMessage,

&_StubMsg,

&CommService_StubDesc);

RpcTryFinally

{

RefreshIniProps();

}

RpcFinally

{

}

RpcEndFinally

_pRpcMessage->BufferLength =

(unsigned int)((long)_StubMsg.Buffer –
(long)_pRpcMessage->Buffer);

}

static const MIDL_STUB_DESC CommService_StubDesc =

{

(void __RPC_FAR *)& CommService___RpcServerInterface,

MIDL_user_allocate,

MIDL_user_free,

0,

0,

0,

0,

0,

__MIDLTypeFormatString.Format,

0, /* -error bounds_check flag */

0x10001, /* Ndr library version */

0,

0x300000f, /* MIDL Version 3.0.15 */

0,

0,

0, /* Reserved1 */

0, /* Reserved2 */

0, /* Reserved3 */

0, /* Reserved4 */

0 /* Reserved5 */

};

static RPC_DISPATCH_FUNCTION CommService_table[] =

{

CommService_RefreshIniProps,

0

};

RPC_DISPATCH_TABLE CommService_DispatchTable =

{

1,

CommService_table

};

#if !defined(__RPC_WIN32__)

#error Invalid build platform for this stub.

#endif

static const MIDL_PROC_FORMAT_STRING __MIDLProcFormatString =

{

0,

{

0x5b, /* FC_END */

0x5c, /* FC_PAD */

0x0

}

};

static const MIDL_TYPE_FORMAT_STRING __MIDLTypeFormatString =

{

0,

{

0x0

}

};

ShedulerServ.c

/**********************************************************//* Task
Sheduler

/**********************************************************/

#include

#include “ShedulerServ.h”

#include “CommonConfig.h”

#include “EventLog.h”

#define SLEEP_INTERVAL 5000

#define ACTIVATE_INTERVAL 60000

BOOL TerminateSheduling = FALSE;

DWORD ShedulingThread;

DWORD WINAPI TaskProc(LPVOID ThreadParm);

void AnalyseTaskTable();

DWORD GetTimeInMins();

DWORD WINAPI ShedulingProc(LPVOID ThreadParm)

{

long i = 0;

while (!TerminateSheduling) {

if ((i += SLEEP_INTERVAL) >= ACTIVATE_INTERVAL) {

i = 0;

if (TaskCount == 0) UpdateVariables();

AnalyseTaskTable();

}

Sleep(SLEEP_INTERVAL);

}

return 0;

}

DWORD WINAPI TaskProc(LPVOID ThreadParm)

{

HINSTANCE hLib;

FARPROC hProc;

InterlockedIncrement(&TaskCount);

WaitForSingleObject(hConfigMutex, INFINITE);

MessageBeep(1);

if (hLib = LoadLibrary((char *)&((struct
TASKENTRY*)ThreadParm)->DllName)) {

if (((struct TASKENTRY*)ThreadParm)->TermProc = GetProcAddress(hLib,
(LPCSTR)TaskProcName))

{

((struct TASKENTRY*)ThreadParm)->Active = TRUE;

ReleaseMutex(hConfigMutex);

if (hProc = GetProcAddress(hLib, (LPCSTR)TaskProcName)) {

hProc();

__try {

WaitForSingleObject(hConfigMutex, INFINITE);

((struct TASKENTRY*)ThreadParm)->Active = FALSE;

CloseHandle((HANDLE)((struct TASKENTRY*)ThreadParm)->TaskThread);

}

__finally {

ReleaseMutex(hConfigMutex);

}

} else LogEvent(EVENTLOG_ERROR_TYPE, “Error Getting Procedure
Address”);

} else LogEvent(EVENTLOG_ERROR_TYPE, “Error Getting TermProc
Address”);

} else {

ReleaseMutex(hConfigMutex);

LogEvent(EVENTLOG_ERROR_TYPE, “Error Loading Library”);

}

InterlockedDecrement(&TaskCount);

return 0;

}

void AnalyseTaskTable()

{

DWORD CurrTime;

int i;

CurrTime = GetTimeInMins();

__try {

WaitForSingleObject(hConfigMutex, INFINITE);

for (i = 0; i < EntryCount; i++) {if ((TaskTable[i].ExecTime == CurrTime) &&(!TaskTable[i].Active)) {CreateThread(NULL, 0, TaskProc, &TaskTable[i], 0, &TaskTable[i].TaskThread);}}}__finally {ReleaseMutex(hConfigMutex);}}DWORD GetTimeInMins(){SYSTEMTIME SysTime;GetLocalTime(&SysTime);return SysTime.wHour*60+SysTime.wMinute;}void TerminateTasks(){int i;DWORD TaskIndex = 0;HANDLE Handles[TASK_COUNT];for (i = 0; i < EntryCount; i++) {if (TaskTable[i].Active) {TaskTable[i].TermProc();Handles[TaskIndex++] = (HANDLE)TaskTable[i].TaskThread;}}WaitForMultipleObjects(TaskIndex, Handles, TRUE, INFINITE);}Comm.h/* this ALWAYS GENERATED file contains the definitions for the interfaces *//* File created by MIDL compiler version 3.00.15 *//* at Tue Jun 03 11:35:46 1997*//* Compiler settings for comm.idl:Os, W1, Zp8, env=Win32, ms_ext, c_ext, oldnameserror checks: none*///@@MIDL_FILE_HEADING( )#include "rpc.h"#include "rpcndr.h"#ifndef __comm_h__#define __comm_h__#ifdef __cplusplusextern "C"{#endif/* Forward Declarations */void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t);void __RPC_USER MIDL_user_free( void __RPC_FAR * );#ifndef __CommService_INTERFACE_DEFINED__#define __CommService_INTERFACE_DEFINED__/***************************************** Generated header for interface: CommService* at Tue Jun 03 11:35:46 1997* using MIDL 3.00.15****************************************//* [implicit_handle][version][uuid] */void RefreshIniProps( void);extern handle_t CommServ_IfHandle;extern RPC_IF_HANDLE CommService_ClientIfHandle;extern RPC_IF_HANDLE CommService_ServerIfHandle;#endif /* __CommService_INTERFACE_DEFINED__ *//* Additional Prototypes for ALL interfaces *//* end of Additional Prototypes */#ifdef __cplusplus}#endif#endifDoService.h/**************************************************************//* DoService Module - implementation of initialisation other/* tasks *//* *//* Copuright (c) 1997 by Malkov O.V. *//* JSC "Svyazinform" RM *//**************************************************************/#ifndef __DOSERVICE#define __DESERVICEvoid ServerProcess();DWORD ServerInit();void ServerDoPause();void ServerDoStop();void ServerDoContinue();#endifCommonConfig.h/**************** Server Engine Header File *******************/#ifndef __COMMON_CONFIG#define __COMMON_CONFIG#define TASK_COUNT 10#include "../RegistryConfig.h"extern DWORD ConfigWatchingThread;extern HANDLE hConfigMutex;extern HANDLE hTaskMutex;extern unsigned char *pszProtocolSequence;extern unsigned char *pszSecurity;extern unsigned char *pszEndpoint;extern unsigned int cMinCalls;extern unsigned int cMaxCalls;extern unsigned int fDontWait;extern struct TASKENTRY TaskTable[TASK_COUNT];extern int EntryCount;extern DWORD TaskThreads[TASK_COUNT];extern int TaskCount;DWORD WINAPI CommonConfigWatcher(LPVOID ThreadParm);void UpdateVariables();#endifEventLog.h#ifndef __EVENT_LOG#define __EVENT_LOGvoid LogEvent(WORD EventType, LPSTR EventMsg);#endifClientHandler.h#ifndef __CLIENT_HANDLER#define __CLIENT_HANDLERextern DWORD ClientHandlingThread;DWORD WINAPI RPCClientHandling(LPVOID ThreadParm);void RefreshIniProps();#endifShedulerServ.h#ifndef __SHEDULING_SERVICE#define __SHEDULING_SERVICE#define TaskProcName "TaskProc"extern BOOL TerminateSheduling;extern DWORD ShedulingThread;DWORD WINAPI ShedulingProc(LPVOID ThreadParm);void TerminateTasks();#endifRegistryConfig.h#ifndef __REGISTRY_CONFIG#define __REGISTRY_CONFIG#define REGISTRY_TASKS_PATH "SOFTWARE\\Svyazinform\\CommService\\Tasks"struct TASKENTRY{DWORD ExecTime;char DllName[256];FARPROC TermProc;DWORD TaskThread;BOOL Active;};#endifComm.idl/* IDL File */[ uuid (4a25d2e0-6703-11d0-8927-00a02413850e),version(1.0)]interface CommService{void RefreshIniProps();}Comm.acf/* acf file for TimeInclude Service (RPC) */[ implicit_handle(handle_t CommServ_IfHandle)]interface CommService{}I?eeiaeaiea 4Enoiaeiua oaenou i?ia?aiiu onoaiiaee eiiioieeaoeeiiiiai na?aena#include

#include

void RegEventSource();

VOID _CRTAPI1 main(void)

{

LPCTSTR lpszBinaryPathName =

TEXT(“c:\\ibserver\\bin\\CommServ.exe”);

SC_HANDLE schSCManager;

SC_HANDLE schService;

/* Open a handle to the SC Manager database. */

schSCManager = OpenSCManager(

NULL, /* local machine */

NULL, /* ServicesActive database */

SC_MANAGER_ALL_ACCESS); /* full access rights */

if (schSCManager == NULL) {

printf(“\nError opening Service Manager.\n”);

return;

}

schService = CreateService(

schSCManager, /* SCManager database */

TEXT(“CommServ”), /* name of service */

TEXT(“JSC \”SvjazInform\” Communication Service”), /*
service name to display */

SERVICE_ALL_ACCESS, /* desired access */

SERVICE_WIN32_OWN_PROCESS, /* service type */

SERVICE_DEMAND_START, /* start type */

SERVICE_ERROR_NORMAL, /* error control type */

lpszBinaryPathName, /* service’s binary */

NULL, /* no load ordering group */

NULL, /* no tag identifier */

NULL, /* no dependencies */

NULL, /* LocalSystem account */

NULL); /* no password */

if (schService == NULL) {

printf(“\nFailed to create service!\n”);

}

else

printf(“CreateService SUCCESS\n”);

CloseServiceHandle(schService);

CloseServiceHandle(schSCManager);

RegEventSource();

}

void RegEventSource()

{

HKEY hk;

DWORD dwData;

UCHAR szBuf[80];

if (RegCreateKey(HKEY_LOCAL_MACHINE,
“SYSTEM\\CurrentControlSet\\Services\

\\EventLog\\Application\\CommServ”, &hk)) {

printf(“could not create registry key”);

return;

}

/* Set the Event ID message-file name. */

strcpy(szBuf, “c:\\ibserver\\bin\\CommServ.exe”);

/* Add the Event ID message-file name to the subkey. */

if (RegSetValueEx(hk, /* subkey handle */

“EventMessageFile”, /* value name */

0, /* must be zero */

REG_EXPAND_SZ, /* value type */

(LPBYTE) szBuf, /* address of value data */

strlen(szBuf) + 1)) /* length of value data*/

{

printf(“could not set event message file”);

return;

}

/* Set the supported types flags. */

dwData = EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE |

EVENTLOG_INFORMATION_TYPE;

if (RegSetValueEx(hk, /* subkey handle */

“TypesSupported”, /* value name */

0, /* must be zero */

REG_DWORD, /* value type */

(LPBYTE) &dwData, /* address of value data*/

sizeof(DWORD))) /* length of value data */

{

printf(“could not set supported types”);

return;

}

RegCloseKey(hk);

}

I?eeiaeaiea 5

Enoiaeiua oaenou i?ia?aiiu oaeaeaiey eiiioieeaoeeiiiiai na?aena

#include

#include

void CleanRegistry();

VOID _CRTAPI1 main(void)

{

SC_HANDLE schSCManager;

SC_HANDLE schService;

/* Open a handle to the SC Manager database. */

schSCManager = OpenSCManager(

NULL, /* local machine */

NULL, /* ServicesActive database */

SC_MANAGER_ALL_ACCESS); /* full access rights */

if (schSCManager == NULL) {

printf(“\nError opening Service Manager.\n”);

return;

}

schService = OpenService(

schSCManager, /* SCManager database */

TEXT(“CommServ”), /* name of service */

DELETE); /* only need DELETE access */

if (! DeleteService(schService) )

printf(“\nFailed to Delete service!\n”);

else

printf(“DeleteService SUCCESS\n”);

CloseServiceHandle(schService);

CloseServiceHandle(schSCManager);

}

void CleanRegistry()

{

if (RegDeleteKey(HKEY_LOCAL_MACHINE,
“SYSTEM\\CurrentControlSet\\Services\

\\EventLog\\Application\\CommServ”))

{

printf(“\nError Cleaning Registry”);

} else {

printf(“\nCleaning Registry SUCCESS”);

}

return;

}

I?eeiaeaiea 6

No?oeoo?u aac aeaiiuo

PAGE

— PAGE 5 —

PAGE

Нашли опечатку? Выделите и нажмите CTRL+Enter

Похожие документы
Обсуждение

Оставить комментарий

avatar
  Подписаться  
Уведомление о
Заказать реферат
UkrReferat.com. Всі права захищені. 2000-2019