Database Tendency Changing is no-change rule Xiongwei He (Grandis)
Database Basic Not only the SQL but also more information: Data Dictionary – the guide to database (even errors for some DB) Database files: Data files: store data after check point Redo Log files: store the transaction and used for check point Rollback segment: store the data before the transaction commit Archive log: make Database can switch back to one date time Database Schema beside table and view Trigger Sequence Procedure – Reduce Client/Server Latency while NOT compatible for different database Database lock and queue support Database Latency/Throughput Update Latency/Throughput Read Latency/Throughput Replication Latency/Throughput Checkpoint – log switch
Transaction basic Auto Commit Mode and Transaction Mode Auto Commit Mode:  Need rollback segment in one SQL Transaction mode (Transaction information hold in Rollback Segment, Huge transaction need huge rollback segment) 2PC by XA or Database itself Transaction Isolation levels SERIALIZABLE: Prevent Change for Your Query Data and Query Range REPEATABLE READ: Prevent Change for You Query Data but allow Insert for your Query Range READ COMMITED: In a transaction, one same SQL may return different data READ UNCOMMITED: One transaction may see uncommitted changes made by some other transaction.
Data Safety on 1 Node and 2 Node Replication Node Safety Durable Commit (Data Safety) Non-Durable Commit (Fast Performance) Shared Disk– Oracle RAC/Sybase Clustering 2 Node Replication Data Safety (Share Nothing) 2-Safe Durable: 1 transaction will wait all the transaction commit to disk of Node1 and Node2 2-Safe Commit: 1 transaction will wait all the transaction commit to system of Node1 and Node2 2-Safe Received: For transaction issued on Node1, Node1 commit transaction after it receive the msg from Node2 that Node2 already received the replication log 1-Safe: Node1 transaction commit does not depend on log replication to Node2
Database node redundancy Two node redundancy mode Database Active/Standby 1 way replication 2-Phase commit Database Active/Active 2-Way Replication Way (Possible conflict), two variations Application control switch over to make DB Active/Standby (Less conflict) Application control to make traffic on LAN only 2-Phase Commit, following is one variations Data are partitioned for fast transaction (MYSQL Cluster) Database Readwrite/Read three nodes redundancy mode: Use one type or mix four nodes redundancy mode: Mix of above technologies
Understanding TPC TPC – Transaction Processing Performance Council  http://www.tpc.org/   Three variables TPC-C: OLTP Focus TPC-H: Decision Support System TPC-E: simulates the OLTP workload of a brokerage firm TPC-C and TPC-E are led by Oracle/IBM/Microsoft Beside Sybase IQ, TPC-H has newcomer like Kickfire/EXASOL/ParAccel
Main Commercial Vendors Oracle – Database/Application/Java Giant IBM – SolidDB for strategy Microsoft SQL Server – Booming SAP (buy Sybase with In-Memory Support and Data warehousing Support) All the vendors play in memory gaming by purchasing or self-development except Microsoft
Oracle Products Oracle 11g – Rich Feature Set, (RAC + Data Guard) TimesTen – Standalone DB:11g released – Oracle user friendly which support nearly all the interfaces of Oracle Cache Version named as  Oracle In-Memory Cache  with full support to Oracle Berkeley DB – Typical NoSQL DB MySQL – Open Source Database Leader MySQL Cluster – NDB Engine with In Memory Support Oracle Linux Support: Unbreakable Linux which just copy Redhat Enterprise Server Code
IBM DB2  DB2 V10 z/OS Beta Version Support almost every OS including IBM Legacy.  More friendly to DSS (Decision Support System such as Data Warehousing, Mining) Informix – OLTP Specialist solidDB – to compete with TimesTen Standalone as DB (Active RW/Active R support) Universal Cache version to support DB2, Informix, Oracle, Sybase and Microsoft SQL Server while TimesTen cache only support Oracle
Microsoft Microsoft SQL Server Only limited to Microsoft Windows No In-Memory Version Good interface and good function Function option is NOT expensive as Oracle and DB2 such as OLAP and Data Warehousing Support, Data Mirror
SAP Sybase Adaptive Server  In Memory Option in 15.5 (In-Memory/Relaxed-Durability), developed in-house instead of buy-out strategies of Oracle/IBM Cluster Edition in 15.5 (Shared Disk like Oracle RAC) Sybase SQL Anywhere Small for Application Insider Bi-directional Sync with Sybase Adaptive Server, Oracle, Microsoft SQL Server, IBM DB2 Sybase IQ Data Warehousing Engine SAP MaxDB – Target SAP application, liveCache function is cache solution in exclusive support to SAP Application
Big Four Defence to Open Source Developer Edition Express Version to attract the entry use Limited Features Limited OS Limited CPU/Disk/Memory Usage Database CPU Disk Memory OS Oracle Express 1 4G 1G Linux/Windows 32bit IBM DB2 Express-C 2 Unlimited 2G Various OS + x64 support MSSQL Express 1 4G 1G Windows 32bit + 64bit Sybase Express 1 5G 2G Linux 32bit
Open Source MySQL & MySQL Cluster PostgreSQL Database in Java Derby/Java DB HSQLDB H2
MySQL MySQL – Support 3 rd  storage engine, key difference from other products MySQL Cluster – Storage Engine is NDB (originally from Ericsson) for In-Memory database in computer cluster support.  Good for Clustering Computing Environment such as ATCA Provide advance architecture support for distributed application LDAP support Two version MySQL Enterprise Server – commercial license needed MySQL Community Server – free to use under GPL license Special Storage Engine  MySQL 5.1 w/ Kickfire database – Top 1 in Price-Performance 100G and 300G in TPC-H Result DB2I Engine to make MySQL interface for DB2 running on IBM i.
PostgreSQL PostgreSQL 9.0 Key Feature: Hot Standby + Streaming Replication which make it can compete with MySQL Async API PostgreSQL License – BSD Like license EnterpiseDB: based on PostgreSQL Oracle Friendly Interface Infinite Cache – Cache Blade with Compression Support
Database in Java Common Feature for Derby/H2/HSQL:  Very small and JDBC support embedded and client/server connection In-Memory Only Support Functionality can not compete with PostgreSQL and MySQL Derby – Provided in JDK as Java DB H2 – HA Option and Multi Version Concurrency Support HSQL  MVCS in HSQL 2.0 version (Beta) HSQL 1.8 is used by Open Office
NoSQL Please visit  http://nosql-database.org/   Typical Non-SQL Amazon SimpleDB Berkeley DB Object Databases like Versant (used for SNMP MIB management) Cassandra (Used by Facebook) HyperTable – High Performance Implementation for Google’s Bigtable
Alternative Reliability & Speed Reliability: DRBD – Mirroring Block by an assigned network Performance by Memcached Memcached for MySQL (MySQL Enterprise) pgmemcache for PostgreSQL

