Successfully reported this slideshow.

Database Tendency

1,763 views

Published on

Simple introduce the various database

Published in: Technology
  • Be the first to comment

Database Tendency

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

×