Partager via


Что же вышло с СТР3 SQL Server 2008.

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

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

Change Data Capture (CDC)
??? ?????????, ??????? ?????????? ?????? ?? ??????????? ? ???? ?????? ( ?? ??????? Insert, Update, Delete) ? ?? ?????????? ????????????? ?????????? ?? ?????????? ? ?????????? «????????????» ???? – ? ???? ??????, ??? ??? ????????? ????????.

??????????? ?? ??? ????: Live Meeting 13.06.2007
Change Data Capture.

MERGERSQL
????? ??? T-SQL ???????, ??????? ????????? ???????? Insert, Update, Delete ?? ??????? ???????, ??????????? ?? ??????????? ??????????? (JOIN) ???? ??????? ? ??????? ???????? ??? ??????????????. ????????? ????????? ??????? ?????????? ??????? ?????? ? ??????? ? ?????????????? ??????? ??? ????????????? ? ????? ????????? ????????? ???????? ??? ??????????? ???????????. ????? ????????? ??????????? ??? ????????????? ??????? ???????? ??????, ??????? ??????????? ??????????? ????????? ? ??????? ??????? ???????, ??? ????? ?? ??????? ??????????? ???????.

 

??????????? ?? ??? ???? ????? ?????????? ?????: Live Meeting on 29.062007

??????:

SE AdventureWorks;

GO

MERGE Production.ProductInventory AS pi

USING (SELECT ProductID, SUM(OrderQty) FROM Sales.SalesOrderDetail sod

    JOIN Sales.SalesOrderHeader soh

    ON sod.SalesOrderID = soh.SalesOrderID

    AND soh.OrderDate = GETDATE()

    GROUP BY ProductID) AS src (ProductID, OrderQty)

ON (pi.ProductID = src.ProductID)

WHEN MATCHED AND pi.Quantity - src.OrderQty <> 0

    THEN UPDATE SET pi.Quantity = pi.Quantity - src.OrderQty

WHEN MATCHED AND pi.Quantity - src.OrderQty = 0

    THEN DELETE;

Star Join Query Optimizations
??? ???? ???????? ?????? ?? ??????? ???????? ??????. Star Join Query ????????? ???????? ?????????????????? ????? ?????????? ??????? ?????????? ???????. ??? ??????????? ???, ??? ??????????? ????? ??????????? ????????? «?????» ???????? ? ???????????? ?????? ????????. ??? ???? ??, ???, ????????, «?? ?????????????????» ?????? ??????? ????? «????????» ????????????? ?? ??????? ?????? ? ????? ?????? ?????.

???????????: Live Meeting 19.062007 Star Join Query Optimizations.

Table Value ????????? ? Table type ??????????
?? ?????? ???????? ?????????????? ????????? ???????? ?????????? ????????? ????? ??????? ???????? ?????????. ??? ??????? ?????? ???? ????? ???? ??????? ? T-SQL ??????????? ???????? ????? ??? ??????????: ?????????. ???? ??? ???????????? ????????????? ????????? ??????? ??? ????????? ? ???????? ????????? ??? ???????. ?? ? Table-Valued ???????? ????????? ??????????? ???????? ?????????? ????? ????????? ??? ???????.

??????????? ?? ??? ????: Live Meeting 22.06.2007
Table Value Parameters.

Declarative Management
????? ?????????? ??? ?????????? SQL Server Database Engine, ?????????? ?? ?????????. ????????? ??????? ????, ??? ???? ?????????? ????:

- ?????????? ?????????????? ???????? ?? ????????????? ??????????? ? ????????? ????????????. (????????, ??? ???????? ?????? ??????? – ?? ????????????? ??????? «??????????» ????????? ? ???????)

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

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

????: Sales, Product Name, Purchase Data.

????? ??????? ???? ? ??????? ?????? ? ???? CREATE TABLE, ?? ????????? ???? ??????? Product ID. ? ????? ???? GO.

? ??? ?? ???????? ????? ???????? ??????? ????? ???? ????? – ?? ????, ????. ?????? ?? ?????????.

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

???????????:Live Meeting 26.06.2007
Declarative Management Framework.