a a "ocaa paa popaoo oc a CD-ca"

Poa Cca pa aa a. oocoo opoa oc cc cocoo copa pca opa, oop pa a a. popoa pa pop, ppo coo po.

,
21.06.2011

Oa

1.Oca po oac

2.popoa poo a a

2.1 p apo

3.ooca o a a

3.1 Oca c

4.aaoco popoa

5.apoc

6.Papaoa pca oopa pao op

7.popoa pa pop

8.popoa ppo

9.popoa coo po

9.1 oao aa

9.2 Oca o o op

9.3 Papaoa oo oca a a

9.4 Pooco ooa

10.ooco oocoa pao p popaoo poa

11.poa co oc

po 1

po 2

Poa C (Cca pa aa a) -- C, paa po aa a. o po (a. relation -- oo) cao c papaoa coo acoo caca oac cc a a apa oa.

o apapc pocoo cpp a, o ooa a pca oooc cooa opaoo aapaa ap oo pooo cc opao a. Poa o oppoaa a opaa a p a. aa poa aa pca coo p acc oaa c coca:

a a -- o a

c co a oopo, o c c co oao (coo, co . .)

a co ao

oao cpo a occ

opo coa cpo coo o poo

C oo cpppoa, ccapoa opaoa a opoo pa opao. Co ooo pca c oc oo copoo pp opaa cooa poccoa C. coo, o coca a opaoo oc o c cpa - aa c pooca aaa aca oa.

ao pcoo po a papaoaa aa a MS Microsoft SQL Server 2005 aoaa pocca opo ocao poa oo . popaa, paoaa c , oo oaa opa o oapa, o ocaa, paaopa a. a a oooc coppoa o o pa aop.

1.Oca po oac

aco p o opoa copoo pp ooo p opao cc. a poa aaa a p pp, a pp cpo a aoo ca. opao cc p cc o o caap pa popa. acoc o po oac opao cc o co paac o co app .

p papao a a ocaa paa popaoo oc a CD-ca o poo ocoa po oac. pa ocaa paa popaoo oc a CD-ca coc c o a:

opa o oap;

opa o oca;

opa o paaop;

opa o a.

o a c o op, apoc. a pcoo po cooao opa a o a, app, ooa cooac o o, c o opa .

2.popoa poo a a

ao po ocaa paa popaoo oc a CD-ca ao a c Ca. c a paa a oa, o oo aa ooc a, a o oco. o o a oa c a:

ocaa - cop opa o oca ocao oap;

Paa - cop opa o poa oapa.

2.1 p apo

aa cop:

id_a - a aop a

a - a a

o - o a

Apc - apc a

aa ocaa cop:

id - a op oca

aoa - aoa ocaoo oapa

oco - oco ocaoo oapa (.)

oca - a op ocaa

Oa a - a oca oapo

aa Paa a c:

id - a op paa

aoa - aoa paoo oapa

oco - oco paoo oapa (.)

Oa a - a pa oapo

aa poa - aa paa

id_a - a op a-oa

a Ca c co:

id - opo op ac

aoa - aoa oapa

oc- oc opa

poo - papao

a - a oapa

id_ocaa - op ocaa, ocao oap a ca

id_paaopa - op paaopa, oop poa oap

3.ooca o a a

oocoo opoa - oc ao cc oa cocoo copa pca o opa, oop poaac pa coaao a a. oo ooc o a ac cpo o aao c cc o, oop o cooa co -a cooc opo opao co ooaoc oo ccoo a. Oco ocp a ooc o c coc, c coca (ap).

Coc - o pa, opa o oopo ooo pa a a. Coc o , ca, cao, pc, c, .. ooo paa a o, a coc p coc. o coc oocc aop oopo oc, po, co , ca a o. p coc oocc opo aop.

Ap - ooaa apapca coc. o aoa oo a opoo a coc. app, ap coc op oo, aa opa oa copaa o coc. Acoo pa a coc apa occ. Ap c ao oo c c o coc. po oc ap o ca a caocoa coc.

