Sei sulla pagina 1di 11

A Comparison of Oracle, DB2, MySQL, and

SQL Server
Although this tutorial is about SQL Server, you may want to know about some of
the other SQL-based relational database management systems. Figure 1-9
compares three of the most popular, Oracle, DB2, and MySQL, with SQL Server.
Oracle has a huge installed base of customers and continues to dominate the
marketplace, especially for servers running the Unix operating system. Oracle
works well for large systems and has a reputation for being extremely reliable, but
also has a reputation for being expensive and difficult to use.
DB2 was originally designed to run on IBM mainframe systems and continues to
be the premier database for those systems. It also dominates in hybrid
environments where IBM mainframes and newer servers must coexist. Although it
has a reputation for being expensive, it also has a reputation for being reliable and
easy to use.
MySQL runs on all major operating systems and is widely used for web
applications. MySQL is an open-source database, which means that any developer
can view and improve its source code. In addition, the MySQL Community Server
is free for most users, although Oracle also sells an Enterprise Edition of MySQL
that has advanced features.
SQL Server was designed by Microsoft to run on Windows and is widely used for
small- to medium-sized departmental systems. It has a reputation for being
inexpensive and easy to use. However, it also has a reputation for being unreliable
and for not scaling well for systems with a large number of users.
One of the main differences between SQL Server and the other database
management systems is that SQL Server runs only under the Windows operating
system. In contrast, Oracle, DB2, and MySQL run under most operating systems,
including Unix, Windows, Mac OS, and IBMs z/OS. Since many developers
consider z/OS and Unix to be more stable and secure than Windows, most large
companies use z/OS or Unix as the operating system for the servers that store the
databases for mission-critical applications. As a result, they cant use SQL Server
and must use Oracle, DB2, or MySQL.

If you search the Internet, youll find that dozens of other relational database
products are also available. These include proprietary databases like Informix,
Sybase, and Teradata. And they include open-source databases like PostgreSQL.
A comparison of Oracle, DB2, MySQL, and SQL Server
Released
Platforms

Oracle
1979
Unix
z/OS
Windows
Mac OS

DB2
1985
OS/390, Z/OS, and AIX
Unix
Windows
Mac OS

MySQL SQL Server


2000
1987
Unix
Windows
Windows
Mac OS
z/OS

Description
Oracle is typically used for large, mission-critical systems that run on one or
more Unix servers.
DB2 is typically used for large, mission-critical systems that run on legacy
IBM mainframe systems using the z/OS or OS/390 operating system.
MySQL is a popular open-source database that runs on all major operating
systems and is commonly used for web applications.
SQL Server is typically used for small- to medium-sized systems that run on
one or more Windows servers.

Microsoft SQL Server vs. Oracle: The Same,


But Different?
Microsoft Oracle SQL Server Oracle vs SQL Server

There are many different relational database management systems (RDBMS) out there. You have
probably heard about Microsoft Access, Sybase, and MySQL, but the two most popular and
widely used are Oracle and MS SQL Server. Although there are many similarities between the
two platforms, there are also a number of key differences. In this blog, I will be taking a look at
several in particular, in the areas of their command language, how they handle transaction control
and their organization of database objects.

Language
Perhaps the most obvious difference between the two RDBMS is the language they use.
Although both systems use a version of Structured Query Language, or SQL, MS SQL Server
uses Transact SQL, or T-SQL, which is an extension of SQL originally developed by Sybase and
used by Microsoft. Oracle, meanwhile, uses PL/SQL, or Procedural Language/SQL. Both are
different flavors or dialects of SQL and both languages have different syntax and capabilities.
The main difference between the two languages is how they handle variables, stored procedures,
and built-in functions. PL/SQL in Oracle can also group procedures together into packages,
which cant be done in MS SQL Server. In my humble opinion, PL/SQL is complex and
potentially more powerful, while T-SQL is much more simple and easier to use.