Database Tendency

  • 1.
    Database Tendency Changingis no-change rule Xiongwei He (Grandis)
  • 2.
    Database Basic Notonly the SQL but also more information: Data Dictionary – the guide to database (even errors for some DB) Database files: Data files: store data after check point Redo Log files: store the transaction and used for check point Rollback segment: store the data before the transaction commit Archive log: make Database can switch back to one date time Database Schema beside table and view Trigger Sequence Procedure – Reduce Client/Server Latency while NOT compatible for different database Database lock and queue support Database Latency/Throughput Update Latency/Throughput Read Latency/Throughput Replication Latency/Throughput Checkpoint – log switch
  • 3.
    Transaction basic AutoCommit Mode and Transaction Mode Auto Commit Mode: Need rollback segment in one SQL Transaction mode (Transaction information hold in Rollback Segment, Huge transaction need huge rollback segment) 2PC by XA or Database itself Transaction Isolation levels SERIALIZABLE: Prevent Change for Your Query Data and Query Range REPEATABLE READ: Prevent Change for You Query Data but allow Insert for your Query Range READ COMMITED: In a transaction, one same SQL may return different data READ UNCOMMITED: One transaction may see uncommitted changes made by some other transaction.
  • 4.
    Data Safety on1 Node and 2 Node Replication Node Safety Durable Commit (Data Safety) Non-Durable Commit (Fast Performance) Shared Disk– Oracle RAC/Sybase Clustering 2 Node Replication Data Safety (Share Nothing) 2-Safe Durable: 1 transaction will wait all the transaction commit to disk of Node1 and Node2 2-Safe Commit: 1 transaction will wait all the transaction commit to system of Node1 and Node2 2-Safe Received: For transaction issued on Node1, Node1 commit transaction after it receive the msg from Node2 that Node2 already received the replication log 1-Safe: Node1 transaction commit does not depend on log replication to Node2
  • 5.
    Database node redundancyTwo node redundancy mode Database Active/Standby 1 way replication 2-Phase commit Database Active/Active 2-Way Replication Way (Possible conflict), two variations Application control switch over to make DB Active/Standby (Less conflict) Application control to make traffic on LAN only 2-Phase Commit, following is one variations Data are partitioned for fast transaction (MYSQL Cluster) Database Readwrite/Read three nodes redundancy mode: Use one type or mix four nodes redundancy mode: Mix of above technologies
  • 6.
    Understanding TPC TPC– Transaction Processing Performance Council http://www.tpc.org/ Three variables TPC-C: OLTP Focus TPC-H: Decision Support System TPC-E: simulates the OLTP workload of a brokerage firm TPC-C and TPC-E are led by Oracle/IBM/Microsoft Beside Sybase IQ, TPC-H has newcomer like Kickfire/EXASOL/ParAccel
  • 7.
    Main Commercial VendorsOracle – Database/Application/Java Giant IBM – SolidDB for strategy Microsoft SQL Server – Booming SAP (buy Sybase with In-Memory Support and Data warehousing Support) All the vendors play in memory gaming by purchasing or self-development except Microsoft
  • 8.
    Oracle Products Oracle11g – Rich Feature Set, (RAC + Data Guard) TimesTen – Standalone DB:11g released – Oracle user friendly which support nearly all the interfaces of Oracle Cache Version named as Oracle In-Memory Cache with full support to Oracle Berkeley DB – Typical NoSQL DB MySQL – Open Source Database Leader MySQL Cluster – NDB Engine with In Memory Support Oracle Linux Support: Unbreakable Linux which just copy Redhat Enterprise Server Code
  • 9.
    IBM DB2 DB2 V10 z/OS Beta Version Support almost every OS including IBM Legacy. More friendly to DSS (Decision Support System such as Data Warehousing, Mining) Informix – OLTP Specialist solidDB – to compete with TimesTen Standalone as DB (Active RW/Active R support) Universal Cache version to support DB2, Informix, Oracle, Sybase and Microsoft SQL Server while TimesTen cache only support Oracle
  • 10.
    Microsoft Microsoft SQLServer Only limited to Microsoft Windows No In-Memory Version Good interface and good function Function option is NOT expensive as Oracle and DB2 such as OLAP and Data Warehousing Support, Data Mirror
  • 11.
    SAP Sybase AdaptiveServer In Memory Option in 15.5 (In-Memory/Relaxed-Durability), developed in-house instead of buy-out strategies of Oracle/IBM Cluster Edition in 15.5 (Shared Disk like Oracle RAC) Sybase SQL Anywhere Small for Application Insider Bi-directional Sync with Sybase Adaptive Server, Oracle, Microsoft SQL Server, IBM DB2 Sybase IQ Data Warehousing Engine SAP MaxDB – Target SAP application, liveCache function is cache solution in exclusive support to SAP Application
  • 12.
    Big Four Defenceto Open Source Developer Edition Express Version to attract the entry use Limited Features Limited OS Limited CPU/Disk/Memory Usage Database CPU Disk Memory OS Oracle Express 1 4G 1G Linux/Windows 32bit IBM DB2 Express-C 2 Unlimited 2G Various OS + x64 support MSSQL Express 1 4G 1G Windows 32bit + 64bit Sybase Express 1 5G 2G Linux 32bit
  • 13.
    Open Source MySQL& MySQL Cluster PostgreSQL Database in Java Derby/Java DB HSQLDB H2
  • 14.
    MySQL MySQL –Support 3 rd storage engine, key difference from other products MySQL Cluster – Storage Engine is NDB (originally from Ericsson) for In-Memory database in computer cluster support. Good for Clustering Computing Environment such as ATCA Provide advance architecture support for distributed application LDAP support Two version MySQL Enterprise Server – commercial license needed MySQL Community Server – free to use under GPL license Special Storage Engine MySQL 5.1 w/ Kickfire database – Top 1 in Price-Performance 100G and 300G in TPC-H Result DB2I Engine to make MySQL interface for DB2 running on IBM i.
  • 15.
    PostgreSQL PostgreSQL 9.0Key Feature: Hot Standby + Streaming Replication which make it can compete with MySQL Async API PostgreSQL License – BSD Like license EnterpiseDB: based on PostgreSQL Oracle Friendly Interface Infinite Cache – Cache Blade with Compression Support
  • 16.
    Database in JavaCommon Feature for Derby/H2/HSQL: Very small and JDBC support embedded and client/server connection In-Memory Only Support Functionality can not compete with PostgreSQL and MySQL Derby – Provided in JDK as Java DB H2 – HA Option and Multi Version Concurrency Support HSQL MVCS in HSQL 2.0 version (Beta) HSQL 1.8 is used by Open Office
  • 17.
    NoSQL Please visit http://nosql-database.org/ Typical Non-SQL Amazon SimpleDB Berkeley DB Object Databases like Versant (used for SNMP MIB management) Cassandra (Used by Facebook) HyperTable – High Performance Implementation for Google’s Bigtable
  • 18.
    Alternative Reliability &Speed Reliability: DRBD – Mirroring Block by an assigned network Performance by Memcached Memcached for MySQL (MySQL Enterprise) pgmemcache for PostgreSQL