Tuesday, July 14, 2015

How to choose Database for your application

We are always wondering why or which database we use to build our application. Or more precise, what is the difference between various databases.
I am here taking example of DB2, Oracle and Microsoft SQL Server to show the difference. Below are few point, based on which we or our DBA or Architects decides which database to be used in project

  • Operating System: Not all database supports all operating systems.
  • Database Supported Operating System
    MSSQL Windows
    DB2 Windows, Linus, Unix
    Oracle Windows, Linus, AIX, Solaris, HP-UX

  • API's and other access methods:
  • Database API
    MSSQL OLE DB, ADO.NET, Jdbc, Odbc
    DB2 Json, Xquery, ADO.Net, Jdbc, Odbc
    Oracle ODP.Net, Jdbc, Odbc

  • XML support: Not all Database support XML datastructure or, support of XPATH, XQuery or XSLT is missing
  • Database Support
    MSSQL No
    DB2 No
    Oracle Yes

  • Implementation language: 
  • Database Language
    MSSQL C++
    DB2 C/C++
    Oracle C/C++

  • Supported programming languages:
  • Database Support language
    MSSQL Java, Dot Net, PHP, Ruby, VB, Python
    DB2 Java, Dot Net, PHP, Ruby, VB, Python, Cobol, Fortan, C, C#, C++
    Oracle Java, Dot Net, PHP, Ruby, VB, Python, Cobol, Fortan, C, C#, C++, Groovy, Scala, Tcl

  • Limits:
    • No of Columns
    • Database Number of columns
      MSSQL 1024
      DB2 1012
      Oracle 1000

    • Name length
    • Database Length
      MSSQL  128
      DB2 30
      Oracle 30

    • Number of columns in Indexing
    • Database Number of columns
      MSSQL  16
      DB2  64
      Oracle  32

    • Recursive Subquery
    • Database Recurresive Subquery
      MSSQL  32
      DB2  224
      Oracle  255


  • Security: 
    • DB2: DB2 is less secure database, vulnerable to users or hackers subverting the security. It is difficult to add layers of security after the product is designed, coded and shipped. It has higher upfront cost, because of the additional products necessary to secure DB2. Hence it has higher long term cost of ownership.
    • Oracle: Oracle integrate security feature into each of its product. Customer are not obliged to purchase add on products for fundamental but essential security feature.

  • Microsoft Sql server comes as a bundle with below products(MSBI -- Microsoft Business Intelligence)
    • Database Engine --> responsible for database related queries
    • Analysis Service --> used in Dataware housing and data hiring
    • Reporting Service --> used to create enterprise reports
    • Integration Service --> used to integrate the data from one data source to another, such as oracle to sql server.

    In case of DB2 and Oracle, you have to purchase them separately.

No comments:

Post a Comment