Transaction Control
Another one of the biggest differences between Oracle and MS SQL Server is transaction
control. For the purposes of this article, a transaction can be defined as a group of operations or
tasks that should be treated as a single unit. For instance, a collection of SQL queries modifying
records that all must be updated at the same time, where (for instance) a failure to update any
single records among the set should result in none of the records being updated. By default, MS
SQL Server will execute and commit each command/task individually, and it will be difficult or
impossible to roll back changes if any errors are encountered along the way. To properly group
statements, the BEGIN TRANSACTION command is used to declare the beginning of a
transaction, and either a COMMIT statement is used at the end. This COMMIT statement will
write the changed data to disk, and end the transaction. Within a transaction, ROLLBACK will
discard any changes made within the transaction block. When properly used with error handling,

the ROLLBACK allows for some degree of protection against data corruption. After a COMMIT
is issued, it is not possible to roll back any further than the COMMIT command.
Within Oracle, on the other hand, each new database connection is treated as new transaction. As
queries are executed and commands are issued, changes are made only in memory and nothing is
committed until an explicit COMMIT statement is given (with a few exceptions related to DDL
commands, which include implicit commits, and are committed immediately). After the
COMMIT, the next command issued essentially initiates a new transaction, and the process
begins again. This provides greater flexibility and helps for error control as well, as no changes
are committed to disk until the DBA explicitly issues the command to do so.

Organization of Database Objects


The last difference I want to discuss is how the RDBMS organizes database objects. MS SQL
Server organizes all objects, such as tables, views, and procedures, by database names. Users are
assigned to a login which is granted accesses to the specific database and its objects. Also, in
SQL Server each database has a private, unshared disk file on the server. In Oracle, all the
database objects are grouped by schemas, which are a subset collection of database objects and
all the database objects are shared among all schemas and users. Even though it is all shared,
each user can be limited to certain schemas and tables via roles and permissions.
In short, both Oracle and SQL Server are powerful RDBMS options. Although there are a
number of differences in how they work under the hood, they can both be used in roughly
equivalent ways. Neither is objectively better than the other, but some situations may be more
favorable to a particular choice. Either way, Segue can support these systems and help to make
recommendations on how to improve, upgrade, or maintain your key mission-critical
infrastructure to make sure that you can keep your focus on doing business.

Difference between SQL and MySQL


RECOMMENDED: Click here to fix Windows errors and optimize system
performance

We have earlier seen the difference between SQL and NoSQL. Now in this post I will tell you the
basic difference between SQL and MySQL. Most people find it hard to wrap their head around
SQL and MySQL, and you might be one of those. There are books about SQL everywhere, and
for good reason! Reading these books has helped me in differentiating both the concepts, viz.
SQL and MySQL.
To begin with, let us explain you both technologies, and this is how they are defined:
SQL vs MySQL

SQL stands for Structured Query Language. Its a standard language for accessing and
manipulating databases. MySQL is a database management system, like SQL Server, Oracle,
Informix, Postgres, etc. MySQL is a RDMS (Relational Database Management System).
When considering a utility for data management the two most popular choices are MySQL and
SQL Server. Both are efficient at keeping your data organized and readily available through a
user interface. Both technologies have the concept of schema (that is table storage) for data
storage.
SQL is a language. Specifically, the Structured Query Language Now it would be better if we
start differentiating the topic as difference between SQL server and MySQL and take them
point by point.
SQL Server and MySQL Vendors:

The MySQL development project has made its source code available under the terms of the GNU
General Public License, as well as under a variety of proprietary agreements. MySQL was
owned and sponsored by a single for-profit firm, the Swedish company MySQL AB, now owned
by Oracle Corporation.
SQL server is owned by Microsoft and is typically referred as Microsoft SQL Server. It has a
long history of releases and it is updated often adding all latest trends and technologies to it thus
making it one of the trusted data base applications today. At the 2011 PASS summit on October
11, Microsoft announced that the next major version of SQL Server, codenamed Denali, would
be SQL Server 2012. The release date is set to the first half of 2012.

Strengths: SQL Server and MySQL

To give a better idea of the differences in MySQL and SQL Server -MySQL is geared more
toward selecting data so it can be displayed, updated and saved again. MySQL is weaker in the
areas of inserting and deleting data. But it is an excellent choice, for data storage and referencing
data.
Here are some specific technical differences in MySQL and SQL Server when it comes down to
the ANSI SQL standard: Features like stored procedures, triggers, views, and cursors became a
part of the MySQL database server in MySQL version 5.0 and still you wont find a rich feature
set in terms of development functions and capabilities. However MySQLs stored code-objects
are close to ANSI standards, but again, they dont have the breadth and depth of T-SQL,
Microsoft and Sybases proprietary extension to SQL.
Security: SQL Server and MySQL

Security is a major concern for data management. Both technologies, that is MySQL and
Microsoft SQL Server, are EC2 complaint and make sure that they have adequate security
support for building government applications. Going down the line Microsofts SQL Server,
leads the way in offering all-round security features, as Microsofts Baseline Security Analyzer
helps administrators ensure that the SQL Server installation is up to date. MySQL has no such
tool to do so.
Support: SQL Server and MySQL

Both SQL server and MySQL has the support from their respective vendors both in free and paid
form. MySQL as we know is now a subsidiary of Oracle which is a Capability Maturity
Model (CMM) level 5 company and offers support via technical representatives and Virtual
MySQL DBA Assistant.
On the other hand Microsoft has been pioneering SQL server over years and assures assistance
on its SQL database and Cloud storage. Further more a free Microsoft SQL Server Migration
Assistant (SSMA) makes it easy to migrate data from Oracle, Microsoft Access, MySQL, and
Sybase to SQL Server.
Latest release: MySQL and SQL Server

MySQL has the stable version of MySQL 5.5.19. Microsofts SQL Server is currently available
as SQL Server 2008 R2. SQL Server 2012, with many new features, was announced in the Pass
Summit, October 2011, and is expected to be available in the first half of 2012.
Conclusion: MySQL vs SQL Server

As we have seen the difference between SQL Server and MySQL, the picture is now almost
clear. It all comes down to your needs, how much secure, scalable and efficient database you
want. From most points it is clear that Microsofts SQL Server provides some extra features over
MySQL and is more trusted in the development market.

DBMS v/s RDBMS


DBMS and RDBMS both are management systems referring to collection of
programs that are required to manage a database. In spite of this similarity major
differences occur between them

Relationship among tables is maintained in a RDBMS whereas this not the case DBMS as it is
used to manage the database.
DBMS accepts the flat file data that means there is no relation among different data whereas
RDBMS does not accepts this type of design.
DBMS is used for simpler business applications whereas RDBMS is used for more complex
applications.
Although the foreign key concept is supported by both DBMS and RDBMS but its only
RDBMS that enforces the rules.
RDBMS solution is required by large sets of data whereas small sets of data can be managed by
DBMS. Unlike RDBMS, DBMS does not support client server architecture. RDBMS imposes
integrity constraints and also follows normalization which is not supported in DBMS.

DBMS provides a systematic and a organized way of storing, managing and retrieving
information from a logically related information collection. RDBMS also provides what
DBMS provides with extended feature called Integrity Relationship or Relational
Integrity or Termed as Referential Integrity.
We can conceptually visualize as:
RDBMS

DBMS

REFERENTIAL INTEGRITY

Fig-1: Relationship
In the example above figure every Developer have a project which showing or
indicating a referential integrity between Developer and Project. If we omit this
referential integrity in DBMS and Files, it will allow you, but in RDBMS, it will restrict
you from saving data if we have defined the referential integrity between these two
entities. By establishing Foreign Keys we maintain this relationship in any RDBMS.

A DBMS qualifies to be a RDBMS if it follows 13rules defined by Dr.E.F.Codd. These rules are
described asRule 0: The system must fulfill the condition of being relational as a database and also as a
management system.
Rule 1: All information must be represented by values in column positions.
Rule 2: Each and every value must be accessible.
Rule 3: Null values must be systematically treated.
Rule 4: Active online catalog must be based on relational model.
Rule 5: presence of at least one language comprehensive in supporting data definition, view
definition, data manipulation, security and integrity constraints, authorization and transaction
boundaries.
Rule 6: System must be able to update the theoretically updateable views.
Rule 7: System must support High level insert, update and delete.
Rule 8: System must possess physical data independence.
Rule 9: System must possess logical data independence.
Rule 10: Integrity constraints must be specified separately from application programs.
Rule 11: Distribution of portions of the database to different locations must remain invisible to
the users.

Rule 12: A low level language must not be used to subvert or bypass the integrity rules and
constraints that are expressed in higher level relational language.

DBMS can be used for simple applications whereas its next generation design i.e. RDBMS can
be used for complex business applications. IBM's Information Management System (IMS) is an
example of DBMS and Microsoft SQL Server is an example of RDBMS.

DBMS
1. DBMS is a data base managment system and DBMSis not join the table.
2. DBMS is mainly a storage area and it does not employ any tables for storing the data or does
not use any special function keys or foreign keys for the retreival of the data.
3. DBMS does not support client/server Architecture
4. DBMS Doesnot follow the normalization.
5.It requires low Software and Hardware Requirements.
6.It treats Data as Files internally
7.It supports Single User only
8.DBMS is used for simpler business applications
9.ACID properties of database must be implemented by the user or the developer

RDBMS
1. RDBMS=DBMS+Refrential Integrity
2. RDBMS a relation data base managment system and RDBMS is two table joning the relation
3. RDBMS has the major difference of solving the queries easily, as they are stored in table
format and use many functional keys in solving the queries.
4. RDBMS support client/server Architecture
5. RDBMS follows the normalization
6.It supports multiple users
7.It treats data as Tables internally
8.RDBMS allows simultaneous access of users to data tables.
9.RDBMS imposes integrity constraints.
10.ACID properties of the database are defined in the integrity constraints

SQL vs T-SQL vs. PL-SQL

T-SQL
TSQL is a proprietary procedural language used by Microsoft in SQL Server.
PL-SQL
PL/SQL is a proprietary procedural language used by Oracle
Microsofts T-SQL is similar to Oracles PL-SQL to some extent, sharing with some basic
difference as below

Difference in data type, There are many different data type. Sharing few as below

T-SQL
Integer, SmallInt etc
Varchar
DATETIME, SMALL-DATETIME

PL-SQL
Number
Varchar2
Date

The default date format of PL-SQL does not include time part.

In T-SQL, there is no need of dual.


o Example:

T-SQL Syntax will look like: select getdate()

PL-SQL will look like: select sysdate from dual

In T-SQL there is an IDENTITY function on the other hand SEQUENCE in PL-SQL.

In the T-SQL have to use NOT EXISTS clause in Select statement on the other hand in
PL-SQL there is MINUS operator.

SQL Server can have multiple databases on an Instance but Oracle cannot have multiple
databases on an Instance.

T-SQLs RAISEERROR throws an exception on other hand raise_application_error in


PL-SQL.

In T-SQL, stored procedure do not rollback automatically if something fails. You can use
TRY CATCH but still the roll back is optional. In PL-SQL, stored procedures are atomic.
Any error inside a stored procedure rolls back up to the point where the stored procedure
was called.

SQL

is a query language to operate on sets.

It is more or less standardized, and used by almost all relational database management
systems: SQL Server, Oracle, MySQL, PostgreSQL, DB2, Informix, etc.
is a proprietary procedural language used by Oracle

PL/SQL

PL/pgSQL

TSQL

is a proprietary procedural language used by PostgreSQL

is a proprietary procedural language used by Microsoft in SQL Server.

Procedural languages are designed to extend the SQL's abilities while being able to integrate well
with SQL.Several features such as local variables and string/data processing are added.These
features make the language Turing complete.
They are also used to write stored procedures: pieces of code residing on the server to
manage complex business rules that are hard or impossible to manage with pure set-based
operations.

Potrebbero piacerti anche