- a aop apo, o a oop oo ooao a p p coc. aoc oaa, o c aopa oo apa oo poa coc o ocac apa.

C - accopoa o coc. c aa a a o oo pa o, ca coo a, o cppa oa o poco. Oao oo oco poa opaa a a - o oc oooc oca o coc o a p, o ooo cao op c. A a a pa aa a po copac co a c coc, o opc o caoo o oa c. a aoo oca c op cooc ooc o.

3.1 Oca c

a a op c oo aa:

aa ocaa

aa Ca

id

id_ocaa

oo:

O o o

aa Ca

aa Paa

id_paaopa

id

oo:

O o o

aa

aa Paa

id_a

id_a

oo:

O o o

ooca o a pcaa po 1, pc. 2.

4.aaoco popoa

o pa poc coca a . aoo o a aac pap o (oco coo), . p ooo c ap op a. oca o oooc apa op a opc cao po oac. aaoca o pcaa po 1, pc. 1.

4.1 Coca a

aa 4.1.1 ocaa

aoa apo

o

Pap o

ococ op a

id

Int

4

Not Null

aoa

Char

20

oco

Int

4

oca

Int

4

Oa a

Smallmoney

8

aa 4.1.2 Paa

aoa apo

o

Pap o

ococ op a

id

Int

4

Not Null

aoa

Char

20

oco

Char

10

Oa a

Smallmoney

8

aa poa

Smalldatetime

8

Id_a

Int

4

Not Null

aa 4.1.3

aoa apo

o

Pap o

ococ op a

Id_a

Int

4

Not Null

a

Cha

30

o

Char

20

Apc

Char

50

aa 4.1.4 Ca

aoa apo

o

Pap o

ococ op a

Id

Int

4

Not Null

aoa

Char

20

oc

Char

10

poo

Char

10

a

Smallmoney

8

id_ocaa

Int

4

Not Null

Id_paaopa

Int

4

Not Null

5.apoc

O ao pca cocoo op a a a a c cooa apoco SQL.

papaoao a a pcop apoc, oa c aa poa, a o , a o oc. p pp oop apoco c oo o.

apoc a SQL

1. poco apoc c coppoo

Select aoa, [ oc], poo, a from ca order by a

2. opa o a

select * from Paa where Paa.[aa poa]<'10.06.2011'

3. opa a opoo aaoa

SELECT * FROM Paa WHERE [Oa a] BETWEEN '10000' AND '30000'

4. opa a o ao

select aoa, apa, o, a FROM ca where aoa like '%'

5. opa coo a

SELECT id, [ oc], poo, o, id_ocaa, id_paaopa, a+ a*0.18 AS [a c C] From Ca

6.Papaoa pca oopa pao op

pca - o aca aa, caa oopa pao op opa. pca c o cpo pao c aa a a. Papaoa pca SQL Server 2005 occc a aa. a po a oo coac p oo SQL Server Enterprise Manager, a a ac occc p oo SQL Server Query Analyzer.

a a papaoao pca pca, oopo oopaac a a, o, oco aoa oo oapa, id_ocaa oa a oapa.

7.popoa pa pop

p papao po, ocoa a aop - cpp, o o a-o opa c a coc a, p oo oop oo coaa opopa, paoa a cpp pa pocca opao opa. a oc aa pa pop.

pcoo po a papaoaa paa popa, paaa o Oa a a ocaa c o cooc oapa a 35%. o pop:

CREATE PROCEDURE new as

UPDATE ocaa

set [Oa a]=[Oa a]*0.35

aca pop coc oaa:

exec new

SELECT*FROM ocaa

Pc. 7.1 o pao pop

8.popoa ppo

pp (trigger) c ocoo paooc pa pop, o aoac p oa a a. pp ao pao p - o pop a o oc co o pa. Ocoo o coco ppo c o, o o oc opaa ac o oc oa; a opao, oo cpa ac p cooc p.

ao pcoo po a ocaa papaoa pp - trigger_4. c oo ppa apao a o o ooa o o opa a o Oa a. o ppa:

set QUOTED_IDENTIFIER ON

GO

ALTER TRIGGER [dbo].[trigger_4]

ON [dbo].[ocaa]

AFTER INSERT,UPDATE

AS

BEGIN

IF EXISTS (SELECT * FROM dbo.ocaa WHERE [Oa a]<0)

ROLLBACK TRAN

PRINT 'a o 0'

SET NOCOUNT ON;

END

Pc.8.1 - Pa pao ppa

9.popoa coo po

9.1 oao aa

ooa o paoa c , co co po. po papaoao Microsoft Visual C# 2008.

co po coc c , oc o oa o a , ococ o ooa paoa c o a. c ooo copa o o a p (aa a o). poco co c occ ocpco .

ooa c acpaop, oop opa oooc, a o:

oa ac;

a ac;

pocop ac;

Copa ac;

Coppo ac;

Papoa ac.

a acpaop o o op op a a . p a a apoc a op p opa popa c ooa o ca oo pocc pao, oop o o a coo ap ococ a, poco oa c.

9.2 Oca o o op

ac o a ca opa o oa .. ac aa. ao a pcc p , oca c, o a o a aaac opa a poa a oop apo. a a a oa acpaop c oo aap pa op. ac o a ca pa op, oop oopa ac oo .

Pc.9.2.1 Oo aopa ooa.

Pc.9.2.2. Coo o o poo apo p aopa ooa

Pc.9.2.3 ao oo po.

9.3 Papaoa oo oca a a

co po

ooa aoo coo po c oo acpaop a a. oo o cooa c oooc papaoao popa pc o aopa (pco 9.2.1) p ac popa c apo - 1. c pa apo, oc coo o o (pco 9.2.2).

9.4 Pooco ooa

aca popaoo poa o copoa a c c O a c c, oc o op a c c O.exe

p oo po c oo a ooa, ooa - acpaop, a poo aa oca .

p ac popa ooa oooc ocooac a po. ap pao c po o p Windows-po - aa a pac pc pao p .

10.ooco oocoa pao p popaoo poa

o popa po, o c aa a, papaaac, a a pc a pp oo, o cop o co, o aa ocaoo oo p opa, o c oooa oo oa, coca a paoo p, oc ooo opa pa p opaa.

ooc o cooa popaoo poa a po p (T) oo pacca o op:

, (10.1)

- cooca oa pao p papao

po p , p.,

- apa a papao, o c pop cp popoa, cpaoo pap, paco apao (aa, ao a a ca), oopoa (c o ooo).

Cooca oa pao p papaoaoo po a po p oo pacca o op:

, (10.2)

- po p;

- cooca oa pao t - pacoo poa, p.;

- copa , oopa oc c p c apa pao oo o p:

. (10.3)

op (10.3) p - o copoa, , - opa o aa o. Cooca oa pao t - pacoo poa =200 p.

apa a papao =300p.

a opao pa c =529,24 p., 229,24 p.

oc a po opao opa a aoapoa poco c apa a opao, oa o oo cpc o p poa oo pacca o op:

. (10.4)

c - apa a p opao opa, p, , - o opa, opaaao p, a, - cooc ooo aca pao, p/ac, - o, a oo apa p a oc opa p po opao opa, - opa pao, a/ac. a - apa a aoapoa opao opa, p, - p aoaco opao (ac), - cooc ooo aca aoo p, p/ac; - p pao opaopa, ac; - cooc ooo aca pao opaopa, p./ac.

pa c o c pa:

apa a aoapoa opao opa, a = 200 p.

apa a p opao opa, p = 735 p.

oo cpc o p poa, = 535 p.

ooc o p papao oa cooa oo op o op:

, (10.5)

pp

- a pacoo a papao popaoo poa.

o oo c o a oocoo a o p papao oa, =565.

oa oc papao o opa o op:

. (10.6)

papaoaoo poa p = 0,72, cooa a pp papaoaoo popaoo poa cac ooc coopa, c a . o: aa a ocaa paa oo c ooc o popa poo p op cp oc.

11.poa co oc

Windows-po ocaa paa oo acac a o copo , a a poaa pcpca, oo aa a apapc poco cca.

a

Poa o a aco p popa ao opoc pac c cop C oppoa o a ao pca a.

Po o oo pca a oco o paccop a, copa a ( a), coco pao, a c ( c). poo o , o o p o, ooa ca aa, a a o oo, a a . o o p pocc p aa o po cca c aoac. a poa C o aaoa, oopo pac oca c oo, oop coco .

ao po a coaa poa aa a ocaa paa popaoo oc a CD-ca, papaoaa c oo C MS Microsoft SQL Server 2005.

Cco cooao pap

1. Nilsen P. SQL Server 2005. ooa/aa 2008. - 1228 c.

2. pooa .., paoa .., opo C.O. a a. oc aa aopaop paoa co caoc 351400. Capoo, Ca, 2002.

3. pooa . ., paoa .. oc aa o pcooo poa o c a a co caoc 351400. Capoo, Ca, 2004.

4. ru.wikipedia.org/wiki/Poa_C

5. http://citforum.ru/database/dbguide/2-1.shtml - ooca o a

6. apa C.A., oo A.., ooa .. Visual FoxPro 6.0 // .: o, 1999 - 784 c.

7. ac ., ac . a a. Papaoa pa / .: o, 1999 - 704 c.

8. aoa .. Visual Fox Pro 5.0//.: ao , 1997 - 320 c.

9. ao C.., ooo .. a a. pc // apo: oo; Poco /: c; : Apc, 2000. - 504 c.

po 1

Pc.1 - aaoca o a

Pc.2 - ooca o a

po 2

apoc po ocaa paa popaoo oc a CD-ca

Pc.1 - poco apoc c coppoo

Pc.2 - opa o a

Pc.3 - opa a opoo aaoa

Pc.4 - opa a o ao

Pc.5 - opa coo a

stud.wiki




  • o aop .NET Framework. o oca aa ax. apao po "ocaa paa popaoo oc", copa a ax pacpa c ac papao a ax a C+.

    [1,8 M], 12.12.2011

  • oeoae eoo a a "eao ae". oeoae a oey, eo eoo oe. aaoa eoo oya ae a. ooeoe oooae eyao ee oaoo oya.

    [1,3 M], 25.06.2011

  • Oco papao Windows-po. popa a Visual C++ c cooa o MFC, ooy c aao popaoo oc c oooc oca popa o apap coxpa pya co a.

    [735,1 K], 21.06.2011

  • a, a a. , , , , . . MITM-. Cookie Cadger.

    [1,8 M], 28.05.2015

  • aa a a Microsoft SQL Server 2005 aaa a aa : , , a, , .

    [940,3 K], 21.06.2011

  • oao ooa -aaa, oa co oco a a cc a cao, oa o. oao aa oa , aa c o ao.

    [5,6 M], 01.07.2011

  • paoe oco oecee a oeao opa. p co opaoa eec aao e opa. apaoa cce oeco a opa cpeecacecoo oepecoo aa.

    [1,8 M], 05.11.2016

  • : a , ER-aaa. aaa a a a a a a a , aa .

    [3,3 M], 01.07.2011

  • o opaa, oopa paoae c o oeo opa o copax aeax. Ocae xox xox oeo. exa pae a ae p oo pepo apaoa exoo oca.

    [4,0 M], 23.06.2011

  • . aopo eepa . P, oaee popaoo a. pocee aop eepa. Papaoa popa.

    [934,7 K], 25.06.2011