ibm thursday - db2 for i update, trends and directions (cain) thursday - db2 for i update, trends...

Download IBM Thursday - DB2 for i Update, Trends and Directions (cain) Thursday - DB2 for i Update, Trends and...Update Trends and DirectionsUpdate, Trends and Directions ... i, Linux/Unix/Windows

Post on 29-Mar-2018

225 views

Category:

Documents

1 download

Embed Size (px)

TRANSCRIPT

  • DB2 f iDB2 for iUpdate Trends and DirectionsUpdate, Trends and DirectionsMike CainIBM DB2 f i C f E llIBM DB2 for i Center of ExcellenceRochester, MN USAmcain@us.ibm.com

    2008 IBM Corporation

  • DB2 Familyz/OS, i, Linux/Unix/Windows (LUW)

    Managing family compatibility Information Management Architecture Board SQL Language CouncilSQL Language Council

    Common design, algorithms, and code sharing where possible

    Two Types of Differences Short term differences based on different release dates and

    different customer priorities Long term differences based on Operating System differences Long term differences based on Operating System differences

    (Isolated to database configuration, management, and utilities)

    IBM DB2 Cross Platform Reference http://www.ibm.com/developerworks/db2/library/techarticle/db2co

    mmon/

    2008 IBM Corporation

  • DB2 for i How is it different from other DB2sDB2 for i How is it different from other DB2s

    Not a separate product integrated into System i

    Not a separate chargeNot a separate charge

    Release number is not the same

    Native and SQL InterfacesNative and SQL Interfaces

    Easier to use and maintain

    Management GUI is S stem i Na igatorManagement GUI is System i Navigator

    2008 IBM Corporation

  • DB2 for i Major Strengths

    Openness and standards Interoperability Performance

    l b l Scalability Security

    N ti l l t National language support Ease of use and management

    2008 IBM Corporation

  • An Open DatabaseAn Open Database

    ANS, ISO, FIPS, and JIS SQL StandardANS, ISO, FIPS, and JIS SQL StandardOpen Group - Distributed Relational Database ArchitectureOpen Group - XA Resource Manager APIs ANS and ISO SQL Call Level InterfaceANS d ISO SQL d E t l P d ANS and ISO SQL and External Procedures UCS-2, UTF-8, UTF-16 (Unicode - ISO 10646)ODBCJDBCOLE and ADO.NETUS Government C2 SecurityEuro Character support

    Oracle 10g

    ISO/ANS SQL Standard - Core

    Euro Character support...

    DB2 for z/OS

    Microsoft SQL Server 2005

    DB2 for i

    DB2 for LUW

    2008 IBM Corporation

    0 10 20 30 40 50 60 70 80 90

  • Interoperability DRDAp y

    DB2 for z/OS DB2 for z/O SDB2 for VM and VSEDB2 for VM and VSE

    DB2 for iDB2 for AIXDB2 for HP-UX DB2 for Sun SolarisDB2 for W indows

    DB2 for VM and VSEDB2 for iDB2 for AIXDB2 for HP-UX DB2 for Sun SolarisDB2 for W indowsDB2 f Li i

    DDM/DRDAP l

    DDM/DRDA P t lDB2 for Liniux

    Inform ix Txaction

    Attachm ateGrandview

    DB2 for Lin iux

    Server and Client

    ProtocolsProtocols

    HiT SoftwareMicrosoftOracleRocketStarQuestSybase/MDI

    FileTek, Inc.G randview P latinum Technology Inc. XDB System s

    W all DataXDB System s

    Oracle and Microsoft do not

    Application Server (Data)support DRDA as a Server

    2008 IBM Corporation

  • System i - Logical Partitioning (LPAR)System i Logical Partitioning (LPAR)

    DB2 for i DB2 for LinuxDB2 for i DB2 for AIX DB2 for Windows

    JDBC JDBC JDBC JDBCJDBCCLI

    DRDADDM

    JDBCODBCDRDA

    JDBCDRDA

    JDBCODBC

    OLE DB.NETDRDA

    Power Server

    LPAR LPAR LPAR LPAR IXS/IXA

    2008 IBM Corporation

  • DB2 for i: Strategy and GoalsDB2 for i: Strategy and Goals

    Preserve your development investments

    Get more out of the OS and DBMS

    Ease of use, ease of management

    Support data-centric programming and information pp p g gmanagement

    SQL is the strategic language and interface for DDL, DML and PSM

    SQL is the strategic language and interface

    2008 IBM Corporation

  • On the WebOn the Web

    DB2 for i Home Page http://www.ibm.com/systems/i/software/db2/

    System i Advantages http://www-1.ibm.com/systems/i/advantages/

    System i Access y http://www.ibm.com/systems/i/access/

    DB2 for i Java http://www.ibm.com/systems/i/software/db2/javadb2.html

    Education and PublicationsEducation and Publications http://www.ibm.com/systems/i/ - Click on Education

    http://publib.boulder.ibm.com/iseries/

    Newsgroups and Forums comp.databases.ibm-db2comp.databases.ibm db2 comp.sys.ibm.as400.misc groups

    Questions can be sent to: rchudb@us.ibm.com

    2008 IBM Corporation

  • DB2 for i 6.1 Enhancements

    2008 IBM Corporation

  • 6 1 SQL Enhancements 6.1 SQL Enhancements

    Queries Schema statements (DDL)Queries Grouping Sets and Super groups VALUES in FROM INSERT in FROM

    Schema statements (DDL) Decimal Float Expressions in Indexes ROW CHANGE TIMESTAMP

    Data Change statements (DML)E t d d I di t V i bl V l

    Full Outer Join Hidden Columns NCHAR, NVARCHAR, and NCLOB ALTER FUNCTION

    Ignore unsupported syntax Extended Indicator Variable Values Skip Locked Data

    S l F ti

    Ignore unsupported syntax SYSTOOLS/SYSIBMADM FOR EACH STATEMENT INSTEAD OF trigger

    Mi llScalar Functions TIMESTAMP_FORMAT and

    VARCHAR_FORMAT enhancements LOCATE function fix (PTF)

    Miscellaneous Statistics catalog views (V5R4 PTF) CLIENT special registers FOR BIT DATA and binary compatibility

    ENCRYPT_AES

    ASCII (UTF-8 result)

    MONTHS_BETWEEN, ROUND TIMESTAMP and

    FOR BIT DATA and binary compatibility Output parameter support for

    heterogeneous CALL BX literals

    2008 IBM Corporation

    ROUND_TIMESTAMP, and TRUNC_TIMESTAMP

  • GROUPING SETSGROUPING SETS

    Produce the result based on two different grouping sets of rows from the SALES table.

    SELECT WEEK(SALES_DATE) AS WEEK,DAYOFWEEK(SALES_DATE) AS DAY_WEEK,SALES_PERSON,SUM(SALES) AS UNITS SOLD

    Prior to this support you would have to run multiple queries

    SUM(SALES) AS UNITS_SOLDFROM SALESWHERE WEEK(SALES_DATE) = 13GROUP BY GROUPING SETS( (WEEK(SALES_DATE), SALES_PERSON),

    (DAYOFWEEK(SALES DATE) SALES PERSON) )

    CUBE and ROLLUP included in this support

    (DAYOFWEEK(SALES_DATE), SALES_PERSON) )ORDER BY WEEK, DAY_WEEK, SALES_PERSON

    The rows with WEEK 13 are from the first grouping set and the other rows are from the second grouping set.

    2008 IBM Corporation

  • VALUES in FROMVALUES in FROM

    Form the cross product of this table X with the SALES table. This add columns R1 and R2 to every row add columns R1 and R2 to every row.

    SELECT R1, R2, WEEK(SALES_DATE) AS WEEK, DAYOFWEEK(SALES DATE) AS DAY WEEK

    Equivalent to creating a temporary table, inserting rows, and then

    DAYOFWEEK(SALES_DATE) AS DAY_WEEK,MONTH(SALES_DATE) AS MONTH, REGION, SALES AS UNITS_SOLD

    FROM SALES ( VALUES(GROUP 1 GROUP 2) ) AS X (R1 R2)

    using the temporary table in the query

    FROM SALES, ( VALUES( GROUP 1 , GROUP 2 ) ) AS X (R1,R2)

    2008 IBM Corporation

  • INSERT in FROMINSERT in FROMInsert customer numbers into the new SALES table that has an identity column and return the

    generated values.

    CREATE TABLE SALES2 (SALES_ID INTEGER AS IDENTITY, SALES_DATE DATE DEFAULT CURRENT DATE, SALES_PERSON FOR COLUMN SALES00001 VARCHAR(15) ,

    No easy way to return generated values prior to this supportREGION VARCHAR(15),

    SALES INTEGER );

    SELECT *

    to this support

    FROM FINAL TABLE ( INSERT INTO SALES2 ( SALES_DATE, SALES_PERSON, REGION, SALES )SELECT * FROM SALES )

    ORDER BY INPUT SEQUENCE;

    2008 IBM Corporation

  • EXTENDED INDICATOR VALUESEXTENDED INDICATOR VALUES

    Get the next row in the transaction table for update and skip any rows that are currently locked.

    EXEC SQL DECLARE x CURSOR WITH EXTENDED INDICATORS FOR SELECT * FROM corpdata.transaction;

    EXEC SQL OPEN x; EXEC SQL FETCH INTO i d

    Prior to this support you would have to update all columns or would have to

    diff t UPDATEEXEC SQL FETCH x INTO :trans:inds; inds1 = -5; EXEC SQL UPDATE corpdata.transaction

    SET TRANSOPERATION t i d 1

    use a different UPDATE statement for every combination of columns you wanted to update.SET TRANSOPERATION = :top:inds1,

    CUSTOMERID = :cid:inds2, TRANSINFO = :top:inds3

    WHERE CURRENT OF x; EXEC SQL CLOSE x;

    y p

    Applies to UPDATE and INSERT VALUES, also allowed on PREPARE.EXEC SQL CLOSE x;

    Indicator Values Meaning0 Value is provided0 Value is provided-1, -2, -3, -4, and -6 Null value-5 Default value-7 Column is treated as if it had not been

    specified in the statement

    2008 IBM Corporation

    specified in the statement.

  • DECIMAL FLOATDECIMAL FLOAT

    New numeric data type with attributes of both decimal and floating point IEEE 754R

    CREATE TABLE mjatst.table1 (c1 DECFLOAT(16)

    New numeric data type ith t d dc1 DECFLOAT(16) ,

    c2 DECFLOAT(34) );with extended accuracy and performance.

    DECFLOAT(16) DECFLOAT(34)

    Guarantees 16 digits of precision Guarantees 34 digits of precisionGuarantees 16 digits of precision Guarantees 34 digits of precision

    8 bytes long 16 bytes long

    Exponent range 10-383 to 10384 Exponent range 10-6143 to 106144

    Infinity NaN SNaN special values Infinity NaN SNaN special values

    2008 IBM Corporation

  • Expressions and Selection in IndexesExpressions and Selection in Indexes

    CREATE INDEX mjatst index1 ON mjatst table1CREATE INDEX mjatst.index1 ON mjatst.table1(c1*c2) ;

    CREATE INDEX mjatst.index2 ON mjatst.table1(c1*c2)

    WHERE c1 > 14;

    SQL create index enhancements for key expressions and sparseexpressions and sparse indexes.

    SQE can use indexes with expressions butwith expressions, but does not provide support for spar

Recommended

View more >