5.4pt;">30000 : 60500

2.   , .

3.   , .

4.   345000 . (13 ), 1 800- :

(345000 * 12) / 800 = 5175 (./)

6 . , :

5175 * 26 = 134550 (.)

5.   . 5,4% (.4). 7265 .

6.   () .

7.   .

8.   , .

9.   , .

10. . 15% ( .4) 20183 .

11. - .

12. .

13. . 1% (.4) 1345 .

14. . 2% (.4) 2691 .

15. . 3,6% (.4) 4844 .

16. (). IBM PC Pentium 133 . 3200 . 1 300- 5-

3200 * (300 + 5) = 976000 .

.4.4. .

, .
, 60500
134550
(5,4% ) 7265
(2% ) 2691
(3,6 % ) 4844
(1% ) 835
(15% ) 20183
(1% ) 1345
() 976000
: 1207213

.

. , , , . , , .

- .


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

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

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

4.   Borland InterBase Workgroup Server. Programmers Guide. - Borland International Inc, 1995 - 340 c.

5.   Microsoft Online Documentation: Win32 Programmers Reference.

6.   R.Barker "CASE* Method - Entity Relationship Modelling". - Oracle Inc., 1990 - 243 c.

7.   .., .. Visual C++ 4. . - .: Channel Trading Ltd. , 1996. - 352 . .

8.   . - : 1: - Jet Info 1/1996.

9.   . - : 2: - Jet Info 2/1996.

10. . - : 3: - Jet Info 3/1996.

11. . SQL. . . - .: Ȕ, 1996. - 375 ., .

12. . Windows NT - 軻. - .: Channel Trading Ltd. , 1996. - 392 . .

13. . Windows NT NTFS. . . - : Channel Trading Ltd. , 1996. - 440 . .

14. . - : - Jet Info 3-5/1995.

15. .., .., .."- ", , 1983, 100 .

16. Microsoft - . 4. - : , 1996. 124 ., .

17. Microsoft - . 5. - : , 1997. 132 ., .

18. .. Windows ( Win32 API Windows 95 Windows NT). . . - : Channel Trading Ltd. , 1995. - 720 . .

19. ., .. Visual C++. : . . - .: BHV - -, 1996. - 912 ., .

20. Windows NT: . . - .: BHV - -, 1996 - 496 ., .

21. .., .. Microsoft Visual C++ MFC. - : -, 1996 - 288 ., .

22. .., .. Windows NT: 2. - : -, 1997 - 271 ., .

23. . Mastering Microsoft Visual C++. . .- .: +, .: , 1997. - 704 ., .


1

SQL-

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

/* BegDate */

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

BEGIN

IF (new.BegDate < old.BegDate) THEN

BEGIN

/* BegDate */

UPDATE Phones

SET EndDate = new.BegDate

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

END

ELSE

BEGIN

/* BegDate */

UPDATE Phones

SET EndDate = new.BegDate

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

END

END

/* EndDate */

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

BEGIN

IF (new.EndDate > old.EndDate) THEN

BEGIN

/* EndDate */

UPDATE Phones

SET BegDate = new.EndDate

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

END

ELSE

BEGIN

/* EndDate */

UPDATE Phones

SET BegDate = new.EndDate

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

END

END

/* ࠠ */

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 Phones

SET BegDate = new.EndDate

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

UPDATE Phones

SET EndDate = new.BegDate

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

END ^

CREATE TRIGGER Phones_BDH FOR Phones

BEFORE DELETE POSITION 0

AS

BEGIN

UPDATE Phones

SET EndDate = old.EndDate

WHERE ((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 PhonesBanks

ADD CONSTRAINT XPKPhonesBanks PRIMARY KEY (Code);

CREATE TABLE PhonesKeys (

Code INTEGER NOT NULL

);

ALTER TABLE PhonesKeys

ADD 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 PhonesOwners

ADD CONSTRAINT XPKPhonesOwners PRIMARY KEY (Code);

CREATE TRIGGER PhonesOwners_BUH FOR PhonesOwners

BEFORE UPDATE POSITION 0

AS

BEGIN

/* BegDate */

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

BEGIN

IF (new.BegDate < old.BegDate) THEN

BEGIN

/* BegDate */

UPDATE PhonesOwners

SET EndDate = new.BegDate

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

END

ELSE

BEGIN

/* BegDate */

UPDATE PhonesOwners

SET EndDate = new.BegDate

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

END

END

/* EndDate */

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

BEGIN

IF (new.EndDate > old.EndDate) THEN

BEGIN

/* EndDate */

UPDATE PhonesOwners

SET BegDate = new.EndDate

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

END

ELSE

BEGIN

/* EndDate */

UPDATE PhonesOwners

SET BegDate = new.EndDate

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

END

END

/* ࠠ */

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 PhonesOwners

SET BegDate = new.EndDate

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

UPDATE PhonesOwners

SET EndDate = new.BegDate

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

END ^

CREATE TRIGGER PhonesOwners_BDH FOR PhonesOwners

BEFORE DELETE POSITION 0

AS

BEGIN

UPDATE PhonesOwners

SET EndDate = old.EndDate

WHERE ((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 PhonesOwnersKeys

ADD 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 PhonesPostStations

ADD 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 PhonesRegions

ADD 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 PhonesStations

ADD 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 PhonesStreets

ADD 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

(, , , ..), . 90000 .
. .
?
- ( ). , , Scopus. . .

: