ITYourself! - компьютерная документация, книги, мануалы, it-тематика

???????? ? ???? "???? ??????"

E-mail Печать PDF
Рейтинг пользователей: / 9
ХудшийЛучший 
Индекс материала
???????? ? ???? "???? ??????"
????????????? ?? ?? ?? ?????????????
??????????? ?? (MS Access)
?????
????? ????? ?????????
???????????? ?????? ?????????? ?????? ? ??????? ?????????? ?????
???????? ? ?? (VBA)
???????? ??? ????????
SQL
???????? Select
DISTINCT
FROM
???????????
??????????? ??????
?????????
???????????? ???????
?????????? ??????
???????? ??????
??????????? ???????
???????? ??????
?????????? ????? ?????
T????????? ?????????? ???????????? ???????????, ????????????? ???? ??????
?????? ? ?????? ? VB 6.0
?????? ? ????????
?????? ? VB6
?????? ? ?????? ? C++ Builder
?????? ? C++ Builder
???????? ?????????????? ??????????
?????? ? ?????? ? C# (Visual Studio 2005)
???????? ???????
OLAP ??????????. XML ????
SQL Server
???????
???????????????? ????????
XML
Все страницы

???????? ? ???? "???? ??????"

? ???????????? ??? ?????? ?????????? 2 ????????? ???????: ???? ?????? ? ???? ??????.

?????? ?????? ?????????? ??????? ??????????? ??????? ?????????????? ??????, ???????????, ??????????? ? ???????? ???????, ??????????????? ??? ????????????????? ?????????? ? ????????????? ????????????? ??????. ????? ???????, ??? ???????????? ??????????????? ????????, ??????? ????? ???????? ??? ??????? ? ????? ?????? ? ????? ??????????? ?????? ??? ?????? ? ???.

???? ??????(??) - ??????? ??????????? ??????? ?????????????? ??????, ??????? ???????????? ??????????????, ???????? ? ??????? ?????? ? ?????????? ??? ??????, ??? ? ?????????? ????????????? ????????????.

??? ???????, ??? ?????? ? ?? ???????????? ????? ???? ?????? ? ??????, ? ?? ? ???????.


????? ???? ?????? ??????? ?? 2 ?????: ???? ?????? ? ???????? ??????? ? ??.

????????????? ?? ?? ??????? ???????? ??????

1.

???????

???????

?????????

?????????

???????????

????????????? ?? - ?? ????????? ???????????? ? ???? ??????.
??????.

2. ??????? ?? - ??? ????????????? ??, ? ??????? ???????? ??????? ?? ?????? ???? ? ??????? ?? ????? ??????. ? ????????????? ???? ??????? ??? ??????? ?? ?????? ???????? ? ???????.

3. ??????????? ??. ?? ?????? ?????????? ???????. ???????? ?????????? - ??????????? ?? ??????? ?? ?????? "???????" ??????.

4. ????????? ??. ?????? ???????????? ????? ????? ????????.

5. ??????????????? ??. ? ????? ?? ?????? ???????? ? ???? ?.?. "???????????" ??????. ??????? ?????? ? ???? ??????? ???????? - ??????????? ????? - ????????????? ??-?? ???????? ?????? ?????????????? ?????? ?? ?????. ?????????? ??? ?? ????????????, ?????? ???????? ???????? ?????????? ?????? ??????. ?????????? ????? ??????? ?????? ??? ????? ??????? ???????????? ? ???? ?????? ????????: (????????; ??????1 (?-?, ???????); ??????2; :) - ??????????? ????????. ?????? ???????? ??????????? ????????????? ??????. ???????? ?????? ? ?????????? ?? ??????????? ??????????? ????????? Cache.


????????????? ?? ?? ?? ?????????????

1. ????????? ?? - ??, ??????? ???????? ?? ????? ?????????? ? ? ????? ?????? ??????? ? ???? ?? ???????? ?????? 1 ???????.

2. ??????? ?? - ??, ??????? ????? ?????? ? ?????????? ?????. ??? ?????????? ????? (??????????) ?????????? ? ????? ? ??? ?? ??. ??? ????? ???? ???????????? ????????? ???????:

a. ????-????????? ???????. ???? ?? ????????? ?? ????-???????, ?? ??? ?????? ??? ?????? ??????????? ?? ????????? ?????????, ?????????????? ? ?????????? ??????? ?? ????-??????. ??? ????? ??????????? ????????? ?????? ? ???????????????? ?????????????? ??????? ??? ?? ???????, ??? ? ?? ?????????? ???????????, ?.?. ?? ?????????? ???????????? ??????? ?????? ??????????.

b. ??????-????????? ???????. ? ???????? ???????? ?????????? ?? ??? ??????, ? ?????? ??, ??????? ???? ?????????. ??? ???? ???????? ??????????????? ????????????? ?????? ???????? ?????????, ?? ??????? ???????? ????????? ??????????. ?????????? ? ?????????? ?????????? ????? ???? ?????? ?? ????????. ???????? ??????????? ???????? ??????????? ???????????? ???????????: "??????-??????", "?????? ??".

 


c. ?????????????? ?? - ?? ??????? ?? ?????????? ??????, ????????????? ?? ?????? ???????? (????????, ?? ???????; ? ?????? ?????? ????????????? ?????? ? ??????????? ?? ?????????/???????? ???????).


??????????? ?? (MS Access)

??????? ??????????? ?? ???????? ?????????, ??????? ?????????? ????????, ?????? ??? ?????????/??????? ???????????? ? "???????" ???? (??? ?? ???????? ??????????).

??????? (?????????) ??????? ?? ??????? (????? ???????). ?????? ?????? ??????? ?? ?????, ? ?????? ?????? ????? ???? ? ?? ?? ?????????. ???? ? ?????? - ??? ??????? ? ?????? ? ???????.

???????? ???????.

1. ?????????? ??? ??????? - ?????.

2. ?????????? ????????? ??????? - ?????, ??????? ? ???? ?????.

???? ????? ? ??????????? ??

??? ???? ???????????? ?? ??? ????????, ??????? ????? ??????????? ??? ???? ??????? ????? ???? ? ?? ??? ??????, ??????? ????? ????????? ? ???? ????.

1. ????????? ????. ? ??? ???????? ????? ????????? ??????????. ????? ????? ???? - 255 ????????. ???????? ???????????????? ????????:
??????????? ?????: "+", "&";
????????? ?????: like - ????????? ?????, "*" - ????? ?????????? ????? ???????? (????? ???? ???????), "?" - ???? ????? ?????? (?????? ???? ???????????). ????????, [A-K]* - ??? ????, ???????????? ? ???? ?? ? ?? ?; [A,K]* - ??? ????, ???????????? ???? ? ?, ???? ? ?. ?????: >, <, >=, <=, <> ???????????? ??? ????????? ???????? ? ??????. ? Access ???????????? ?????? ????????????? ?????? ? ??????????? ?? ???????????? ? ????????. ????????, ???? > ????. ??? ??????? ?????? ?? ???????? ????????? ??? ? VBA, ??? ? ??????????????? ? Access.

2. ???????? ????. ????????, ?????????? ? ????????? ??????: +, -, *, /, >, <, =. ???????? like ? ????????? ?????? ??????????.

a. ????? - ??????? ?? ???????; ????? 1 ????. ??????? ????? - 4 ?????.

b. ????????????

i. ??????? ???????????? - 4 ????? - 7 ?????? ??????.

ii. ??????? ???????? - 8 ????.

3. ?????????? ????. ? Access ????????? ????????: -1, 1. ?????????? ????????: ?, ???, ??.

4. ????/?????. ?????? - 4 ?????. ?????????? ???????? ??? ??????: ?????????/???????? ? ??????, ?????????.
1-? ????? - ???, ??????? ?? 01.01.1900.
2-? ????? - ?????????? ??????, ????????? ? ???? ??????.
??? ?????? ? ??????? ????? ???? ???????????? ??????????? ??????? ??? ????????? ????/???????. ?????????? 3 ???? ??? (? - ????, ? - ?????, ? - ???):

a. ??.??.???? - ??????? ????.

b. ??-??-???? - ??????????? ????.

c. #??/??/????# - ???????????? ????, ??????? ???????????? ??? ?????? ? Access.

5. ???? ???? Memo. ???????????? ????? - 1,2 ??. ? ??? ????? ????????? ????? ?????. ??? ???????, ?????? ????? ???? ???????? ? ????????? ?????. ?????????? ????????: ?????? ? ??????.

6. ???? ???? OLE. ????? - ?? 1,2 ??. ? ??? ???????? ????? ?????????? ?????? ??????? ?? ?????????, ? ??????? ??????? ????? ??????????? ?????????? ???????? ??????????. ?????????? ????????: ?????? ? ??????.

7. ???? ??????? ??????????. ???????????? ????? ??????? ?????? ??? ???????? ?????????? ????????. ????? - 1,2 ??.

8. ????-??????? - ??????? ????? ????, ??????? ???????? ???? ???????? ??? ?????????? ????? ??????. ??? ????????????? ?????????? ???????? ????????????? ??? ?????? ??????. ??????? ????????, ?????????? ???????? ????? ???? ???????????.


?????

?????? ? ??????? ?????????? ???? ??? ????????? ?????, ?????????? ???????????? ??????. ???????? ???? ? MS Access - ???? ???????.

?????????? 5 ????? ??????:

1. ????????? ?????. ??? ???????????? ????? ????? ?????????, ?????????? ???????????????? ?????? ? ???????. ?????? ??????? ?????? ????? ???? ?? ???? ????????? ????, ???? ????? ?????? ????? ???? ?????????. ???? ?? ?????? ?????? ???? ?????????, ????????? ????? ???????????????.

2. ????????? ????? - ???? ?? ????????? ??????, ????????? ?????????????.

3. ?????????????? ????? - ????????? ?????, ??????? ?? ???????? ??????????.

4. ????? ?????. ????? ?????? ?????????? ????? ???????, ???????????? ??? ??????????? 2 ??????. ??? ???????, ????? ????? ???????? ????????.

5. ??????? ?????. ??????? ?????? ?????????? ???????????? ?????????, ??????????? ?? ????????? ??? ?????????????? ???? ?????? ????????.

6. ????????? ???? - ????, ??????? ??????? ?? ?????????? ?????.

??????? ????? ??????? ? ???????? ???????. ?????????? ????? ???????????? ??? ???? ????, ??? ? ?????????. ??? ??????????? ?????????? ???????????? ???????????? ????? ????????? ???? ? ???????????? ???????? (?????? ????????). ??? ????????????? ??? ?????????????? ???????. ?? ???????? ??????????: ??????????? ???????? ?????????? ?????? ??? ??? ????????? ???????. ??? ?????? ????????, ??? ?????? ????? ?????????????? ????????? ???????, ??????? ?????????? ????????????? ?????? ?? ????, ?? ??????? ????????? ?????. ???????? ???????????? ???????? - ?????????? ????? ? ?????????? ??????? ?? ???????. ????? ???? ????? ?????????? ???????????? ???????, ??? ????????? ???????????? ???????? ??????? ?? ???? (????????, ????????? ?????????? ????????? ?????? ?? ????? ????? ? ????? ? ??????? ?? ???????????? ???????????, ????? ???????? ??????????? ????? ???????????? ??????). ? Access ?????? ???????? ?????? ?? ????????? ????.


????? ????? ?????????

????? ????? ????????? ?????? 3 ?????:

1. ????? "???? ? ??????", ????? ?????? ?????? ? ?????? ??????? ????????????? 1 ?????? ?? ?????? ???????.

2. ????? "???? ?? ??????", ????? ????? ?????? ? ????? ??????? ????????????? ????????? ??????? ?? ?????? ???????.

3.

1

1

?

?

?

?

????? "?????? ?? ??????", ????? ????? ?????? ?? ?????? ??????? ????????????? ????????? ??????? ?? ?????? ???????, ? ????? ?????? ?? ?????? ??????? ????????????? ????????? ??????? ?? ?????? ???????. ????? ????? ? ??????????? ?? ???????????. ??? ????????????? ? ??? ????? ????-??-?????? ????? ????????? ??????????????? ???????.

????????? ??????????? ??????

????????? ??????????? ?????? ????????????? ??? ?????????? ?????? ??? ????? ?????? ? ?? ??????????????, ? ????? ??? ???????? ???????? ???????. ??? ?????????? ?????? ?????????? ??????? ?????? ?? ?????? ???????, ???? ?????????? ????????? ? ??? ?????? ?? ?????? ???????. ????????, ??????? 2 ???????: ???????????? ??????? ? ?? ??????. ??? ?????????? ????????? ??????????? ?????? ??? ???????? (??? ????????? ????????? ????) ?????? ?? ??????? ? ??????? ?????? ????? ????? ??????? (????????) ??????, ??????????????? ????? ??????, ? ??????? ??????.

??????????? ?????:

1. ??? ????????? ???????? ????????? ???? ? 1-? ??????? ????????????? ?????????? ???????? ? ????????? ???????.

2. ?????????? ?????? ?? ?????? ??????? ? ???? ???????? ????? ????????, ???????? ??? ? ?????? ???????.

?????????? ?????:

1. ????????? ??????????.

2. ????????? ????????.

???????????? ??

??? ???????? ??, ? ?????? ??????? ?????????? ??????????? ?? ?????????. ????????? ????? ?????? ???? ?? ????????????.

???????????? ?? ????????????? ??? ?????????? ?????? ???????? ?????? ? ???????? ??????????? ?????? ??? ????? ?????? ? ?????? ????? ??? ????.

??????.

??????? ????????? ???????, ? ??????? ??????????? ?????? ?? ???????? ?????????:

? ?????????

????

?????????

?????

?????

????

??????????

?????????

??? ????? ????????? ??????????:

1. ???? ????????? ????? ????? ?????? ???? ?????????? ???????????? ??????.

2. ? ?????? ? ???? ?? ?????? ????? ???? ?????? ????.

3. ?????? ? ?????? ? ???? ?? ?????????? ????? ???? ??????

4. ????????? ????? ?????? ???????.

??? ???? ????? ????????? ??? ??????????, ??????? ?????????? ???????? ? 3-? ?????????? ????? (????? ?????????? 5 ?????????? ????).

1. ?????? ?????????? ?????. ??????? ????????????? 1-? ?????????? ?????, ???? ?????? ??????? ???????? ????????? (??????? ?????? ????????? ?? ????? ???????) ????????, ? ? ??????? ?? ??????????? ????????????? ??????. ? ??????????????? ??????? ????????????? ??????? ???????? ?????????, ?????????????, ????? ????? ???????????. ?????? ????????? ??????? ?????????? ??????. ??????? ?????????????? ??????? "?????????".

2. ????? ???????? ??????? ?? ?????? ?????????? ????? ??????????, ????? ??????? ???? ? ?????? ?????????? ?????, ? ?????? ??????? ?????? ???????? ?? ????????? ????. ? ??????? ?????????? ??? ???? ???????, ? ??????? ??????????? ??? ?????? (???????? ????), ???????????? ?????? ? ??? ????.

3. ?? ????????? ? 3 ?????????? ?????, ???? ??? ????????? ?? ?????? ?????????? ?????, ? ?????? ??????? ??????? ?? ?????????? ????? ? ?? ??????? ?? ????? ?????. ? ??????? ?? ?????? ?????????????? ????, ??????? ????? ?????????, ??? ?? ?????? ??? ?? ????. ????? ???????, ? ????????? ??????? ????? ?????????? ?????????, ??? ?????????? ?????????????, ??? ????? ? ???????.


???????????? ?????? ?????????? ?????? ? ??????? ?????????? ?????

1. ?????????? ??????? ????? ???????, ????? ?????? ? ?????? ??????? ????????? ??????? ?????? ? ???? ?? ???? (?-?, ??????, ??????????, ?????????).

2. ???? ? ??????? ?????????? ????, ?????????? ??????????? ??????, ?????????? ?? ?????????.

3. ?? ????????? ? ??????? ??????, ??????? ????? ???? ?????????.

4. ?????????? ??? ????? ?????? ???????????? ??????????????? ???????.


???????? ? ?? (VBA)

???????? ??? ???????????/?????????

1. ???????? ???????? ???????/?????????

a. ??? ???????,

b. ???????? ????????? ????? (???????? ???? ?????, ?? ?????, ????? ? ??.)
???????? ??????? ??????????:
Dim db as Database
Dim tb as Tabledef
Dim fil as Field
Set db = CurrentDb - ????????????? ??????? ? ???????? ??
Set tb = db.CreateTableDef("ct") - ???????? ???????
Set fil = tb.Createfield("???????", dbtext, 40) - ???????? ?????????? ???? ?????? 40
tb.fields.Append fil - ?????????? ? ????? ??????? ?????????? ????
Set fil = tb.Createfield("???", dblong)
fil.attributes = dbAutoIncrement
tb.fields.Append fil
:
tb.Fields.Refresh - ?????????? ????????? ? ???????
db.tableDefs.Append tb - ?????????? ??????? ? ?? ? ????? ?????????
Set tb = Nothing - ???????????? ??????

2. ???????? ???????? ???????.
Dim ind as Index
Set db = CurrentDb
set tb = db.TableDefs("ct")
Set ind = tb.CreateIndex("ind1") - ???????? ???????
ind.Primary = true - ?????? ?????? ?????????
Set fil = ind.CreateField("???",dbLong) - ??????? ???? ???????
ind.Fields.Append fil
tb.Indexes.Append ind
tb.Indexes.Refresh

3. ???????? ??????? ? ??????? ??????? DoCmd, ? ??????? ???????? ??? ????????????.
DoCmd.OpenTable "ct", acViewDesign - ???????? ??????? ? ?????? ????????????

4. ???????? ???????.

5. ???????? ?????? ??????? (SetFocus).

6. ????? ????????? ?????? ??? ?????.
Me.RecordSource = "ct"

7. ???????? ???????. ????? ??????????? ??? ?????????? ? ? ??????????? (???????? Close ? ???????????; ???????? Update).

8. ???????? ???????.
db.TableDefs.Delete "ct"

9. ???????? ???????.


???????? ??? ????????

??? ??????? ?????????? ????????? ????? ???????, ??????? ?????????? RecordSet. ?????? ? ??? ? ?????????? ?????????????? ??? ?????? ? ????? ?????? ????? ?????. ????? ???????? ????????? ?????????? ???????? ? ??????? ???????. ??? ??????????? ?? ??????? ?????????? ????????? ???????:

Me.RecordSet.MoveFirst - ???????????? ?? ?????? ??????;

Me.RecordSet.MoveLast - ?????????? ??????? ?????? ?? ?????????;

Me.RecordSet.MoveNext - ?????????? ??????? ?????? ?? ????????? ???????;

Me.RecordSet.MovePreview - ?????????? ??????? ?????? ?? ?????????? ???????.

??? ???? ????? ??????????? ?? ???? ????? ?? ?????? (? MS Access), ?????????? ??? ???????? ??????????? ????? RecordSetClone.

???????? ??? ????????:

1. ??????? EOF ????????? ???????? ?????? ?????? ?????, ????? ????????? ????????? ????? ????????? ??????.

2. ??????? BOF ????????? ???????? ?????? ?????? ?????, ????? ????????? ????????? ????? ?????? ???????.

3. ??????????? ???????. ??????????? ? 2 ?????:

a. ????????? ???????? ????;

b. ?????????? ?????? (Update).

4. ?????????? ????? ??????.
Add - ????????? ?????? ? ?? ?????, ??? ????? ?????????;
AddNew - ????????? ?????? ? ????? ??.

5. ????????. ??? ?????????? ??????? Delete ?????? ?????????? ? ????????.

6. ???????? ??????

a. ???????? ?????? ?? ??????????????? ??????? - seek ???? ????????.

b. ???????? ?????? ?? ????????????????? ??????? - find.

????? ???????????? ???????? seek, ?????????? ????????????? ????. ???????? ????? ???? ?????? ???? ??????. ?????????? ????? ??????? FindNext, ??????? ?????????? ????????? ????????, ??????????????? ???????.
?-?, Me.RecordSet.FindFirst "????? = '????'".

7. ??????? ?? ???????. ????? ?????????????? ? ??????? ???????/???????: DoCmd.GoToRecord, , acNext; RecordSet.MoveNext.

8. ????????? ????????. ?????????????? ???????? (??????):
Me.Recordset.Edit
Me.Recordset.Fields(1) = Me.????1.Value (???????? Value ????????, ???? ??????? ???????)
Me.Recordset.Update

9. ?????????? ???????.
Me.Recordset.AddNew
Me.Recordset.Fields(1) = "????????"
Me.Recordset.Update



SQL

SQL (Structured Query Language) - ??????????? ???? ????????. ?? ???????? ????????? ? ???????? ? ???????????? ?????? ??????.

 

???? ???? ???????? ???????????, ?.?. ???????????? ?????? ??????? ????? ????????? ??? ??????????, ? ?? ??, ????? ??????? ?? ????? ??????? (????????, ???????????? ????? ??????? ????? ?????? ?????????? ??? ???????? ?? ??, ? ?? ?????? ?? ?????????). ???????????? ????? ?????: ??????????? ? ???????? ??????????, ?.?. ?????? ????????? - ??? ???? ????????. ?????????? ??????????? ? ???, ??? ?????? ???????? ????????????? ?????? ? ?????????????? ??????? ?????????? ?????????.

 

?????????? ????????? ????????? ????? ? ??????????? ????. ????????????? ???? ?????????? ?????? IBM, ?? ??????? ????? ?????? ????? ORACLE. ?? ?????????? ???????? ? ??? ??????? ????????????? ? ACCESS ? ???? ???? ?????? Microsoft Jet.

 

?????????? ??? ???? SQL.

 

1. ?????????????, ??????????? ??? ?????????? ???????? ??????????????? ??? ????? ? ????? ???????? ?????????, ??????? ???????????? ??????????????? ?????????.

 

2. ?????????? ????, ??????? ???????????? ? ?????? ???????????????? ??? ????????? ?????? ??? ?????????? ?????????. ?????????? ???????????? ? ??????????.

 

???? ???? ??????? ?? 3 ?????? (???????)

 

1. ?????? ??????????? ?????? (DATA DIFINITION LANGUAGE) DDL ????????????? ??? ???????? ?????? ? ???????? ? ????????? ANSI ???? ??????????? ????? SDL.

 

2. ?????? ??????????????? ??????? DML.

 

3. ?????? ?????????? ??????? DCL.

 

???? ?????? ???????????? ? SQL

???????? ???????????? ?????? ??? ???? ????????? (char ? varchar) ? ????????(integer, decimal). ???? ? ????? ???????????? ??????????? ?? ???? ?????????.

 

???? ?????? ????? SQL ???? ???? ?????? Microsoft Jet ???????? 13 ???????? ????? ??????, ???????????? ? ???? ???? ?????? Microsoft Jet, ? ????????? ?????????, ??????? ????? ???????????? ?????? ???????? ?????.

 

????? ??????????? ???????? ???? ??????. ???????? ??????? ? ??????? "????????????????? ?????" SQL ???? ???? ?????? Microsoft Jet.

 

1. BINARY. 1 ???? ?? ??????. ? ???? ????? ???? ????? ????????? ?????? ?????? ????. ?????? ?? ????????????? (????????, ? ?????????) ? ???????????? ? ??? ?? ????, ? ????? ??? ???????? ? ??? ????.

2. BIT. 1 ????. ???????? "??" (Yes) ? "???" (No), ? ????? ????, ?????????? ???? ?? ???? ????????? ????????.

3. BYTE. 1 ????. ????? ???????? ?? 0 ?? 255.

4. COUNTER. 4 ????. ?????, ????????????? ????????????? ????? ???? ?????? Microsoft Jet ??? ?????????? ? ??????? ????? ??????. ? ???? ???? ?????? Microsoft Jet ????? ???? ?????? ????????????? ??? ?????? Long.

5. CURRENCY 8 ???? ?????????????? ?????
?? -922337203685477,5808 ?? 922337203685477,5807.

6. DATETIME. ?????????? ???? Date (???????? ???? ? ???????) ??????????? ??? 64-????????? (8-????????) ????? ? ????????? ?????? ????????? IEEE, ?????????????? ???? ? ????????? ?? 1 ?????? 100?. ?? 31 ??????? 9999?. ? ???????? ??????? ?? 0:00:00 ?? 23:59:59. ?????????? ???? Date ????? ???? ????????? ????? ????????, ?????????? ??????????????? ?????? ? ????? ????????????? (?????????? ????)8 ????. (???? ??? ?????) (??. DOUBLE); ???????? ????? ??? ?? 100 ?? 9999.

7. GUID. 128 ???. ?????????? ?????????????, ???????????? ??? ??????? ????????? ????????.

8. SINGLE. 4 ????. ????? ? ????????? ?????? ? ????????? ?????????

?? -3,402823E38 ?? -1,401298E-45 ??? ????????????? ????????,

 

?? 1,401298E-45 ?? 3,402823E38 ??? ????????????? ???????? ??? ???????? 0.

 

9. DOUBLE 8 ???? ????? ? ????????? ?????? ? ??????? ?????????

?? -1,79769313486232E308 ?? -4,94065645841247E-324 ??? ????????????? ????????,

 

?? 4,94065645841247E-324 ?? 1,79769313486232E308 ??? ????????????? ???????? ??? ???????? 0.

 

10. SHORT. 2 ????. ???????? ????? ?? -32768 ?? 32767.

11. LONG. 4 ????. ??????? ????? ?? -2147483648 ?? 2147483647.

12. LONGTEXT. 1 ???? ?? ??????. ?? 0 ?? 1,2 ?????.

13. LONGBINARY. ?? ?????????? ?? 0 ?? 1,2 ?????. ???????????? ??? ???????? ActiveX.

14. TEXT. 1 ???? ?? ??????. ?? 0 ?? 255 ????????.

??????????. ? ??????????? SQL ??????????? ????? ????????????? ?????????????????? ????? VALUE.

????????? ??????????????? ???????


???????? Select

?????????

 

SELECT [????????] { * | ???????.* | [???????.]????_1

 

[AS ?????????_1] [, [???????.]????_2 [AS ?????????_2] [, ...]]}

 

FROM ????????? [, ...] [IN ?????????????????]

 

[WHERE... ]

 

[GROUP BY... ]

 

[HAVING... ]

 

[ORDER BY... ]

 

[WITH OWNERACCESS OPTION]

 

????????? ?????????? SELECT:

 

???????? - ???? ?? ????????? ?????????? ??????: ALL, DISTINCT, DISTINCTROW ??? TOP. ????????? ???????????? ??? ??????????? ????? ???????????? ???????. ???? ??? ???????????, ?? ????????? ???????????? ???????? ALL.

 


DISTINCT

????????? ??????, ??????? ???????? ????????????? ???????? ? ????????? ?????. ????? ?????? ???? ???????? ? ????????? ?????????? ???????, ???????? ? ?????? ????, ?????????? ? ?????????? SELECT, ?????? ???? ???????????. ????????, ? ??????? "??????????" ???? ????????????. ???? ??? ?????? ???????? ???????? "??????" ? ???? "???????", ?? ????????? ?????????? SQL ????????? ?????? ???? ?? ???:

SELECT DISTINCT

 

???????

 

FROM ??????????;

 

???? ??????????? SELECT ???????? ????? ?????? ????, ?? ??? ????????? ?????? ? ????????? ?????????? ??????? ??????????, ????? ???????????? ???????? ?? ???? ???? ????? ???? ??????????.

 

DISTINCTROW - ???????? ??????, ?????????? ?? ??????? ????????????? ???????, ? ?? ????????? ????????????? ?????. ????????, ?????? ??????, ???????????? ??????? "???????" ? "??????" ?? ???? "??????". ? ???? "??????" ??????? "???????" ??? ????????????? ????????, ??????, ??? ???? ? ??????????? ???? ??????? "??????", ????????? ?????? ?????? ????? ?????????? ????????? ???????. ????????? ?????????? SQL ??????????, ??? ????? ???????????? ???????? DISTINCTROW ??? ????????? ?????? ????????, ???????????? ???? ?? ???? ?????, ??? ????????? ???????? ? ????? ???????:

SELECT DISTINCTROW ????????

 

FROM ??????? INNER JOIN ??????

 

ON ???????.?????????? = ??????.??????????

 

???? ???????? ???????? DISTINCTROW, ? ????????? ?????????? ??????? ????? ???????? ????????? ????? ? ?????? ???????, ????????? ????????? ???????. ???????? DISTINCTROW ?????? ?? ????????? ?????? ? ??? ??????, ???? ? ?????? ???????? ?? ??? ???? ?? ????????????? ??????. ???????? DISTINCTROW ????????????, ???? ?????? ???????? ?????? ???? ??????? ??? ??? ???? ???? ??????.

 

TOP n [PERCENT]

 

?????????? ???????????? ????? ???????, ??????????? ? ?????? ??? ? ????? ?????????, ?????????? ? ??????? ??????????? ORDER BY. ????????? ?????????? SQL ????????? ???????? ?????? 25 ?????? ????????? ??????? 2007 ????:

 

SELECT TOP 25

 

???, ???????

 

FROM ????????

 

WHERE ?????????? = 2007

 

ORDER BY ??????????? DESC;

 

???? ??????????? ORDER BY ????? ???????, ?????? ????????? ???????????? ????? 25 ??????? ?? ??????? "????????", ??????????????? ??????????? WHERE. ???????? TOP ?? ???????????? ????? ????? ??????? ??????????. ???? ? ?????????? ??????? ??????? ???? ???????? ?????? ? ???????? ??????? ???????? ????? ?????, ?? ?????? ????????? 26 ???????. ????? ????, ????? ???????????? ????????????????? ????? PERCENT ??? ???????? ????????????? ???????? ???????, ??????????? ? ?????? ??? ? ????? ?????????, ?????????? ? ??????? ??????????? ORDER BY. ???????????, ??? ?????? 25 ?????? ????????? ??????? ???????? ?????????, ???????? ? ????????? 10 ?????????:

 

SELECT TOP 10 PERCENT

 

???, ???????

 

FROM ????????

 

WHERE ?????????? = 2007

 

ORDER BY ??????????? ASC;

 

???????? ASC ???????????? ??????? ????????? ????????. ????????, ????????? ????? ????????? TOP ?????? ???? ???????? ????????? ???? Integer ??? ?????. ???????? TOP ?? ?????? ?? ??????????? ?????????? ???????.

 

??????? - ??? ???????, ?? ??????? ?????????? ??????.

 

* - ?????????, ??? ??????? ??? ???? ???????? ??????? ??? ??????.

 

????_1, ????_2 - ????? ?????, ?? ??????? ?????? ???? ???????? ??????. ???? ???????? ????????? ?????, ??? ????? ??????????? ? ????????? ???????.

 

?????????_2, ?????????_2 - ?????, ??????? ?????? ??????????? ???????? ?????? ???????? ???????? ???????? ? ???????.

 

????????? - ????? ????? ??? ?????????? ??????, ??????? ???????? ?????????? ??????.

 

????????????????? - ??? ???? ??????, ??????? ???????? ???????, ????????? ? ??????? ????????? ?????????, ???? ??? ?? ????????? ? ??????? ???? ??????.

 

??? ?????????? ???? ???????? ???? ???? ?????? Microsoft Jet ??????? ????????? ??????? ??? ???????, ????????? ???????? ???????, ???????? ??????, ??????????????? ??????? ??????, ? ????????? ??? ?????????? ?????????????? ?????? ? ????????? ???????.

 

?????????? SELECT ?? ???????? ?????? ? ???? ??????. ?????? ????? SELECT ???????? ?????? ?????? ?????????? SQL. ??????? ????? ?????????? SQL ???????? ???????????? SELECT ??? SELECT...INTO.

 

???? ???????? ??????????? ????????? ?????????? SELECT:

 

SELECT ???? FROM ???????

 

??? ?????? ???? ????? ??????? ????? ???????????? ?????? ????????? (*). ????????? ?????????? ???????? ??? ???? ?? ??????? "??????????":

 

SELECT * FROM ??????????;

 

???? ????????? ??????, ?????????? ? ??????????? FROM, ???????? ??????????? ????, ????? ?????? ?????? ???? ??????? ?????? ??? ??????? ? ???????? "." (?????). ???????????, ??? ???? "?????" ?????????? ? ???????? "??????????" ? "??????????". ????????? ?????????? SQL ??????? ???? "?????" ?? ??????? "??????????" ? ???? "?????????" ?? ??????? "??????????":

 

SELECT ??????????.?????, ??????????.?????????

 

FROM ?????????? INNER JOIN ??????????

 

WHERE ??????????.????? = ??????????.?????;

 

??? ???????? ??????? Recordset ???? ???? ?????? Microsoft Jet ?????????? ??? ???? ??????? ? ???????? ????? ??????? Field ? ??????? Recordset. ???? ????????? ?????? ??? ????, ??? ?????????, ????????? ????, ?? ?????????? ???, ??????????? ????????????????? ????? AS. ? ????????? ??????? ????????? "????????" ?????????? ?????? ??????? Field ? ?????????????? ??????? Recordset:

 

SELECT [???? ????????] AS ????????

 

FROM ??????????;

 

??? ?????? ?? ??????????????? ????????? ??? ?????????, ??????? ?????????? ????????????? ????? ??????? Field, ??????????? ??????????? AS ??? ??????? ??????? ????? ??????? Field. ? ????????? ??????? ????????? "???????????" ???????? ??? ????????????? ??????? Field ??????????????? ??????? Recordset:

 

SELECT COUNT(?????????????)AS ???????????

 

FROM ??????????;

 

??? ??????????? ?????? ? ??????????? ??????? ?????? ? ?????????? SELECT ????? ????????? ?????? ?????? ???????????.

 


FROM

????????? ??????? ??? ???????, ??????? ???????? ????, ????????????? ? ?????????? SELECT.

 

?????????:

 

SELECT ???????????

 

FROM ????????? [IN ?????????????????]

 

????????? ?????????? SELECT, ?????????? ??????????? FROM:

 

????????? - ?????????, ???????????? ???? ??? ????????? ??????, ?????? ??????????? ??????. ??? ????????? ????? ???? ?????? ????????? ???????, ?????? ???????????? ??????? ??? ??????????? ???????? INNER JOIN, LEFT JOIN, ??? RIGHT JOIN.

 

????????????????? - ?????? ??? ??????? ???? ??????, ?????????? ???????, ????????? ? ????????? ?????????.

 

??????????? FROM ?????? ?????????????? ? ?????? ?????????? SELECT. ??????? ?????????? ???? ?????? ? ????????? ????????? ?? ???????????. ????????? ?????? ??????????, ??? ???????? ?????? ?? ??????? "??????????":

 

SELECT ???????, ???

 

FROM ??????????;

 

WHERE

??????????, ????? ?????? ?? ??????, ????????????? ? ??????????? FROM, ??????? ???????? ? ????????? ?????????? ?????????? SELECT, UPDATE ??? DELETE.

 

?????????:

 

SELECT ???????????

 

FROM ?????????

 

WHERE ?????????????

 

?????????? SELECT, ?????????? ??????????? WHERE, ??????? ?? ???? ??????:

 

????????????? - ?????????, ???????? ?????? ????????????? ??????, ?????????? ? ????????? ?????????? ???????.

 

???? ???? ?????? Microsoft Jet ???????? ??????, ??????????????? ????????, ????????????? ? ??????????? WHERE. ???? ?? ???????? ??????????? WHERE, ?????? ?????????? ??? ?????? ???????. ???? ? ??????? ?????????? ????????? ?????? ? ?? ???????? ??????????? WHERE ??? JOIN, ?????? ????? ?????????? ????????? ???????????? ??????.

 

??????????? WHERE ?? ???????? ????????????, ??????, ???? ??? ????????????, ?? ?????? ????????? ????? ??????????? FROM. ????????, ????? ???????? ???? ??????????? ?????? ?????? (WHERE ????? = '???????') ??? ???? ???????? ? ???????? ?? 18 ?? 30 ??? (WHERE ??????? Between 18 And 30).

 

??????????? ????????????? ????????? ?????????. ????????, ????????? ?????????? SQL ???????? ???? ???????????, ???????? ??????? ????????? 810000 ??????:

 

SELECT ???????, ?????

 

FROM ??????????

 

WHERE ????? > 810000;

 

??????????? WHERE ????? ????????? ?? 40 ?????????, ????????? ??????????? ???????????, ?????? ??? And ? Or.

 

????? ?????, ??????? ???????? ??????? ??? ????? ??????????, ?????????? ????????? ? ?????????? ?????? ([ ]). ????????, ? ???????, ?????????? ???????? ? ????????, ????? ???????? ???????? ? ????????? ????????:

 

SELECT [??????? ????????]

 

??? ???????? ????????? ????????????? ???????? ???? ??????? ??? ?????? ????????? ? ???????????? ???????, ???? ???? ???????????? ?????????????? ?????? ???? ???? ?????? Jet. ????????, ???? 10 ??? 1996 ???? ???????????? ? ?????? ??? 10.05.94, ? ? ??? ??? 5/10/94. ??????????? ????????? ???? ? ??????? "???????" (#), ??? ???????? ? ????????? ????????.

 

??? ?????? ??????? ? ???? ????? ? ?????????? ???? ?????? ?????????? ???????????? ????????? ?????????? SQL:

 

SELECT *

 

FROM ??????

 

WHERE ?????????????? = #5/10/96#;

 

????? ????, ????? ????????? ??????? DateValue, ??????? ???????????? ????????????? ?????????, ???????? ? Microsoft Windows. ????????, ??? ?????? ??????? ? ???????????? ???? ?????? ????? ???????????? ????????? ????? ?????????:

 

SELECT *

 

FROM ??????

 

WHERE ?????????????? = DateValue('5/10/96');

 

??? ?????????? ???? ?????? ????? ????????? ????? ????????? ???:

 

SELECT *

 

FROM ??????

 

WHERE ?????????????? = DateValue('10.5.96');

 


???????????

?????????? ?????? ? ??????????? ?????????? ? ????????? ?????? ????? ? ???? ??????. ???? ?????????? SELECT ???????? ?????????????? ??????? SQL, ????????, Sum ??? Count, ?? ??? ?????? ?????? ????? ????????? ???????? ????????.

 

?????????:

 

SELECT ???????????

 

FROM ???????

 

WHERE ?????????????

 

[GROUP BY ????????????????]

 

???????????????? - ????? ????? (?? 10), ??????? ???????????? ??? ??????????? ???????. ??????? ???? ????? ? ????????? ???????????????? ?????????? ??????? ??????????? ??? ??????? ?? ???? ?????. ??????????? GROUP BY ???????? ??????????????.???????? ???????? ?? ??????????????, ???? ?????????? SELECT ?? ???????? ?????????????? ??????? SQL.

 

???????? Null, ??????? ????????? ? ?????, ???????? ? ??????????? GROUP BY, ???????????? ? ?? ??????????. ?????? ?????????????? ??????? SQL ?? ???????????? ???????? Null.

 

???? ????, ?????????? ? ??????????? GROUP BY, ?? ???????? ????? ???? Memo ??? ??????? ActiveX, ??? ????? ????????? ?????? ?? ????? ????, ????????????? ? ??????????? FROM, ???? ???? ??? ???? ?? ???????? ? ?????????? SELECT, ??? ???????, ??? ?????????? SELECT ???????? ?? ??????? ???? ???? ?????????????? ??????? SQL. ???? ???? ?????? Jet ?? ???????????? ??????????? ????? ???? ??? ??????? ActiveX.

 

??? ????????????? ??????????? GROUP BY ??? ???? ? ?????? ????? ?????????? SELECT ?????? ???? ???? ???????? ? ??????????? GROUP BY, ???? ?????????????? ? ???????? ?????????? ?????????????? ??????? SQL.

 

SELECT ??????????.?????, Sum(??????????.????????) AS Sum_????????

 

FROM ??????????

 

GROUP BY ??????????.?????;

 

??????????? ??????????? WHERE ??? ?????????? ??????? ?? ???????????, ? ??????????? HAVING ??? ?????????? ??????? ? ??????? ????? ???????????.

 

??????????, ????? ??????????????? ?????? ???????????? ??? ????????????? ?????????? SELECT ? ???????????? GROUP BY. ????? ???? ??? ?????? ????? ????????????? ? ??????? ??????????? GROUP BY, ??????????? HAVING ??????? ?? ?? ?????????? ???????, ??????? ????????????? ???????? ??????, ????????? ? ??????????? HAVING.

 

?????????:

 

SELECT ???????????

 

FROM ???????

 

WHERE ?????????????

 

GROUP BY ????????????????

 

[HAVING ??????????????????]

 

??????????? HAVING ???????? ??????????????. ??????????? HAVING ?????? ?? ??????????? WHERE, ??????? ??????????, ????? ?????? ?????? ???? ????????. ????? ???? ??? ?????? ????? ????????????? ? ??????? ??????????? GROUP BY, ??????????? HAVING ?????????, ????? ?? ?????????? ??????? ?????? ???? ????????:

 

SELECT ??????????.?????, Sum(??????????.????????) AS Sum_????????

 

FROM ??????????

 

GROUP BY ??????????.?????

 

HAVING (((Sum(??????????.????????))>3000));

 

??????????? HAVING ????? ????????? ?? 40 ?????????, ????????? ??????????? ???????????, ?????? ??? And ? Or.

 


??????????? ??????

?????????? 2 ??????? ??????????? ??????:

 

??????????? ??????? ?? ???? ??????, ???? ????????? ???? ???? ?????? ???????? ?????????? ????????. ??? ?????????????? ? ??????? 3 ??????????: INNER JOIN, LEFT JOIN, RIGHT JOIN.
?????????:
FROM ???????_1 INNER JOIN ???????_2 ON ???????_1.????_1 ???????? ???????_2.????_2

 

???????_1, ???????_2 - ????? ??????, ?????? ??????? ???????? ???????????.

 

????_1, ????_2 - ????? ???????????? ?????. ???? ??? ???? ?? ???????? ?????????, ?? ?????? ????? ?????????? ??? ?????? ? ????????? ?????? ?????? ????, ??????, ???? ????? ????? ?????? ?????.

 

???????? - ????? ???????? ?????????: "=," "<," ">," "<=," ">=," ??? "<>".

 

???????? INNER JOIN ????? ???????????? ? ????? ??????????? FROM. ??? ????? ??????? ???? ??????????. ??? ?????????? ?????? ???? ??????, ???? ????????? ???? ????? ?????? ???????? ?????????? ????????. ???????? INNER JOIN ????? ???????????? ? ????????? "??????????" ? "??????????" ??? ?????? ???? ??????????? ??????? ??????.

 

SELECT ??????????.???????, ??????????.?????, ??????????.???????, ??????????.?????

 

FROM [??????????] INNER JOIN ?????????? ON ??????????.????? = ??????????.?????;

 

??????? ?????????? ???? Memo ??? ??????? ActiveX ???????? ? ????????????? ??????. ??????????? ??????????? ???? ???????? ????? ???????? ?????, ????????, ???? ???????? ? ???? ? ????? "??????? ?????". ?????? ?????? ?????????? ???? ????? "? ????????? ?????? (4 ????)" ? "? ????????? ?????? (8 ????)".

 

SELECT ????

 

FROM ???????_1 INNER JOIN ???????_2

 

ON ???????_1.????_1 ???????? ???????_2.????_1 AND

 

ON ???????_1.????_2 ???????? ???????_2.????_2) OR

 

ON ???????_1.????_3 ???????? ???????_2.????_3)];

 

???????? JOIN ????? ???? ??????????; ? ????? ?????? ??????????? ????????? ?????????:

 

SELECT ????

 

FROM ???????_1 INNER JOIN

 

(???????_2 INNER JOIN [( ]???????_3

 

[INNER JOIN [( ]???????_X [INNER JOIN ...)]

 

ON ???????_3.????_3 ???????? ???????_X.????_X)]

 

ON ???????_2.????_2 ???????? ???????_3.????_3)

 

ON ???????_1.????_1 ???????? ???????_2.????_2;

 

???????? LEFT JOIN ??? RIGHT JOIN ????? ???? ??????? ? ???????? INNER JOIN, ?? ???????? INNER JOIN ?? ????? ???? ??????? ? LEFT JOIN ??? RIGHT JOIN.

 

??? ?????? ?? ???? ??????????? (? ??? ????? ???, ? ??????? ??? ?? ?????? ??????????) ??? ???? ??????????? (? ??? ????? ???, ??????? ??? ??????????) ??????? ???????????? ???????? LEFT JOIN ??? RIGHT JOIN, ??????? ??????? ??????? ???????????.

 

?????????:

 

FROM ???????_1 [ LEFT | RIGHT ] JOIN ???????_2

 

ON ???????_1.????_1 ???????? ???????_2.????_2

 

??????????? ???????? LEFT JOIN ??? ???????? ?????? ???????? ???????????, ??? ??????? ??? ?????? ?? ?????? (?????) ??????? ?????????? ? ???????????? ?????, ???? ???? ?? ?????? (??????) ??????? ??? ??????????????? ?? ???????.

 

??????????? ???????? RIGHT JOIN ??? ???????? ??????? ???????? ???????????, ??? ??????? ??? ?????? ?? ?????? (??????) ??????? ?????????? ? ???????????? ?????, ???? ???? ? ?????? (?????) ??????? ??? ??????????????? ?? ???????.

 

2-? ?????? ??????????? ?????? ??????????? ? ??????? ???????????????? ????????????? ? ??????? ?????? ??????? ??????? ?????? ???????. ????? ??????????? ?????????????? ? ??????? ????????? UNION. ?? ??????? ?????? ?? ???????????, ??????? ?????????? ?????????? ?????????? ??????????? ???????? ??? ??????.

 

?????????:

 

[TABLE] ??????_1 UNION [ALL] [TABLE] ??????_2 [UNION [ALL] [TABLE] ??????_n [ ... ]]

 

???? ??????????? ????????? ???????? UNION:

 

??????_1 - ?????????? SELECT, ??? ???????????? ??????? ??? ??? ??????????? ???????, ????? ??????? ????? ????????????????? ????? TABLE.

 

? ????? ???????? UNION ????? ?????????? ? ????? ?????? ?????????? ?????????? ????????, ?????? ? ?????????? SELECT. ?? ????????? ????????????? ?????? ?? ???????????? ??? ????????????? ???????? UNION, ??????, ? ??? ????? ???????? ???????? ALL, ????? ????????????? ??????? ???? ???????. ????? ????, ????? ??????? ??????????? ???????. ??? ???????, ?????????? ? ???????? UNION, ?????? ???????? ?????????? ????? ?????; ??? ???? ???? ?????? ? ??????? ????? ?? ??????? ?????????.

 

??????????? ?????????? ?????? ? ?????? ??????????? SELECT, ?????? ??? ? ????????? ??? ????????????. ? ??????????? ORDER BY ?????????? ?? ???? ?? ?? ????????? ? ?????? ??????????? SELECT.

 

? ?????? ????????? ?????? ??????????? ????????????? ??????????? GROUP BY ??? HAVING ??? ??????????? ???????????? ??????. ? ????? ?????????? ????????? ?????? ????? ???????? ??????????? ORDER BY, ????? ????????????? ???????????? ??????. ? Microsoft Access ??????????? ???????? UNION (??????1, ??????2,...??????N) ????? ??????? ?????????? SELECT, ??? ???????????? ??????? Microsoft Access ??? ??? ??????????? ??????? Microsoft Access ? ?????????????? ????????????????? ?????? TABLE.

 


?????????

????????? ??? ? ??? ?????? ??????? ????????? ? ??????? ? ???????????.

 

?????????:

 

PARAMETERS ??? ????????? [, ??? ????????? [, ...]]

 

??? - ??? ?????????. ???????????? ??? ????????? ? ????? ?????????. ???????? ????????? ??? ????? ???? ???????, ??????? ???????????? ? ???? ??????? ??? ?????????? ???????. ??????, ?????????? ??????? ? ????? ??????????, ?????????? ????????? ? ?????????? ?????? ([ ]) . ????????, ??????????? ?????????? ????? ????????? ???????? [??????????? ????] ? [???????? ?? ????? ????? ?? ?????? ?????????].

 

????????? - ???? ?? ????????? ????? ?????? SQL ???? Microsoft Jet ??? ?? ????????.

 

??? ????????? ??????????? ???????? ????? ???????????? ???????? PARAMETERS, ????? ??????? ?????? ? ???????????. ?????? ? ??????????? ???????? ???????????????? ??????? ????????? ??????? ?????? ???????. ??? ??????? ??????? ? ??????????? ????????? ?????? ?????????? ????????? ??? ?????? ??????? ???????.

 

???????? PARAMETERS ???????? ??????????????, ??????, ???? ??? ????????????, ?? ?????? ?????????? ????? ????? ?????????? ????????????, ? ??? ?????, ????? ??????????? SELECT.

 

??? ?????????? ?????????? ? ???????? ??????? ???????????? ???????. ? ????????? ??????? ??????? ??? ?????????:

 

PARAMETERS [??????????? ????] Currency Currency, [????????? ????] DateTime;

 

? ??????????? WHERE ??? HAVING ????? ???????????? ???????? ???, ?? ?? ?????????.

 

??? ?????????? ??????? ? ??????????? Microsoft Access ??????? ??????????? ???????????? ?????? ?????????, ???????????? ??????? ?????? ? ???????. ??? ????????? ??????? ??????, ???????????? ?????? ?? ?????? ????????? ????????????? ???????.

 

? ?????????? ?????, ????????????? ? ???????? PARAMETERS, ???????? ?????, ??????????? ? ?????? ?? ?????????? ????, ??????? ??????????? ??? ????? ???????????????? ????????? ??? ??????? ???????. ??? ?????????? ???? ????????? ?????????????.

 


???????????? ???????

(???????? ???????? ??????? ?????? ? MS Excel).

 

?????????:

 

TRANSOFORM ????????????????????? AS ????????

 

SELECT ???????? FROM ??????? GROUP BY [????????]

 

PIVOT ??????????????????

 

????????????????????? - ???????, ??????? ??????????? ??? ???????, ?????????? ? ????????? SELECT.

 

???????????? ?????? ???????? ? ???? ????????? ???????? ? ????????? ?????. ?????? ????????????? ???????, ??????? ?????????? ?????????? ??????????? ? ?????? ??????, ?????????? ? ?????? ?? ???????.

 

Transform Count(???) as ????????

 

Select ?????, Count(???) as [???????? ????????]

 

From ??????????

 

Group By ?????

 

Pivot Format([???????], "mmm") in ("???","???" :)

 


?????????? ?????? (??????

Update) UPDATE ??????? ?????? ?? ??????????, ??????? ???????? ???????? ????? ????????? ??????? ?? ?????? ????????? ??????? ??????.

 

?????????:

 

UPDATE ???????

 

SET ?????????????

 

WHERE ?????????????;

 

??????? - ??? ???????, ?????? ? ??????? ??????? ????????.

 

????????????? - ?????????, ???????????? ????????, ??????? ?????? ???? ????????? ? ????????? ???? ??????????? ???????.

 

????????????? - ?????????, ?????????? ??????, ??????? ?????? ???? ????????. ??? ?????????? ???? ?????????? ????? ???????? ?????? ??????, ??????????????? ?????????? ???????.

 

?????????? UPDATE ???????? ?????? ???????????? ??? ????????? ????? ?????? ??????? ??? ? ??? ??????, ???? ??????, ?????????? ?????????, ????????? ? ?????? ????????. ???????????? ????? ???????? ???????? ?????????? ?????. ????????? ?????????? SQL ??????????? ???????? ?????? ?????????????? ?? 20% ? ????????????? ??????20%.

 

UPDATE ??????????

 

SET ??????????.???????? = ????????*1.2, ??????????.?????? = 20

 

WHERE (((??????????.?????)="??????????????"));

 

 

?????????? UPDATE ?? ???????? ? ???????? ??????????????? ?????? ???????. ????? ??????, ????? ?????? ????? ????????, ??????? ??????????? ?????????? ??????? ?? ???????, ????????????? ?? ?? ????? ??????? ??????, ? ????? ????????? ?????? ?? ?????????? ???????. ?????????? UPDATE ?? ?????????? ??????, ??????? ??? ?? ?????????? ?????????? ?? ????????? ? ?????? ???????.

 

? ????????? ??????? ?????? ? 30% ?????????????? ???? ?????????? ????????

 

UPDATE ?????????? INNER JOIN [??????????] ON ??????????.?????_?????? = ??????????.??? SET ??????????.?????? = 30

 

WHERE (((??????????.???????)="????????"));

 


???????? ?????? (??????

Delete) ??????? ?????? ?? ???????? ???????, ??????????????? ??? ???????? ??????? ?? ????? ??? ?????????? ??????, ????????????? ? ??????????? FROM, ??????? ????????????? ??????????? WHERE.

 

?????????:

 

DELETE [???????.*]

 

FROM ???????

 

WHERE ?????????????

 

??????? - ?????????????? ??? ???????, ?? ??????? ????????? ??????.

 

????????????? - ?????????, ???????????? ????????? ??????.

 

?????????? DELETE ???????? ?????? ??? ???????? ???????? ?????????? ???????. ????? ??????? ?? ???? ?????? ????? ???????, ????? ???????????? ????? Execute ?????? ? ??????????? DROP. ?????? ??? ????? ???????? ??????? ???????? ?? ?????????. ???? ?? ????????? ?????????? DELETE, ????????? ?????? ??????. ??? ???? ??????????? ????????? ??????? ? ??? ????????? ?? ????????, ????? ??? ???????? ????? ? ???????.

 

?????????? DELETE ????? ???????????? ??? ???????? ??????? ?? ??????, ????????? ?????????? "????-??-??????" ? ??????? ?????????. ???????? ?????????? ???????? ???????? ? ???????? ??????? ?? ??????, ??????????? ?? ??????? ????????? "??????", ????? ? ??????? ????????? ??????????????? ?? ?????? ?? ??????? "????". ????????, ? ????????? ????? ????????? "???????" ? "??????", ??????? "???????" ??????????? ?? ??????? "????", ? ??????? "??????" ?? ??????? "??????". ???? ????????? ????????? ????????, ?? ???????? ?????? ?? ??????? "???????" ???????? ? ???????? ??????????????? ??????? ?? ??????? "??????". ?????? ?? ???????? ??????? ?????? ???????, ? ?? ?????? ?????????? ????????? ?????. ????? ??????? ?????? ? ?????????? ????, ??????? ??????? ?????? ?? ??????????, ??????? ???????? ????????? ???????? ?? ???????? Null.

 

?????? ???????????? ??????, ????????? ? ??????? ??????? ?? ????????. ????? ??????, ????? ?????? ????? ???????, ??????????? ??????? ?????????? ??????? ?? ???????, ????????????? ?? ?? ????? ??????? ??????, ? ????? ????????? ?????? ?? ????????.

 

????????? ?????????? ?????????????? ??????. ??????????????? ????????? ?????? ????? ???? ????????????? ?? ????????? ?????.

 

? Microsoft Access ?????????? ?????????? DELETE ?? ???????? ? ?????? ??????????? ?????? ? ?????? ???????.

 

????????? ??? ?????? ?????? ???????

 

DELETE

 

FROM ??????????

 

WHERE (((??????????.?????)="???????"));

 


??????????? ???????

??? ?????????? Select, ????????? ? ?????????? Select, Insert, Delete, Update ??? ?????? ??????????? ??????. ??? ????????? 3 ?????????. ? ??????? ???????? ????: ANY/ALL/SOME ? ?????????????? ?????? ?? ????? ????????? (>, <, =, <>).

 

ANY, SOME - ????????, ???????????? ??? ?????? ??????? ? ??????? ???????, ??????? ????????????? ????????? ? ????? ?? ???????, ?????????? ? ??????????? ???????.

 

Select ??????, ????????????

 

From ??????

 

Where ??????.???? >= ANY (Select ???? From :)

 

ALL ???????????? ??? ?????? ???????, ??????? ????????????? ????????? ?? ????? ???????? ???????????? ???????.

 

????? ???? ???????????? ???????? IN, ??????? ????????? ?????????? ?????? ???????? ?? ?????????? ???????. ????????? ?????? ?????????? ?????? ?? ???????, ?????? ?? ??????? ?????? 25%.

 

Select *

 

From ??????

 

Where ??????.??? in (Select ????????? From ???????? Where ?????? >= 25)

 

??? ???????? ?????? ????? ???????????? ??????? Exist ? Not Exist.

 

??????????? ??????? ????? ????????? ??? ? ???? Where, ??? ??????? ??? ??????, ??? ? ? ???? Select, ?? ??? ???? ??????????? ?????? ?????? ?????????? ???? ????????.

 


???????? ??????

???????? ?????? ??? ?????? SQL ???????? ???????? ????????? ? ???????? ???? ?????? - ??????, ??? ???? ????? ????????? ?? ?? ??????? ????? ????????? ???????.

 

???? ???? ?????? Microsoft Jet ?? ???????????? ????????????? ?????????? CREATE TABLE ??? ????? ?????? ?????????? ????? ??????????? ?????? (DDL) ? ?????? ??????, ?????????????? ?? ?????????? Microsoft Jet. ?????? ??? ??????????? ?????? Create ???????? ??????? ? ?????? (DAO).

 

?????????

 

CREATE TABLE ??????? (????_1 ??? [(??????)]

 

[NOT NULL] [??????_1] [, ????_2 ??? [(??????)]

 

[NOT NULL] [??????_2] [, ...]] [, CONSTRAINT ??????????????? [, ...]])

 

??????? - ??? ??????????? ???????.

 

????_1, ????_2 - ????? ?????? ??? ?????????? ?????, ??????????? ? ????? ???????. ??????? ?????? ????????? ???? ?? ???? ????.

 

??? - ??? ?????? ???? ? ????? ???????.

 

?????? - ?????? ???? ? ???????? (?????? ??? ????????? ? ???????? ?????).

 

??????_1, ??????_2 - ??????????? CONSTRAINT, ??????????????? ??? ???????? ???????? ???????. ??? ????????? ????? ????????? ???????? ???????? ???????? ??????????? CONSTRAINT.

 

??????????????? - ??????????? CONSTRAINT, ??????????????? ??? ???????? ?????????? ???????. ??? ????????? ????? ????????? ???????? ???????? ???????? ??????????? CONSTRAINT.

 

?????????? CREATE TABLE ???????????? ??? ???????? ????? ???????, ?? ????? ? ????????. ???? ??? ???? ????????? ??????????? NOT NULL, ?? ??? ?????????? ????? ??????? ??? ???? ?????? ????????? ?????????? ??????. ??????????? CONSTRAINT ????????????? ????????? ??????????? ?? ???? ? ????? ???? ???????????? ??? ??????????? ?????. ????? ????, ??? ???????? ????? ??? ??????????????? ??????? ??? ???????????? ??????? ????? ???????????? ?????????? CREATE INDEX.

 

??????????? ????????????? ??????????? NOT NULL ??? ?????????? ????, ? ????? ?????? ???????????? ??????????? CONSTRAINT, ???????????? ? ?????????? ???? ??? ? ???????????? ??????????? CONSTRAINT. ??????????? NOT NULL ????? ???????? ?? ???? ?????? ???? ???, ? ????????? ?????? ????????? ?????? ??????????.

 

? ????????? ??????? ????????? ????? ??????? ? ????? ?????????? ??????:

 

CREATE TABLE ????????????? (??? TEXT, ??????? TEXT);

 

? ????????? ??????? ????????? ????? ??????? ? ????? ?????????? ?????? ? ????? ????? ????/???????. ?? ???? ???? ????? ????????? ?????????? ??????:

 

CREATE TABLE ????????????? (??? TEXT,

 

??????? TEXT, ???????????? DATETIME,

 

CONSTRAINT ????????? UNIQUE (???, ???????, ????????????));

 

? ????????? ??????? ????????? ????? ??????? ? ????? ?????????? ?????? ? ???????? ?????. ???? SSN ???????? ???????? ?????.

 

CREATE TABLE ????????????? (??? TEXT, ??????? TEXT, SSN INTEGER

 

CONSTRAINT ????????? PRIMARY KEY);

 

???????? ??????????? ? ??????? ??????????? CONSTRAINT ??????? ?????????? ???????, ???? ??? ????? ??????????? ??? ???????????? ????????? ????? ?????????.

 

??????????? CONSTRAINT ???????????? ? ??????????? ALTER TABLE ? CREATE TABLE ??? ???????? ??? ???????? ????????. ?????????? ??? ???? ??????????? CONSTRAINT: ???? ??? ???????? ???????? ??????? (?? ?????? ????), ? ?????? ??? ???????? ?????????? ??????? (?? ?????????? ?????). ???? ???? ?????? Microsoft Jet ?? ???????????? ????????????? ?????????? CONSTRAINT ? ???? ?????????? ????? ??????????? ?????? (DDL) ? ?????? ??????, ?????????????? ?? ?????????? Microsoft Jet. ??????????? ?????? ??? ?????? Create ???????? ??????? ? ?????? (DAO).

 

?????????

 

??????? ??????:

 

CONSTRAINT ??? {PRIMARY KEY | UNIQUE | NOT NULL |

 

REFERENCES ?????????????? [(???????????_1, ???????????_2)]}

 

????????? ??????:

 

CONSTRAINT ???

 

{PRIMARY KEY (????????_1[, ????????_2 [, ...]]) |

 

UNIQUE (??????????_1[, ??????????_2 [, ...]]) |

 

NOT NULL (????????_1[, ????????_2 [, ...]]) |

 

FOREIGN KEY (??????_1[, ??????_2 [, ...]])

 

REFERENCES ?????????????? [(???????????_1 [, ???????????_2 [, ...]])]}

 

??? - ??? ???????, ??????? ??????? ???????.

 

????????_1, ????????_2 - ????? ?????? ??? ?????????? ?????, ??????? ??????? ????????? ?????????.

 

??????????_1, ??????????_2 - ????? ?????? ??? ?????????? ?????, ??????? ??????? ???????? ? ?????????? ??????.

 

????????_1, ????????_2 - ????? ?????? ??? ?????????? ?????, ? ??????? ??????????? ???????? Null.

 

??????_1, ??????_2 - ????? ?????? ??? ?????????? ?????, ?????????? ?? ??????? ????, ??????? ???????? ?????? ?? ???? ? ?????? ???????.

 

?????????????? - ??? ??????? ???????, ??????? ???????? ????, ????????? ? ??????? ????????? ???????????.

 

???????????_1, ???????????_2 - ????? ?????? ??? ?????????? ????? ?? ??????????????, ?? ??????? ????????? ????, ????????? ? ??????? ????????? ??????_1, ??????_2. ??? ??????????? ????? ????????, ???? ?????? ???? ???????? ?????? ??????????????.

 

??????????? CONSTRAINT, ??????????????? ??? ???????? ???????? ???????, ????????????? ????? ????? ???????? ???? ???? ? ???????????, ???????????? ???? ? ?????????? ALTER TABLE ??? CREATE TABLE.

 

?????????? ??????????? CONSTRAINT, ??????????????? ??? ???????? ?????????? ???????, ???? ????????? ???????????? ????????????????? ????? CONSTRAINT ??? ???????????, ???????????? ???? ? ?????????? ALTER TABLE ??? CREATE TABLE.

 

??????????? CONSTRAINT ????????? ??????? ??? ???? ?????? ?????? ?? ???? ????????? ???? ?????:

 

??? ???????? ??????????? ??????? ??????????? ????????????????? ????? UNIQUE. ??? ????????, ??? ? ??????? ?? ????? ???? ???? ???????, ??????? ???? ? ?? ?? ???????? ? ???? ????. ?????????? ?????? ????????? ??? ?????? ???? ??? ????? ?????? ?????. ???? ? ??????? ????????? ????????? ?????????? ??????, ?? ?????????? ???????? ?????????? ? ???? ????? ?????? ???? ?????????? ??? ?????? ?????? ???????, ???? ????????? ???? ? ????? ????? ??????????? ????????.

 

??? ???????? ????? ???????, ?????????? ?? ?????? ??? ?????????? ?????, ??????????? ????????????????? ????? PRIMARY KEY. ??? ???????? ????? ??????? ?????? ???? ??????????? ? ?? ?????????? Null. ????? ????, ? ??????? ????? ???? ?????? ???? ????

 

?????? ???????????? ????????????????? ????? PRIMARY KEY ??? ???????? ??????? ? ???????, ? ??????? ??? ????????? ????; ? ????????? ?????? ????????? ??????.

 

??? ???????? ???????? ????? ????? ???????????? ????????????????? ????? FOREIGN KEY. ???? ???? ??????? ??????? ??????? ?? ?????????? ?????, ?????????? ???????????? ??????????? CONSTRAINT, ??????????????? ??? ???????? ?????????? ???????. ??? ???? ??????? ??????????? ??? ????, ?????????? ?????? ?? ???? ?? ??????? ???????, ? ????? ??????? ??? ??????? ??????? ? ????? ????? ??????? ???????, ?? ??????? ????????? ????, ????????????? ????, ?????? ? ??? ?? ???????. ???? ????????? ???? ???????? ?????? ??????? ???????, ?? ????????? ?? ?????????????, ????????? ???? ???? ?????? ???????, ??? ? ???????? ???? ????? ??????? ???????????? ????, ???????????? ???? ??????? ???????.

 


?????????? ????? ?????

?????????? ????? ????? ???????? ????????? ???????, ????????? ? ??????? ?????????? CREATE TABLE. ???? ???? ?????? Microsoft Jet ?? ???????????? ????????????? ?????????? ALTER TABLE ? ???? ?????????? ????? ??????????? ?????? (DDL) ? ?????? ??????, ?????????????? ?? ?????????? Microsoft Jet. ??????????? ?????? ??? ?????? Create ???????? ??????? ? ?????? (DAO).

 

?????????:

 

ALTER TABLE ??????? {ADD {COLUMN ???? ???[(??????)] [NOT NULL]

 

[CONSTRAINT ??????] | CONSTRAINT ???????????????} |

 

DROP {COLUMN ???? I CONSTRAINT ??????????} }

 

??????? - ??? ?????????? ???????.

 

???? - ??? ????, ???????????? ? ??????? ??? ?????????? ?? ???.

 

??? - ??? ?????? ????.

 

?????? - ?????? ???? ? ???????? (?????? ??? ????????? ? ???????? ?????).

 

?????? - ?????? ??? ????. ??? ????????? ????? ????????? ???????? ? ???????? ??????? ???????? ???????? ??????????? CONSTRAINT.

 

??????????????? - ???????? ?????????? ???????, ???????????? ? ???????. ??? ????????? ????? ????????? ???????? ???????? ???????? ??????????? CONSTRAINT.

 

?????????? - ??? ?????????? ???????, ??????? ??????? ???????.

 

? ??????? ?????????? ALTER TABLE ???????????? ??????? ????? ???????? ??????????? ?????????, ????????:

 

???????? ????? ???? ? ??????? ? ??????? ??????????? ADD COLUMN. ? ???? ?????? ??????? ??? ????, ??? ??? ? (??? ????????? ? ???????? ?????) ?????????????? ??????. ????????, ????????? ?????????? ????????? ? ??????? "??????????" ????????? ???? "??????????" ?????? 25 ????????:

 

ALTER TABLE ?????????? ADD COLUMN ?????????? TEXT(25)

 

???? ??? ???? ????????? ??????????? NOT NULL, ?? ??? ?????????? ????? ??????? ??? ???? ?????? ????????? ?????????? ??????.

 

???????? ????????? ?????? ? ??????? ????????????????? ???? ADD CONSTRAINT. ??? ????????? ????? ????????? ???????? ? ????????? ???????? ???????? ???????? ??????????? CONSTRAINT.

 

??????? ???? ? ??????? ????????????????? ???? DROP COLUMN. ? ???? ?????? ??????? ?????? ??? ????.

 

??????? ????????? ?????? ? ??????? ????????????????? ???? DROP CONSTRAINT. ? ???? ?????? ??????? ?????? ??? ?????????? ???????, ????????? ?? ????????????????? ?????? CONSTRAINT.

 

??????????

 

?????? ???????? ??? ??????? ???????????? ????????? ????? ??? ????????.

 

?????????? CREATE INDEX ????? ???????????? ??? ?????????? ? ??????? ???????? ??? ?????????? ???????, ? ?????????? ALTER TABLE ? DROP ??? ???????? ???????, ?????????? ? ??????? ?????????? ALTER TABLE ??? CREATE INDEX.

 

??????????? ????????????? ??????????? NOT NULL ??? ?????????? ????, ? ????? ?????? ???????????? ??????????? CONSTRAINT, ???????????? ? ?????????? ???? ??? ? ???????????? ??????????? CONSTRAINT. ??????????? NOT NULL ????? ???????? ?? ???? ?????? ???? ???, ? ????????? ?????? ????????? ?????? ??????????.

 

? ????????? ??????? ? ??????? <??????????> ??????????? ???? <?????>, ??????? ???????? ???:

 

ALTER TABLE ?????????? ADD COLUMN ????? CURRENCY;

 

? ????????? ??????? ???? <?????> ????????? ?? ??????? <??????????>:

 

ALTER TABLE ?????????? DROP COLUMN ?????;

 

? ????????? ??????? ?? ??????? <??????> ????????? ???????????? ??????? ????:

 

ALTER TABLE ?????? DROP CONSTRAINT ????????????????;

 

? ????????? ??????? ??????? ???? ????? ??????????? ? ??????? <??????>:

 

ALTER TABLE ?????? ADD CONSTRAINT ???????????????? FOREIGN KEY (?????????????) REFERENCES ?????????? (?????????????);

 

???????? ??????????? ? ??????? ??????????? CONSTRAINT ??????? ?????????? ???????, ???? ??? ????? ??????????? ??? ???????????? ????????? ????? ?????????.

 

???????????

CONSTRAINT ???????????? ? ??????????? ALTER TABLE ? CREATE TABLE ??? ???????? ??? ???????? ????????. ?????????? ??? ???? ??????????? CONSTRAINT: ???? ??? ???????? ???????? ??????? (?? ?????? ????), ? ?????? ??? ???????? ?????????? ??????? (?? ?????????? ?????).

 

? ????????? ??????? ????????? ????? ??????? ? ????? ?????????? ??????:

 

CREATE TABLE ????????????? (??? TEXT, ??????? TEXT);

 

? ????????? ??????? ????????? ????? ??????? ? ????? ?????????? ?????? ? ????? ????? ????/???????. ?? ???? ???? ????? ????????? ?????????? ??????:

 

CREATE TABLE ????????????? (??? TEXT,

 

??????? TEXT, ???????????? DATETIME,

 

CONSTRAINT ????????? UNIQUE (???, ???????, ????????????));

 

? ????????? ??????? ????????? ????? ??????? ? ????? ?????????? ?????? ? ???????? ?????. ???? SSN ???????? ???????? ?????.

 

CREATE TABLE ????????????? (??? TEXT, ??????? TEXT, SSN INTEGER

 

CONSTRAINT ????????? PRIMARY KEY);

 

??????? ???????????? ??????? ?? ???? ?????? ??? ??????? ???????????? ?????? ?? ???????. ???? ???? ?????? Microsoft Jet ?? ???????????? ????????????? ?????????? DROP ??? ????? ?????? ?????????? ????? ??????????? ?????? (DDL) ?? ???????????? ????????????? ?????????? DROP ??? ????? ?????? ?????????? ????? ??????????? ?????? (DDL) ??? ??? ??????, ????????????? ?? ?????????? Microsoft Jet. ?????????? ?????? ???? ?????????? ????? Delete ???????? ??????? ? ?????? (DAO).

 

?????????:

 

DROP {TABLE ??????? | INDEX ?????? ON ???????}

 

??????? - ??? ???????, ??????? ??????? ??????? ??? ?? ??????? ??????? ??????? ??????.

 

?????? - ??? ???????, ?????????? ?? ???????.

 

?????? ??? ??????? ??????? ??? ??????? ?? ??? ??????, ?????????? ?? ???????. ????? ????, ??? ???????? ??????? ?? ??????? ????? ???????????? ?????????? ALTER TABLE. ??? ???????? ??????? ????? ???????????? ?????????? CREATE TABLE, ? ??? ???????? ??????? ?????????? CREATE INDEX ??? ALTER TABLE. ????? ???????? ???????, ????????? ?????????? ALTER TABLE.

 

? ????????? ??????? ?????? <?????????> ????????? ?? ??????? <??????????>:

 

DROP INDEX ????????? ON ??????????;

 

? ????????? ??????? ?? ???? ?????? ????????? ??????? <???????>:

 

DROP TABLE ???????;

 



?????????? ?????????? ???????????? ???????????, ????????????? ???? ??????

??? ???????? ???????????? ??????????? ??????? ???????????? ??? ?????????? 3-? ????????? ??????? ??????????.

 

 


??? ????? ??????? ?????????????? ?????????? ?????????? ??????? ?? ???? ???????????, ?.?. ?? ????????????? ???? ?? ?????. ??????????? ????? ???????? ???????? ?????? ?? ???, ?? ?????????? ?? ?? ????????????? ? ? ???????????? ????????? (???? ??? ?????? ???????????) ????????? ???? ??????????.

 

?? ???? ?????? ?????????? ??????????? ??????????, ????????????????? ? ?????? ??????, ???????????? ????????? ?????:

 

???? ?????? ? Connection ? Dataset ? DataSource ? ?????????? ??????????.

 

? ????????? ??????????? ????????? ??? ?????????? ????? ???? ?????? ? ????? ???, ????????, ????????? ?? ????????? ????????? ? ??????????, ?? ????? ????????? ???????? ??? ??.

 

Connection - ??????? ??? ??????????? ?? ???? ??.

 

Dataset - ??????? ??? ?????????? ???????? ? ??????????????? ??????? ?????? ?????????.

 

DataSource - ???????, ??????????????? ??? ?????????? ?????????? ????????? ? Dataset.

 

??? ??????, ? ???????? ??????????????? ??????????, ???????? ? Dataset. ?????????? ????????? ?????????? ??????? ?????? ? Dataset (????????, ? Access ? Dataset ????? ???????????? ??? ??????? ??? ?????? ???? ??????). ? ???????????? ? ???? ?????????? 2 ??????? ??????? ? ??????: ??????????? ? ????????????? ?????.

 

????????????? ?????? - ??? ??????, ??? ??????? ??? ??????? ??????????? ? Dataset. ??? ???? ???????? ?????? ? ??????? ??????, ?.?. ??? ?????? ???????? ? ??????????? ??????, ?????? ??? ??????????? ???????????? ?????? ??????. ? ?????? ????? ????????? ??????????????? ?????. ??????????? ?? ????? ??????? ?? ?????? ? ??????, ?? 2-? ??????? ???????????? ?????? ????????? ??????.

 

??????????? ?????? ??????? ?? ?????????? ?? ?? ?????? ??? ??????, ? ??????? ?????????? ????????????. ???????????? ? ?????????? ????? ??????? ?????????????? ????????????? ? ??????????? ?????????????? ???????: ?????????? ?????? ???????????? ???????????, ?????? ?????????? ???????????? ????????? ??????? ?? ?????? ? ????????.

 

?? ????????? ?????? ???????? ??????????? ????????? ????????? ???? ????????.

 

ODBC ODBC (Open Database Connectivity) - ??? ??????????? ???????, ??????????? ?????????? ? ????? ??. ??? ???? ????? ????? ??????????? ???????????? ???????? ODBC ??????????? ?? ?????? ????? ??????????? ? ???????? ??? ???? ???????.

 

 


??? ?????????????? ??, ?????????? ?? ????? ?? ??????????, ?????????????? ODBC, ???? ?????????????? ??????????? ????????????? ?????? ? ???? ????? ??, ??????? ???????????? ????????? ???? ????????????????.

 

??????????? ?? ODBC ?????????? ????????? ???????: ?????? ?????????? ? ????????????????? ? ???????? ?????? ODBC.

 

 

? ???????? ???????? ??????????? ??? ???? ??, ??? ??????? ??????? ??????? ODBC. ????? ????????? ????????? (Alias) ??, ?? ???????? ? ?????????? ???? ????????? ? ???? ???? (? Connection).

 

??? ??????????? ??????????? ?? ? ODBC ???????????? ????????? ????: ?????? ?????????? ? ????????????????? ? ???????? ?????? ODBC ? ???????????????? DSN ? ???????? ? ????? ???????? (?????????? ????????? ???????? ???????????????? ??). ????? ??????????? ???? ? ?? ? ?????????, ?? ???????? ??? ????? ????????????????.

 


?????? ? ?????? ?

Visual Basic 6.0

??? ??????????? ? ?????? ??????? ?? ??????????, ????? ?? ?????? ????????????

Toolbox ???? ???????? ??????????: ADO Data Control, DataGrid, DataCombo ? ????????? ??????. ? ????? VB 6.0 ???????? ??????????? ??? ??????? ? ?????? ???????? ADODC: ? ???? ???????? ? Connection, ? DataSet, ? Datasource. ??? ???????? ????????:

 

1.

ConnectionString - ?????? ??? ??????? ? ??. ??? ?????? ??????? ???????? ?????? ??????????? ???????????? ??????????????? ??????????? ??????

 

a.

Use Link FileUse ODBC Source - ??? ???? ?????????? ???? ?? ??????????? ??, ?????????????????? ?? ?????? ??????????.

 

b.

Use Connection String - ??? ??????? ????????????? ? ??. ??? ????? ?????????? ?????? ?? Build ? ????????? ??? ???????? ???????? (??? ??????????? ?? MS Access ??????? ???????? ???????? MS Jet 4.0).

 

?????? ???????? ????????????? ????????? ????????????? ? ??????? ???????, ? ?? ???????.

2.

RecourdSource - ????????, ? ??????? ???????????? ???????, ???????????? ? ADODC. ?????? ???????? ?????? ADODC ???????????? ?????? ? ????? ???????. ??? ???? ?????????? ??? ?????????? ?????? ??? ADODC:

 

a.

SQL ??????, ???????????? ?????? (?????????? ???????? ????? ???????).

 

b.

??????? ?? ??.

 

c.

???????? ????????? (Stored Procedure)

 

??? ??????????? ???????, ???????????? ?

ADODC, ???????????? ????????? ??????????? ??????????:

 

1.

Label. ? ??? ?????????? ???????? ?????????? ???? ??? ???????? ??????. ????????, ???????????? ??? ??????????? ??????:

 

a.

Data Source - ??? ??????????, ? ???????? ?????????? ?? (ADODC).

 

b.

Data Field - ??? ???? ?? ???????, ??????? ????? ???????????? ? ???????.

 

2.

Text. ????????? ???????? ?????????? ???? ? ????????????? ??? ??????????.

 

a.

Data Source - ??? ??????????, ? ???????? ?????????? ?? (ADODC).

 

b.

Data Field - ??? ???? ?? ???????, ??????? ????? ???????????? ? ????????? ????.

 

?????? ???? ???????? ? ????????

Text.

 


?????? ? ????????

??????????? ?? ??????? ????? ?????????????? ????????? ???????:

1.

? ??????? ??????????????? ?????? ?? ADODC.

 

2.

? ??????? ??????????? ????????? ??????? ???????????????? ??????:
Me.Adodc1.RecordSet.MoveNext - ??????????? ?? ????????? ??????.
Me.Adodc1.RecordSet.MovePreview - ??????????? ?? ?????????? ??????.
Me.Adodc1.RecordSet.MoveLast - ??????????? ?? ????????? ??????.
Me.Adodc1.RecordSet.MoveFirst - ??????????? ?? ?????? ??????.
Me.Adodc1.RecordSet.EOF -????? true,???? ??????? ?????? ????????? ????? ?????????.
Me.Adodc1.RecordSet.BOF - ????? true,???? ??????? ?????? ????????? ????? ??????.

 

?????????? ?????? ?????????????? ???????? Me.Adodc1.RecordSet.AddNew. ??? ???? ?????? ??????????? ?????? ? Dataset ??????????, ? ?? ? ???? ??. ??? ???? ????? ?????????? ? ???? ???????? ??????, ?????????? ?????? ????????? ???????????: Me.Adodc1.RecordSet.Fields("????????????") = ????????;

 

????? ??????? ????????? ? ??, ?????????? ????????? ????????? ???????:

 

Me.Adodc1.RecordSet.Update - ?????????? ?? ????????? ????? ??.

 

Me.Adodc1.RecordSet.UpdateBach - ????????? ???????? ? ??.

 

Me.Adodc1.RecordSet.Refresh - ???????????? ??.

 

Me.Adodc1.RecordSet.ReQuery - ??????????????? ??????, ?????? ????????? ??????, ???? ????? ???????? ? ????????.

 

??? ??????????? ??????? ?? ??????? ?? ?????????? ??????????? ????????? DataGrid. ?????????? ??? ? ADODC ????? ? ??????? ???????? DataSource. ??? ????????? DataGrid ??????? ???????????? ?????????? ???? Properties, ??????? ?????????? ?? ???????????? ???? ????? ????????. ?????????????? ??????? ?????????? ?? ??????? Columns, ??? ????? ?????????? ????????? ???????? ? ????????? ? ??? ?????? ?? ???????. ??? ?????????? ??? ???????? ??????? ?????????? ? ??????????? ???? ??????? Edit, ? ????? ??????? ??????????? ???? ??? ??? ? ?????? ?? ?????? Append( ??? Insert) ??? ?????????? ????? ????????, Delete - ??? ?? ????????.

 

?????????? ??????? ?????????????? ? ?????????? ADODC. ??? ??????????? ???????????? ?????????? ?????????? ??????? (??? ??????? ?? ????????? ???????) ?????????? ???????????? ??????? DataGrid HeadClick. ? ??????????? ????? ??????? ?????????? ?????????:

 

Me.Adodc1.RecordSet.Sort = "???????? ????"

 

????? ? ?????????? ??????????? ?????? ? ?? ???????????? ???? ?? ???????. ? VB 6.0 ???? ????????? ?????????? DataCombo ??? ?????? ? ADO. ???????? ???????? ????? ??????????:

 

1.

RowSource - ???????? ?????? ??? ?????? ?? ????? (ADODC).

 

2.

ListField - ??? ???? ?? RowSource, ??????? ????? ???????????? ?? ??????.

 

3.

DataSource - ???????? ??????, ? ??????? ????? ????????????? ?????? (ADODC).

 

4.

DataField - ???? ?? DataSource, ? ??????? ????? ???????????? ????????? ????????.

 

5.

BoundColumn - ???? ?? RowSource, ??????? ????? ???????????? ? DataSource.

 

??? ?????????? ?????? ???????????? ??????????????? ???????? ADODC:

 

Me.Adodc1.RecordSet.Filter = "??????? ???????"

 


?????? ?

VB 6.0

??? ????????????? ??????? ?????????? ?????????? ????????? ????????:

1.

?????????? ????????? DataEnvironment: Project ? Add DataEnvironment. ???? ????? ?????? ???? ??? ? ??????, ?? ????? ??????? ????? Components, ??????? Designers ? ???????? ?????????? DataEnvironment ? DataReport. ???? ??? ?????????? ??????????? ? ?????, ?? ?????????? ???????? ?? ? ?????? ???? References. ????? ?????????? ???????? Connection (??? ???????????? ????????????) ? ?????????? ? ???? ?? ? ??????? ??????????? ???? Properties ?? ???????????? ????. ????? ? ???? Connection ??????????? ??????? Command, ? ???????? ???????????? ??????? ??? ??????, ?? ??????? ????? ??????? ?????.

 

2.

?????????? ????????? DataReport, ??????? ???????????? ????? ??????????????? ?????. ? ????????? ????? ?????? ??????????? DataSource (? ????? ?????? ??? DataEnvironment) ? DataMember (??? Command, ????????? ?????). ???????? ???? ??????:

 

a.

????????? ????????,

 

b.

????????? ????????,

 

c.

????????? ?????,

 

d.

?????????? ?????? - ??????? ??????,

 

e.

??????????,

 

f.

??????? ??????????? ???????? ????? ????????? ??????, ??????? ?????? ??????, ?????????? ?????? ??? ???????? ???????????.

 

??? ?????????? ?????? ? ???? ?????? ???????????? ????????? Text, ? ????????? (DataField) ???????? ??????????? ????, ??????? ????? ? ??? ????????????. ????? ???? ?????? ? VB 6 ????????? ??????????? ????, ????????????? ? ??????????? (????????? Function). ? ??? ??????????? ???? (DataField), ?? ???????? ???????????? ??????????, ? ??? ????????????? (???????? FunctionType). ??? ???????? ??????????? ?????????? ? DataEnvironment ? Command ???????? Children Command, ? ??????? ??????????? ?????? ???????????.

 


?????? ? ?????? ?

C++ Builder

??? ??????????? ??????? ? ?????? ?

C++ Builder ???????????? ????????? DataModule - ????????? ????? ??????? ? ??????, ?? ??????? ????????????? ???????? ?????????? ?????? ? ??. ?? ?????????? ? ?????? ?????????????? ????????? ???????: File ? New ? DataModule. ? C++ Builder ??????? ????????? ??????? ? ????????????, ???????????????? ??? ?????? ? ???????. ????? ?? ??? ???????? Data Access, ???????? ?????????? ??????? ????????? ????:

 

1.

DataSource ???????????? ???????????? ?????? ??????? ? ??????????? ????????????. ???? ????????? ????????????? ?? ????? ?????? ? Grid.

 

2.

ClientDataSet ???????????? ??? ?????? ? ?????????? ??. ??? ???????? ????????: ??? ??????????/?????????-??????? ? ??? ??????????, ?????????? ??????. ? ?????? ?????? ????????? ? ????????? ?????????????? ????? IP-????? ?????????? ? ??? ??????????.

 

3.

DataSetProvider - ????????? ?? ???????, ??????? ???????????? ?????? ?? ???????? ?????????? ???????? ? ??.

 

4.

XML Transformer - ??????????? ????? ?????? ? XML ?????.

 

?? ???????

ADO ??????????? ???????? ??????????, ???????????? ??? ??????? ? ??.

 

1.

ADO Connection - ???????????? ??? ??????????? ? ??. ??? ?????????? ??????????? ? Data Module. ???????? ????????:

 

a.

ConnectionString - ????? ??????? ? ??. ??????????? ?????????????? ?????????? ????????????? ????????. ??? ???? ????? ??????????? ??????????? ? ??, ????????????? ? ????? ???????? ? ????????, ?????????? ??????? ?????? ???? ? ????? ? ???????? ?????? ??? ????????.

 

b.

Connected - ????????? ?????????? ?????????? ? ?? ? ????????? ?? ???.

 

c.

LoginPrompt - ??????????? ?? ??? ??????????? ? ?? ????? ? ?????? ????????????.

 

2.

ADO Command - ???????????? ??? ?????????? SQL ?????? ??? ADO. ????????? ?????? (???????????), ?? ???????????? ?????? ??????. ???????? ????????:

 

a.

Command Text - ????? ???????.

 

 

b. Connection - ????????? ????? ADO Connection.

 

c.

Connection String - ?????? ??? ??????????? ???????.

 

d.

Parameters - ????????? ??? ???????.

 

3.

ADO DataSet - ??????? ?????????, ??????? ????????? ??????? ????? ??????.

 

4.

ADO Table - ???????, Dataset ??????? ?????? ??????. ???????? ??????: Connection, TableName - ??? ???????.

 

??? ??????????? ???????? ????????????????????? ?????????? ?? ?????????? ????? ?? ???? ????????????????? ??????????? ???????????

DataSource. ??? ????????? ??????????? ?? DataModule: ADO Connection, ADO Table.

 

??????????, ??? ???????, ? C++ Builder ???. ? ??? ????????? ??????????????? ???? ?? ????????? ?????????:

 

DataModule->AdoTable->IndexFieldNames = "???????".

 

???? ? ??????? ??? ???? ???????, ?? ???????????? ??? ???????:

 

DataModule->AdoTable->IndexName = "??????????".

 

??? ???????? ??????? ???????????? ??????????????? ???????? ADO Table:

 

DataModule->AdoTable->Filter ="??????? ???????".

 

DataModule->AdoTable->Filtered = true.

 

??????? ??????? ?????????? ??????? ? Access.

 

?????????? ?????????? ??? ?????? ? ?? ??????????? ?? ??????? DataControl.

 

???? ?? ??????? ????? ???? ????????? ? ????????? ADO Table. ??? ????? ?????????? ??????? Fields Editor ?? ???????????? ????. ? ??? ?????????? ???????? ??? ???????????? ????. ????? ???????? ????? ????, ? ????????? ???????? ??????? ??? Lookup.

 

KeyField - ????, ?????????? ???????? ? ???????? ???????, ???? ????? ????????????? ??????.

 

DataSet - ??? ADOTable, ?? ??????? ?????? ????? ????????? ?? ?????.

 

Lookup Keys - ???????? ???? ?? DataSet, ??????? ???????????? ? KeyField.

 

Result Field - ???? ?? DataSet, ??????? ????? ???????????? ?? ??????.

 

????? ??????? ???? ?? ???????, ?????????? ??????? ??????? ?????????? (???????? Active = false). ???? ?? ???? ?????????? ?????????, ?? ?? ????? (? DBGrid) ?????? ?????????? ?????? ?? ???????.

 


?????? ?

C++ Builder

?????????? ????????? ????????? ??? ???????? ??????? ?

C++ Builder. ???????? ??????? ? ????????????? ???????? ????????? QReport (Quick Report), ??????? ?????????? ?? ??????????? ??????? (QReport - ??????????? ??? ?????????? ??? ?????? ? ?????? ????? ???????). ????? ??????? ????? ??????????:

 

1.

??????? ?????.

 

2.

??????????? ?? ??? ???????? ??????, ??????? ??????????? ? ??????.

 

3.

??????????? ?? ??? ??????? QReport ? ?????????? ??? ? ????????? ??????. ??? ????? ?????????? ????????? ??????????????? include ????????? ? ???????????? ????? ????? ? ???????.

 

????? ?????????? ???????? ?????, ????? ????????? ????????? ???????:

 

Form->QuickReport1->Preview();

 

??? ???????????? ?????? ?????????? ?? ??? ??????????? ?????? QRBand. ?? ??? ?? ????????? (???????? BandType) - Title - ???????????? ??????? ??????. ??? ???? ????? ???????????? ?????? ??????? ??????, ?????????? ??????????? ??????????????? ?????????? ????? ? ???????? ?? ??? ? ???????????? ? ????? ??????.

 

 

Title - ????????? ??????.

 

 

Detail - ?????? ??????.

 

 

GroupFooter - ?????????? ??????.

 

 

Summary - ?????????? ??????.

 

 

SubDetail - ?????????? ???????????.

 

??? ???????????? ?????? ?? ?????? Detail ????????????? ????????? DBText, ? ???????? ??????????????? ???????? DataSet (??????? ??? ??????, ?? ????????? ???????? ???????? ?????), DataField (????, ??????? ????? ???????????? ? ???? ????????). ??? ???????? ??????????? ????? ???????????? ????????? QRExpress, ? ???????? ??????????????? ???????? Expression. ????? ?????? ? ?????? ?????????? ??? ????????? ?????????? ? ??, ????? ?????? ??? ??? ???????? ?????? ????????????? ?????? ? ??? ????????? (ADOTable ??? ADOQuery):

 

AdoTable->Open();

 

:

 

AdoTable->Close();

 

??? ??????????? ?????? ? ?????? ???????????? ??????? QRGroup.

 


???????? ?????????????? ??????????

?????????? ??????-?????? ? ????????? ??? ?????? ???????? ????????? ???????:

 


?????? ?????????? ???????????? ??? ???????? ? ?????? ?????????????? ????????.

 

?????? ?? - ??? ?????????, ??????? ?????????? ?????????, ?????????????? ?????? ? ????????????? ??????? ?? ??????? ??? ?????????? ?????????. ??? ??????????? ???????????, ????????????? ????, ??????????? ?? 2 ?????: ????????? ? ??????????.

 

?????????? 2 ???????? ?? ??????????????:

 

1.

? ???????????? ??;

 

2.

? ??????????? ??.

 

??? ???????? ?????????? ?????????? ??????????:

1.

???????? ? ?????? ????????? Remote Data Module (File ? New ? Other, ??????? Multitier).

 

2.

??????????? ??????????? ??????????, ??? ? ???????????????????? ?????????? (ADOConnection, ADOTable).

 

3.

? ???? ?????? ???????? ????????? DataSetProvider ? ??????? DataAccess, ??????? ?????????? ?????? ?????????? ??????????? (?? ?????? ADOTable). ?????? ?????? ???? ??????????????? ?? ??????????. ??? ????? ???? ? ???? Run ? Parameters ? ???? Parameters ?????? /regserver.

 

4.

??????? ?????, ?????????? ??????????.

 

a.

???????? DataModule

 

b.

?? ??????? DataSnap ???????? DCOMConnection, ??????? ????????????? ????? ? ????? ???????? ??????????, ?????????????????? ?? ?????????? COM ?? ?????? ??????????. ???????? ServerName - ??? ??????? ??? ?????, Server GUID - ? ??????????????????? ??????? ?? ??????????.

 

c.

????? ????????? ?? ?????? ??????, ???? ? ??????? DataAccess ???????? ????????? Client DataSet.

 

 

i. ???????? Remote Server - ??????? Connection.

 

 

ii. ???????? Provider Name - ??? ??????????, ??????? ????????? ?? ??????? - ???????.

 

 

iii. ??? ?????? ????????? ? ??:
ClientDataSet->ApplyUpdates(?????????? ??????);

 

????? ???????? ??? ??????? (????? ????????, ????????? ??????), ?????? DCOMConnection ???? ???????????? SocketConnection ?? ??? ?? ???????. ???? ? ???????? ??????????? ? Borland/Builder/bin/scklsrvr.exe. ? ?????????? ???????? ?????? Borland Socket Server, ??????? ????????? ??????? ?????? ? ???????. ??? ??????????? ?? ??????? 1 ???.

 

?????????? Socket Connection - ?????????? ??????????? ???????????, ? ???????? ???????????? - ??????? ????????. ????? ????????? ???? ??????????, ???? ???????????? ????????? Web Connection, ? ???????? ????? ??????? ???????? URL-????? - localhost. ? ?????? ???????? ????? ????????? ????????? ?????????, ??????? ????????? ????? ? ???????? ???.

 

 

Fill

 


?????? ? ?????? ? C# (Visual Studio 2005)

 


Data Adapter ???????? ????????? ????? ????? Dataset ? Connection. ? Dataset ?? ?????? ??????????? ?????? Fill - ????????? ??????, Update - ???????? ?????????. ? ?????? ?????? ????????? ?????? ?????? (Error Collection). Data Adapter ???????? ? Connection ? ??????? ???????????? ??????. ??????? ?????????????? ? ?? (Command) ????? ????????? ??? ???????, ??? ? ?????????????.

 

??? ??????????? ? ?????? ??????? ?? ??????????:

 

1. ???????? ? ?????? ??????? ????????? DataSet.

2. ??????? ??? ? ??????? ??????? ? ????????? ????? ??. ???? ??? ???? ???? ????????? ?????, ?? ? ???? ?????????? ?????? ????????? ????? ??????.

3. ?? ????? ?? ??????? Data ?????? Toolbox ???????? ??????????: Dataset, BindingSource, DataGrid, BindingNavigator (??? ????????? ???????? ??????????? ????????????).

a. ??? ?????????? Dataset ? ??????? ?????????? ??????? ????? Types Dataset, ??????? ????????? ???????? Dataset'?.

b. ? ???????? BindingSource ?????????? ??????? ? ???????? Data Source ?????? ??? Dataset, ??????? ?????????? ?? ????? ????? ? ???? ???????????. ? ???? DataMember ????? ??????? ??? ???????, ????????? ? ???? ???????????. ???? ??? ??????? ?????, ?? ? ?????? ????????? ??????????? ?????? ????????? TableAdapter.

c. ? DataGrid ????? ???????? Data Source ?????????? BindingSource (???????? ????????? ???????? ???????). ? ?????????? BindingNavigator ?????????? ?????????? ???????? BindingSource ?? ??????????????? ????????? ?????.

??????? TableAdapter ???????????? ??? ?????????? dataset ????? ? ??????? ??????? Fill, ? ????? ??? ?????????? ????? ?????? ?????? ? ?? (??????? TablAdapter.Update(dataset1)). ????? ???? ? ??????? ????? ?????????? ????? ????????? ??????? ??? ?????????? ??????? (TablAdapter.Insert(:)) ? ?? ???????? (TablAdapter.Delete(:)).

 

??? ???????? ??? ???????? ? ????????? ?????????? ????? BindingSource:

 

1. ??????????: BindingSource.Sort ="???? ???????" asc/desc - ?? ???????????/????????.

2. ??????????: BindingSource.Filter = "??????? ???????".

3. ????????? ??????? ??????:
DataRowView row;
row = ((DatarowView)BindingSource.Current).Row;
row.Item("???????? ????");

4. ??????????? ?? ???????: BindingSource.MoveNext, :

5. ????????? ?????? ? ??:
BindingSource.EndEdit();
tableAdapter.Update(this.DataSet);

??? ???????? ???? ?? ??????? ? DataGrid ?????????? ????? ? ????? ??????? ?????????????? ??????? (Edit Columns). ????? ???????? ?????, ??????????? ????, ??? - ???? ?? ???????. ??????? ???????? ?? ??????? Data (? ?????????? ComboBox): DataProperty Name - ????, ?????????? ???????? ? ???????? ???????, ???? ????? ????????????? ??????, Data Source - ??? BindingSource, ?? ???????? ?????? ????? ????????? ?? ?????, Display Member - ???? ?? Data Source, ??????? ????? ???????????? ?? ??????,Value Member - ???????? ???? ?? DataSet, ??????? ???????????? ? Data Property Name.


???????? ???????

1. ???????? ? ?????? ????? ?????.

2. ?????????? ?? ??? ????????? ReportViewer ?? ??????? Data.

3. ? ?????? ReportViewer Tasks ????? ???????? ??????? "design a new report".

4. ? ??????????? ???? ?????????????? ?????? (???? *.rdlc) ???????? ??????? Table ??? ???????? ???????? ??????. ? ?????? ?????? ? ??????? ???????????????? ???????? ????????? ???? ?? ?????? DataSet.

5. ????????? Table ??????? ?? ???? ??????: ????????? (??????? ?????), ??????? ?????? (??????? ?????) ? ?????????? (?????? ?????). ??? ?????????? ????? ?????????? ?? ???? DataSource ???? ??????????????? ??????? ? ?????? ??????? ??????. ? ?????????? ???????? ????????? ????? ?? ???? ???? ? ??????????????? ??????????.



OLAP ??????????. XML ????

OLAP (online analytical processing) - ??? ??????????, ??????? ????????? ???????? ?? ?? ????????????? ?????????? ??? ?????????????, ?? ???????? ? ?????????? ??????????? ??, ? ?????? ??????? ??? ???????. ?????????? ??????? ???????, ??????? ???????? ?? OLAP-??????????. ???? ?????????? ? ???????, ?? ??? ?????????? ???? ??????? ? 93 ?., ? ?? ???? ??????????? ? ?????????:

1. ??????????????? ????? ?????????? ?? ??.

2. ?????????? ?????????????? ????????? ? ?????????????? ??????.

3. ???????? ??????????? ????? ?? ????????? ???????.

? ???????????? ? ???? ?????????? 3 ?????: ????????? ??????, ?????????? ?????? ? ?????, ?????????????? ????????????? ??????????? ???????? ? ??????. ? ????????? ?????? ?????????? ????????? ??????? ????????????? ??????, ??????? ???????? ? ????:

1. ????????? ?????? (????????????????? ?????? ??????).

2. ??????????? ? ????????????? ?????????.

3. ???????????????? ?????? ??????.

OLAP ?????????? ??????? ???????????? ?????? ?? ??????? ??, ??????????, ? ????????, ?? ??????-????????? ????????. ????? ?? ??????, ???????????? ??? ?????????? ???????? MS SQL Server.

 

????? ?????? - ??? ?????????-???????????????, ???????????????, ????????????, ?????????????? ?????????? ?????? ??????, ?????????????? ? ????? ????????? ?????????? ? ?????????? ????????? ? ???? ??????? ? ????????????? ????????? ??????, ??????? ???????????? ?????????? ? ?????????? ??????????? ???????????, ??????????? ??? ???????? ???????.

 

?????????-??????????????? ??????? - ??? ???????, ? ??????? ?????? ?????????? ? ?????????, ?????? ??? ??????????? ? ???????????? ? ????????, ??????? ??? ?????????, ? ?? ???????????, ??????? ?? ??????????.

 

???????? ?? ???????. ????????? ?????? ????? ????????????? ??? ???????????? "????????????" ??????, ??? ????????? ???????????? ?? ?? ????? ?????? ???????.

 

????????????. ????? ???? ??? ? ?????????, ?????? ?? ?????? ?????? ??????????.

 

???????????? ????????????? ???????? ??????:

 

1. ????????? ?????? ?????????? ?? ???? ????????? ???????? ???????.

2. ? ???????? ???????? ?????????????? ?????? ??????????? ?? ????? "?????????? ? ?????? ??". ??? ???? ???????????? ?????? ???????????, ??????? ???????? ??? ? ????? ???????? ?????????.

3. ?????? ??? ????????? ? ????????? ??????????? ?? ??????????? ?????????? ?? ???????????? ???????????? ? ??????????.

4. ????????? ?????? ????????? ???????? ?????? ?????????? ?????? ?? ???? ??????????:

a. ?????? ????????? ?????? ?? ?????? ?? ?????? ???????????? ??????.

b. ????????? ?????? ?????? ????????? ?????????? ?????? ? ??????? ???????????? ????????.

5. ????????? ?????? - ??? ?????? ??? ???????? OLAP ??????.

???????? ????????? OLAP ??????:

1. MOLAP - Multi Dimensional OLAP.

2. ROLAP - ??????? ?? ????????, ??? ??????? ???????? ???????????? ??????, ?? ??? ???????? ??????????. ??? ????????? ????? ????? ????? ? ???? ?????? (?? ?? ???????). ? ?????????? ?????????? ?????????????? ? ????.

3. HOLAP - ????????? OLAP - ?????????? ?????? ????.

??????-????????? ???????

????? ?? ???????? ????????? ?????? ?????? ???? ???????? SQL Server, ??????? ??????? ? ?????? ??????? ?? ??????? ? ?????????? ? ??? ?? ????? ? ??????????.

 

???????? ????????? - ??? ??????????? ????? ?????? ?? ????? Transact SQL,?????????? ??????????????? ?? ??????? ? ?????????????? ????? ??????????????? ?????? ??.

 

????????????? (View) - ??? ??????????? ???????, ??????????????? ?????? ?? ????? ??? ?????????? ???????? ??????. ??? ???????? View ?? ??????????? ???????????? ???????? Union. ??? ?? ???????? ???????????? ??????????? ???????? Create View. ????????????? ??????????????? ????? ?????????? ????????? ? ??????? ??????????????.

 

Create View ???

 

As Select :

 

?????? - ????????, ??????????? ???????????? ?????? ??? ?????? ???????????? ?????? ????????, ?? ????????? ????????? ???????? SQL (??????? ???????, ??????, ? ??????? ????? ????????????, ???????? ?????? ? ???????? ???????? ?? ?????).

 

??????? (Trigger) - ??? ???????? ?????????, ??????? ??????????? ? ??? ???????, ????? ???????????? ???????? ????????, ????????, ??????? ??? ?????????????? ??????. ???????????? ??? ?????????? ???????? ??????????? ?????? ? ??????-??????. ??? ?????? ????????????? ? ??????? (????????? ??. ????).

 

Rule - ??????? (???????), ??????? ????????? ? ?? ? ????????????? ? ?? ????????????? ????.

 

?????????? - ???????????????? ????? ?????? SQL, ?????????? ????????? ??????????? ????, ??????? ??????????? ??? ?????? ?????. ? ??? ????? ???? ???????? ?? 1 ?? ????????? ??????. ? ????? ??? ??????? ?? ?????????? ??????? ????????: Begin Transaction, End Transaction, Commit, Rollback. ???? ?? ????? ?????????? ?????????? ?????????? ????, ????????? ?????? ????????? ???????? ? ?????? ?????????? (Rollback).

 


SQL Server

??? ???????? ????? ????: ???????? ? New Database. ??? ??????? ? ???????? ? ??? ???????? ?? ???????, ? ??? ????? ?????????? ? ????????? ??????. ? ???? ??????? ?????? ???????????? Transact SQL, ??????? ????????? ? ???? ????????????? ? ???????????? ????? ????????????????.

 

Create Procedure a1 as

 

Select :

 

??? ?????????? ???????? ???????? ?????????? ??????? ? ????????? Query Analyzer. ??? ??????? ????????? ? ??????????? ??????????:

 

Open :

 

Select select_list :- ?????? ????? ?? ???????, ?????????????.

 

IdentityCol - ????????? ????????????? ???????? ? ????????? ??????? ??????? ???????, ???? ?? ???? ??? ?????.

 

RowGuidCol - ?????? ????? ???????????? ????????????? ????????????? ? ???????? ???? (?? ????? ?????????????? ? ?????? ?????? ???????).

 

Into new_table - ??? ????????? ??????????? ??????? ? ????????? ????????? ???????.

 

Batch - ?????????????????? ?????????? TSQL, ???????????? ?? ?????????? ? ??????????? ??????, ??? ?????? ?????.

 

Begin {SQL statement|block } End - ?????????? ????

 

GOTO label - ??????????? ??????? ? ?????.

 

If : else - ???????? ????????.

 

Wait for - ???????? ????????????? ???????.

 

While - ???????? ???????? ? ????????????.

 

: break - ????? ?? ?????.

 

: continue - ????????? ??? ?????.

 

/**/, -- - ??????????? ?????????????????? ?????? ??????.

 

Declare - ?????????? ??????????.

 

Print - ????? ???????? ?? ?????.

 

???????? ???????

 

?????????:

 

Declare ??? [Insensitive][Scroll] Cursor FOR

 

Select : FOR {Read Only} Update{of column}

 

Open ???_??????? - ??? ???? ?????? ??????????? ? ??????.

 

??????? ?????? - ??????????? ?? ???????.

 

Fetch [[Next | Prior | First | Last | Absolute n | Relative n] from] Cursor ??? [Into @var1, @var2]

 

Relative - ???????? n-? ?????? ???????????? ???????. ????? ???????????? ?????, ?????????? ????????? ????? Scroll. ?????????? @@Fetch_Status ?????????? ????????? ?????????? Fetch.

 

-1 - ?????? ?????????.

 

-2 - ??????? ?????? ?? ???????? ?????? ?????????.

 

??????:

 

Declare @name (40)

 

Declare ct Cursor for Select Name From People

 

Open ct

 

While 1=1 Begin

 

Fetch next From ct Into @name

 

If @@Fetch_status=-1 break

 

Print @name

 

End

 

Allocate ct

 


???????

??????? - ????????????? ???????? ?????????, ?????????? ??????? ??????????? ???????????? ???????????? ??????? ?????? ??????????? ??.

1. ?????? ??????? ????????????? ? ?????????? ???????.

2. ??? ?????????? ????????? ??????????? ?????? ??????????????? ??? ???? ??????????.

3. ??????? ????????? ?????? ?????????? ??. ? ???????? ???? ??????? "??????????? ????????".

?????????:

Create trigger ???_????????

 

Before|After <?????????? ???????> - ?? ??? ????? ????????????? ???????

 

On <??? ???????>

 

[Referencing <?????? ?????? ??? ????? ???????????>]

 

[for each{row | statement}]

 

[when (??????? ????????)]

 

<???? ????????>

 

???? ????????? ??????? ?????????? ??????, ?? ????? ??????? ????? ?????, ? ??????? ???????? ???? ???????.

 

?????????? ????????, ?????????? ??? ?????? ?????? - For each Row - ??? ?????? ??????; Statement - ?????? 1 ??? ??? ????????????? ???????.

 

?????? ?????? ? ????? ??????????? ????????? ???????? ?????????? (????? ?????, ???????????? ? ?????????): ??????_?????????/?????_?????????.

 

(?????? ????????? ???????? ???????? ??? MySql ??????)

 

With Encryption - ? ?????????????? ???????????.

 

? SQL Server ?????????? 2 ?????????:

 

1. After - ??????? ??????????? ????? ????????? ?????????? ????????? ??? ??????.

2. Instead of - ??????? ?????????? ?????? ?????????? ??????.

?????????? 3 ???? ?????????:

1. Insert Trigger - ??????????? ??? ??????? ??????? ? ??????? Insert.

2. Update Trigger - ??? ??????? ????????? ?????? ???????? Update.

3. Delete Trigger - ??? ??????? ?????????? ??????? Delete.

?????? ???????? ?? ??????????? ????????, ??????? ?? ????? ???? ????????????? ? ?????? ?????? ??????????:

1. ????????, ????????? ? ???????? ??.

2. ?????????????? ????????? ????? ?? ??? ??????? ??????????.


???????????????? ????????

??? ?????????? ?????? ?????????, ??????????, ??????? ?????? ??????? 2 ??????????? ???????: inserted ? deleted. ????????? ?????? ?????????? ???????, ? ??????? ?????????? ???????. ? ??????????? ?? ??????? ?? ?????????? ??????????:

1. ??????? Insert - ??????? inserted ???????? ??? ??????, ??????? ?? ???????? ???????? ? ??????? (deleted - ??????).

2. ????? ?????????? ???????? ?????? ? ??????? inserted ?????????.

3. ??????? Delete - ? ??????? Deleted ?????????? ?????? ? ???????? (inserted - ??????).

4. ??????? Update - ? deleted - ?????? ???????? ?????; ? inserted - ????? ???????? ?????.

@@ROWCOUNT - ?????????? ?????????? ????? ? ??????? (Inserted ? Deleted).

 

?????? ?? ??????? ?? ??????? Insert:

 

Create Trigger ??????? <n>

 

On ?????? For Insert

 

As

 

If @@ROWCOUNT = 1

 

Begin

 

If not Exist {Select * From Inserted Where Inserted.?????????? <= ALL

 

(Select * From ?????, ?????? Where ???1 = ???2)}

 

Begin

 

RollBack Throw

 

Print "s"

 

End

 

End

 

???????, ? ????????, ????????????

 

1. ??? ????? ?????????????? ??????.

2. ??? ?????? ??????? ?????????.

3. ??? ????????? ??????????? ?????? ? ????? ?????? ?????? ?????????.


XML

???? SGML - ????????, ?????????????? ??? ???????? ?????? ????????. ???? ???????? ????????? ??, ??? ????????????? ??????, ?????, ?????????? ?????? ??????? ???, ?????? ??????? ?????????????.

 

????? ?? ??????????? ????? ????? ???????? ???? HTML - ???? ??? ?????????? ???????? ?? ??????. ?? ?????????? ????????? ????????????? ????? ? ???? HTML ?????.

 

???? XML - ???? ???????? - ????????? ?????????? ????????? ?????? ? ???? ??????. ?? ????????????? ??????????? ????????? ?????-????????????? ???????. ??? ?????????????? ?? ? XML ???????????? ??????????? XML Parser, ??????? ????????? ???????????? ???? ? ?????? ?????????? ?????. ??? ??? XML ???????????? ????? ????????? ????, ?? ??? ?????????? ????? ??????????.

 

??? ?????????????? Access ???? ?????????? ???????: ???? ? ???????. ??????? ??? XML. ???????? ??????? (????? ??????) ????? ?????????? XML ????.

 

??????? XML ?? HTML:? XML ?????????????? ?????????? ?????.

 

 

Добавьтe Ваш комментарий

Ваше имя (псевдоним):
Ваш адрес почты:
Заголовок:
Комментарий:

??????????




????????

Внимание!!! Файл sape.php не обнаружен. Проверьте правильность установки кода Sape.


C???????? ?????????