SlideShare a Scribd company logo
1 of 10
Running Head: ORACLE DATABASE VS. MICROSOFT SQL SERVER
1
Oracle Database vs. Microsoft SQL Server
Teresa J. Rothaar
Wilmington University
ORACLE DATABASE VS. MICROSOFT SQL SERVER
Oracle Database vs. Microsoft SQL Server
Introduction
Oracle and Microsoft SQL Server are competing relational database systems. Both are
proprietary packages, as opposed to open source systems such as MySQL. Oracle’s relational
database product dominates the database market, controlling more than 48% of the market as of
2010 (Hoffer, 2013, p. 246). However, Microsoft SQL Server gained 2,000 Enterprise customers
between 2010 and 2012, with its overall market share growing faster than that of its competitors
(Backaitis, 2014).
Oracle boasts the ability to run on a wide variety of platforms, including Windows, Mac,
and UNIX. Microsoft SQL Server is available only for Windows (Leiba, 2003), which limits the
latter’s potential customer base, which is possibly why SQL Server ranks third in the overall
database market (Hoffer, p. 246). However, unlike Oracle, Microsoft SQL Server has a large,
enthusiastic community of product evangelists, which is supported by Microsoft itself (McCown,
2008). The impact of product evangelism could explain SQL Server’s exponential growth
despite its vendor lock-in to the Windows OS.
This paper will explore some of the differences between Oracle and SQL Server, with a
focus on data types and other issues that are important for database administrators who work
with both systems to understand, especially in situations where data is being migrated from one
system to the other.
Database Architecture
An Oracle database is just that: one database, with all objects within it grouped by
schemas, and with the objects shared by all users and schemas. However, the database
administrator can set user privileges that allow access to some schemas and objects but not
2
ORACLE DATABASE VS. MICROSOFT SQL SERVER
others. SQL Server contains multiple databases, with each database having its own private,
unshared server file disk. All objects are assigned to a particular database, and users have
individual logins that grant access to a database and its corresponding objects (Stansfield, 2014).
This difference in architecture means that the concept of “logging onto the database”
means different things in each system. On SQL Server, a user who is logged onto the server can
execute the USE DATABASE_NAME command to switch to another database on that server, so
long as the user has access privileges allowing them to do so. Because an Oracle installation
contains only one database, there is no such thing as “switching databases.” There is only
viewing a different schema or object. To do that, the user executes a CONNECT command under
a different user name, or alternatively uses a SET ROLE command to change roles (Oracle
Corporation).
T-SQL vs. PL/SQL
Because they use different proprietary programming languages, Oracle and SQL Server
handle stored procedures quite differently. Oracle uses the PL/SQL programming language,
which is based on Ada, while Microsoft uses T-SQL, or Transactional SQL, which is based on
Sysbase (Burleson Consulting, 2011). In SQL Server, stored procedures are not compiled until
executed, which means any errors are not discovered until a procedure is actually run. There is
also is no ability to read or write from external files from a stored procedure (Leiba).
Oracle also offers a “black box” of certain stored procedures and functions that share all
input, output, and variables, called a “package.” Among other benefits, packages allow top-
down, object oriented design and performance improvement. Most of Oracle’s built-in functions
are part of a package. There is no equivalent to this in SQL Server, so when converting from
Oracle to SQL Server, the packages need to be broken down into multiple processes, user-
3
ORACLE DATABASE VS. MICROSOFT SQL SERVER
defined functions, and so on. When going from SQL Server to Oracle, the opposite occurs:
multiple processes, user-defined functions, and shared variables can be combined as part of an
Oracle package (Kline, 2005).
Oracle and Microsoft handle updates to their proprietary languages differently. While
Oracle releases new versions of PL/SQL separately from their RDBMS product—because
PL/SQL is used in other Oracle software—Microsoft updates T-SQL only when issuing a new
version of SQL Server. Therefore, every version of T-SQL is linked to a specific version of SQL
Server (Kline).
Reserved Words
Many words that can be used as column headings or object names in SQL Server, such as
DATE, are reserved words in Oracle, and thus these names cannot be directly transferred from
SQL Server to Oracle (Oracle Corporation, n.d.).
Date & Time Data Types
Although both databases store point-in-time values for DATE and TIME data types,
Oracle and SQL Server date and time ranges are very different. In Oracle, they range from 4712
B.C. to 4712 A.D., while the SQL Server date range is from 1753 A.D. to 9999 A.D. (Microsoft
Developer Network, n.d.). Additionally, the date/time precision in Microsoft SQL Server is
1/300th of a second, while Oracle’s data type TIMESTAMP is much more exacting, measuring
time in increments of 1/100000000th of a second (Oracle Corporation).
A few date and time data types have no direct equivalents between the two DBMSes,
such as DATE and TIME in SQL Server, which store each attribute as an individual component,
and the Oracle data types INTERVAL YEAR TO MONTH or INTERVAL DAY TO SECOND,
which are used for periods of time as opposed to specific dates and times (Snaidero, 2013).
4
ORACLE DATABASE VS. MICROSOFT SQL SERVER
When migrating from Oracle to SQL Server, columns of type DATE containing values
that are out of range for SQL Server are converted to type VARCHAR(19) (Microsoft Developer
Network). Conversely, Oracle uses its data type TIMESTAMP for data that requires finer date
and time precision than seconds, such as scientific applications, which may require values as tiny
as nanoseconds. If such precision is not required, Oracle’s DATE data type, which is accurate to
one second, may be used.
Numeric Data Types
SQL Server has several integer data types based on size: TINYINT, SMALLINT, INT
and BIGINT. Oracle simplifies things with its NUMBER(x, y) data type, where x specifies the
size (or precision) required, and y specifies the scale (the numbers to the right of the decimal
point). For an integer, NUMBER(x, 0), should be used, with x representing the size required,
with the scale set to 0 (Snaidero).
SQL Server data types DECIMAL[(x,[y])] and NUMERIC[(x,[y])] are equivalent to
NUMBER(x, y) in Oracle (Snaidero). However, the systems treat precision and scale of numbers
very differently, which can cause issues when migrating from Oracle to SQL Server. While
Oracle allows numbers to be defined with a scale greater than the precision, i.e., NUMBER(4,5),
SQL Server requires that the precision be greater than or equal to the scale, and it will correct
this by setting the precision and scale equal to each other during migration. Thus, NUMBER(4,5)
would be mapped to NUMERIC(5,5). Additionally, when encountering a NUMBER data type
with no scale or precision specified, SQL Server defaults to the maximum scale and precision,
mapping to NUMERIC(8,38) (Microsoft Developer Network). Microsoft therefore recommends
that, prior to the data being migrated, a specific scale and precision be specified in Oracle as to
protect data integrity.
5
ORACLE DATABASE VS. MICROSOFT SQL SERVER
SQL Server has two data types, MONEY and SMALLMONEY, specifically for currency
values (Snaidero). Oracle, however, assumes an international customer base where users do not
necessarily count money in U.S. Dollars, and currency values are mapped to the NUMBER data
type (Oracle Corporation).
Character String Data Types
The Oracle equivalent of SQL Server data type VARCHAR is CLOB (Microsoft
Developer Network). SQL Server data type CHAR maps directly to Oracle type CHAR, but with
a caveat: it maps directly only for CHAR sizes of 1 through 2000. CHAR data types sized from
2001 to 4000 are invalid in Oracle, and Oracle will convert CHAR types in this size range to
VARCHAR2 (Oracle Corporation). Conversely, an Oracle VARCHAR2 type will map to SQL
Server type VARCHAR (Microsoft Developer Network).
SQL Server type TEXT maps to Oracle type CLOB (Oracle Corporation), but CLOB is
mapped to SQL Server type VARCHAR(MAX) (Microsoft Developer Network).
Binary and XML Data Types
SQL Server types BINARY and VARBINARY map to Oracle type RAW or BLOB,
depending on size (Oracle Corporation). However, while Oracle can support up to 4GB of data,
SQL Server can support only 2GB, and any data above that amount is truncated (Microsoft
Developer Network).
Both systems support XML data types. Oracle has type XMLTYPE, and the SQL Server
equivalent is simply XML. However, while SQL Server can hold only 2GB of data, Oracle can
hold up to 6GB (Snaidero)
Boolean Values
The SQL Server data type BIT, used for Boolean values, has no direct equivalent in
6
ORACLE DATABASE VS. MICROSOFT SQL SERVER
Oracle. However, BIT can be mapped to either NUMBER(1) or CHAR, with PL/SQL functions
used to query the value (Oracle Corporation).
Conclusion
There are many other differences between Oracle and SQL Server, such as how each
RDBMS handles exceptions, the type of functions that can be called within each environment,
and how SQL statements such as CREATE and INSERT are handled. Multiple resources are
available online, from the manufacturers and each product’s user community, to aid database
administrators as they work with both systems.
7
ORACLE DATABASE VS. MICROSOFT SQL SERVER
References
Backaitis, V. (2014, March 18). Microsoft SQL Server Wins in a Big Data World. CMSWire.
Retrieved from http://www.cmswire.com/cms/big-data/microsoft-sql-server-wins-in-a-
big-data-world-024565.php
Burleson Consulting. (2011, December 27). Data Type Issues with Microsoft SQL Server 2000
and Oracle 10g. Retrieved from http://www.dba-
oracle.com/t_migrating_sql_server_vs_oracle_datatypes.htm
Hoffer, J. A., & Ramesh, V. (2013). Modern Database Management (11th ed.). Boston: Pearson.
Kline, K. (2005, June). Translating Procedural Statements Between Oracle and SQL Server:
White Paper. Retrieved from
http://www.quest.com/whitepapers/TranslatingProceduralStatements_Oracle_SQLServer.
pdf
Leiba, E. (May 2003). Oracle vs. SQL Server: Why Oracle wins. TechTarget. Retrieved from
http://searchoracle.techtarget.com/tip/Oracle-vs-SQL-Server-Why-Oracle-wins
McCown, S. (2008, March 19). The Real Difference Between SQL Server and Oracle.
InfoWorld. Retrieved from http://www.infoworld.com/d/data-management/real-
difference-between-sql-server-and-oracle-755
Microsoft Developer Network. (n.d.). Data Type Mapping for Oracle Publishers. Retrieved from
http://msdn.microsoft.com/en-us/library/ms151817.aspx
Oracle Corporation. (n.d.) Oracle® Database SQL Developer Supplementary Information for
Microsoft SQL Server Migrations, Release 1.2. Retrieved from
http://docs.oracle.com/cd/E10405_01/doc/appdev.120/e10379/ss_oracle_compared.htm#
BGBDEBFA
8
ORACLE DATABASE VS. MICROSOFT SQL SERVER
Snaidero, B. (2013, April 25). Comparing SQL Server and Oracle Data Types. MSSQLTips.com.
Retrieved from http://www.mssqltips.com/sqlservertip/2944/comparing-sql-server-and-
oracle-datatypes/
Stansfield, J. (2014, March 13). Microsoft SQL Server vs. Oracle: The Same, But Different?
Segue Technologies Blog. Retrieved from
http://www.seguetech.com/blog/2014/03/13/Microsoft-SQL-Server-versus-oracle
9
ORACLE DATABASE VS. MICROSOFT SQL SERVER
Snaidero, B. (2013, April 25). Comparing SQL Server and Oracle Data Types. MSSQLTips.com.
Retrieved from http://www.mssqltips.com/sqlservertip/2944/comparing-sql-server-and-
oracle-datatypes/
Stansfield, J. (2014, March 13). Microsoft SQL Server vs. Oracle: The Same, But Different?
Segue Technologies Blog. Retrieved from
http://www.seguetech.com/blog/2014/03/13/Microsoft-SQL-Server-versus-oracle
9

More Related Content

What's hot

Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuning
Yogiji Creations
 
Cloud architecture
Cloud architectureCloud architecture
Cloud architecture
Adeel Javaid
 

What's hot (20)

Migration into a Cloud
Migration into a CloudMigration into a Cloud
Migration into a Cloud
 
Cloud security
Cloud securityCloud security
Cloud security
 
INFORMATION ASSURANCE AND SECURITY 1.pdf
INFORMATION ASSURANCE AND SECURITY 1.pdfINFORMATION ASSURANCE AND SECURITY 1.pdf
INFORMATION ASSURANCE AND SECURITY 1.pdf
 
trigger dbms
trigger dbmstrigger dbms
trigger dbms
 
Ado.Net Tutorial
Ado.Net TutorialAdo.Net Tutorial
Ado.Net Tutorial
 
Date and time functions in mysql
Date and time functions in mysqlDate and time functions in mysql
Date and time functions in mysql
 
Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuning
 
Introduction to database & sql
Introduction to database & sqlIntroduction to database & sql
Introduction to database & sql
 
Cloud architecture
Cloud architectureCloud architecture
Cloud architecture
 
Denial of Service Attack Project
Denial of Service Attack ProjectDenial of Service Attack Project
Denial of Service Attack Project
 
Database Security And Authentication
Database Security And AuthenticationDatabase Security And Authentication
Database Security And Authentication
 
Fundamental Cloud Architectures
Fundamental Cloud ArchitecturesFundamental Cloud Architectures
Fundamental Cloud Architectures
 
Oracle
OracleOracle
Oracle
 
IaaS and PaaS
IaaS and PaaSIaaS and PaaS
IaaS and PaaS
 
Average Active Sessions - OaktableWorld 2013
Average Active Sessions - OaktableWorld 2013Average Active Sessions - OaktableWorld 2013
Average Active Sessions - OaktableWorld 2013
 
DB security
 DB security DB security
DB security
 
Cloud deployment models
Cloud deployment modelsCloud deployment models
Cloud deployment models
 
On demand provisioning
On demand provisioningOn demand provisioning
On demand provisioning
 
Infrastructure as a Service ( IaaS)
Infrastructure as a Service ( IaaS)Infrastructure as a Service ( IaaS)
Infrastructure as a Service ( IaaS)
 
Data Dictionary
Data DictionaryData Dictionary
Data Dictionary
 

Viewers also liked (8)

Difference Between Sql - MySql and Oracle
Difference Between Sql - MySql and OracleDifference Between Sql - MySql and Oracle
Difference Between Sql - MySql and Oracle
 
Oracle & sql server comparison 2
Oracle & sql server comparison 2Oracle & sql server comparison 2
Oracle & sql server comparison 2
 
Oracle mysql comparison
Oracle mysql comparisonOracle mysql comparison
Oracle mysql comparison
 
Oracle vs. sql server terminado
Oracle vs. sql server   terminadoOracle vs. sql server   terminado
Oracle vs. sql server terminado
 
MySQL Features
MySQL FeaturesMySQL Features
MySQL Features
 
Developing Web Services With Oracle Web Logic Server
Developing Web Services With Oracle Web Logic ServerDeveloping Web Services With Oracle Web Logic Server
Developing Web Services With Oracle Web Logic Server
 
MySQL Features & Implementation
MySQL Features & ImplementationMySQL Features & Implementation
MySQL Features & Implementation
 
Oracle
OracleOracle
Oracle
 

Similar to Oracle vs. MS SQL Server

Introduction to sql server
Introduction to sql serverIntroduction to sql server
Introduction to sql server
Vinay Thota
 

Similar to Oracle vs. MS SQL Server (20)

oracle
oracleoracle
oracle
 
Introduction to Oracle Database
Introduction to Oracle DatabaseIntroduction to Oracle Database
Introduction to Oracle Database
 
DEE 431 Introduction to Mysql Slide 3
DEE 431 Introduction to Mysql Slide 3DEE 431 Introduction to Mysql Slide 3
DEE 431 Introduction to Mysql Slide 3
 
Oracle DBA Tutorial for Beginners -Oracle training institute in bangalore
Oracle DBA Tutorial for Beginners -Oracle training institute in bangaloreOracle DBA Tutorial for Beginners -Oracle training institute in bangalore
Oracle DBA Tutorial for Beginners -Oracle training institute in bangalore
 
NoSQL
NoSQLNoSQL
NoSQL
 
My sql vs sql
My sql vs sqlMy sql vs sql
My sql vs sql
 
Sybase To Oracle Migration for Developers
Sybase To Oracle Migration for DevelopersSybase To Oracle Migration for Developers
Sybase To Oracle Migration for Developers
 
SQL PPT.pptx
SQL PPT.pptxSQL PPT.pptx
SQL PPT.pptx
 
Kaashiv SQL Server Interview Questions Presentation
Kaashiv SQL Server Interview Questions PresentationKaashiv SQL Server Interview Questions Presentation
Kaashiv SQL Server Interview Questions Presentation
 
Sql
SqlSql
Sql
 
Sql tutorial
Sql tutorialSql tutorial
Sql tutorial
 
Artigo no sql x relational
Artigo no sql x relationalArtigo no sql x relational
Artigo no sql x relational
 
Introduction to sql server
Introduction to sql serverIntroduction to sql server
Introduction to sql server
 
Oracle's history
Oracle's historyOracle's history
Oracle's history
 
What does PL_SQL stand for and what is the functioning of PL_SQL.docx
What does PL_SQL stand for and what is the functioning of PL_SQL.docxWhat does PL_SQL stand for and what is the functioning of PL_SQL.docx
What does PL_SQL stand for and what is the functioning of PL_SQL.docx
 
Introduction to SQL, SQL*Plus
Introduction to SQL, SQL*PlusIntroduction to SQL, SQL*Plus
Introduction to SQL, SQL*Plus
 
Oracle restful api & data live charting by Oracle Apex - داشبورد آنلاین (داده...
Oracle restful api & data live charting by Oracle Apex - داشبورد آنلاین (داده...Oracle restful api & data live charting by Oracle Apex - داشبورد آنلاین (داده...
Oracle restful api & data live charting by Oracle Apex - داشبورد آنلاین (داده...
 
SQL vs NoSQL deep dive
SQL vs NoSQL deep diveSQL vs NoSQL deep dive
SQL vs NoSQL deep dive
 
Why you should(n't) run your databases in the cloud
Why you should(n't) run your databases in the cloudWhy you should(n't) run your databases in the cloud
Why you should(n't) run your databases in the cloud
 
SQL.pptx
SQL.pptxSQL.pptx
SQL.pptx
 

More from Teresa Rothaar

More from Teresa Rothaar (20)

Social Media Data Mining
Social Media Data MiningSocial Media Data Mining
Social Media Data Mining
 
Decision-Making Analysis: Chord Buddy
Decision-Making Analysis: Chord BuddyDecision-Making Analysis: Chord Buddy
Decision-Making Analysis: Chord Buddy
 
Analysis of an Information System: NamUs
Analysis of an Information System: NamUsAnalysis of an Information System: NamUs
Analysis of an Information System: NamUs
 
Data Backup & Disaster Planning
Data Backup & Disaster PlanningData Backup & Disaster Planning
Data Backup & Disaster Planning
 
Comparison of the Waterfall, Spiral, and Prototype SDLC Models
Comparison of the Waterfall, Spiral, and Prototype SDLC ModelsComparison of the Waterfall, Spiral, and Prototype SDLC Models
Comparison of the Waterfall, Spiral, and Prototype SDLC Models
 
IPv6: The New Internet Protocol
IPv6: The New Internet ProtocolIPv6: The New Internet Protocol
IPv6: The New Internet Protocol
 
Net Neutrality
Net NeutralityNet Neutrality
Net Neutrality
 
The Automobile: Genesis to Revelation
The Automobile: Genesis to RevelationThe Automobile: Genesis to Revelation
The Automobile: Genesis to Revelation
 
4 Models of Change for IT Environments
4 Models of Change for IT Environments4 Models of Change for IT Environments
4 Models of Change for IT Environments
 
Why Projects Fail
Why Projects FailWhy Projects Fail
Why Projects Fail
 
Avon's Catastrophic Promise Project
Avon's Catastrophic Promise ProjectAvon's Catastrophic Promise Project
Avon's Catastrophic Promise Project
 
The Politics of Organizational Leadership
The Politics of Organizational LeadershipThe Politics of Organizational Leadership
The Politics of Organizational Leadership
 
Short Opinion Paper on Ethics vs. Legality
Short Opinion Paper on Ethics vs. LegalityShort Opinion Paper on Ethics vs. Legality
Short Opinion Paper on Ethics vs. Legality
 
Strategic IT Plan for PetSmart PetPerks
Strategic IT Plan for PetSmart PetPerksStrategic IT Plan for PetSmart PetPerks
Strategic IT Plan for PetSmart PetPerks
 
Fictional Business Case for Car Dealership CRM
Fictional Business Case for Car Dealership CRMFictional Business Case for Car Dealership CRM
Fictional Business Case for Car Dealership CRM
 
Data Management Project for Car Dealership
Data Management Project for Car DealershipData Management Project for Car Dealership
Data Management Project for Car Dealership
 
Case Study: Google 2012
Case Study: Google 2012Case Study: Google 2012
Case Study: Google 2012
 
Porter Five Forces Analysis of Whole Foods Market
Porter Five Forces Analysis of Whole Foods MarketPorter Five Forces Analysis of Whole Foods Market
Porter Five Forces Analysis of Whole Foods Market
 
PetSmart Financial Analysis
PetSmart Financial AnalysisPetSmart Financial Analysis
PetSmart Financial Analysis
 
The Dodd-Frank Act
The Dodd-Frank ActThe Dodd-Frank Act
The Dodd-Frank Act
 

Recently uploaded

Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
amitlee9823
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
amitlee9823
 
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
amitlee9823
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
amitlee9823
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
JoseMangaJr1
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
amitlee9823
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
amitlee9823
 

Recently uploaded (20)

Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Detecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning ApproachDetecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning Approach
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
 
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men  🔝mahisagar🔝   Esc...
➥🔝 7737669865 🔝▻ mahisagar Call-girls in Women Seeking Men 🔝mahisagar🔝 Esc...
 
Predicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science ProjectPredicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science Project
 
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night StandCall Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Hsr Layout ☎ 7737669865 🥵 Book Your One night Stand
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
 

Oracle vs. MS SQL Server

  • 1. Running Head: ORACLE DATABASE VS. MICROSOFT SQL SERVER 1 Oracle Database vs. Microsoft SQL Server Teresa J. Rothaar Wilmington University
  • 2. ORACLE DATABASE VS. MICROSOFT SQL SERVER Oracle Database vs. Microsoft SQL Server Introduction Oracle and Microsoft SQL Server are competing relational database systems. Both are proprietary packages, as opposed to open source systems such as MySQL. Oracle’s relational database product dominates the database market, controlling more than 48% of the market as of 2010 (Hoffer, 2013, p. 246). However, Microsoft SQL Server gained 2,000 Enterprise customers between 2010 and 2012, with its overall market share growing faster than that of its competitors (Backaitis, 2014). Oracle boasts the ability to run on a wide variety of platforms, including Windows, Mac, and UNIX. Microsoft SQL Server is available only for Windows (Leiba, 2003), which limits the latter’s potential customer base, which is possibly why SQL Server ranks third in the overall database market (Hoffer, p. 246). However, unlike Oracle, Microsoft SQL Server has a large, enthusiastic community of product evangelists, which is supported by Microsoft itself (McCown, 2008). The impact of product evangelism could explain SQL Server’s exponential growth despite its vendor lock-in to the Windows OS. This paper will explore some of the differences between Oracle and SQL Server, with a focus on data types and other issues that are important for database administrators who work with both systems to understand, especially in situations where data is being migrated from one system to the other. Database Architecture An Oracle database is just that: one database, with all objects within it grouped by schemas, and with the objects shared by all users and schemas. However, the database administrator can set user privileges that allow access to some schemas and objects but not 2
  • 3. ORACLE DATABASE VS. MICROSOFT SQL SERVER others. SQL Server contains multiple databases, with each database having its own private, unshared server file disk. All objects are assigned to a particular database, and users have individual logins that grant access to a database and its corresponding objects (Stansfield, 2014). This difference in architecture means that the concept of “logging onto the database” means different things in each system. On SQL Server, a user who is logged onto the server can execute the USE DATABASE_NAME command to switch to another database on that server, so long as the user has access privileges allowing them to do so. Because an Oracle installation contains only one database, there is no such thing as “switching databases.” There is only viewing a different schema or object. To do that, the user executes a CONNECT command under a different user name, or alternatively uses a SET ROLE command to change roles (Oracle Corporation). T-SQL vs. PL/SQL Because they use different proprietary programming languages, Oracle and SQL Server handle stored procedures quite differently. Oracle uses the PL/SQL programming language, which is based on Ada, while Microsoft uses T-SQL, or Transactional SQL, which is based on Sysbase (Burleson Consulting, 2011). In SQL Server, stored procedures are not compiled until executed, which means any errors are not discovered until a procedure is actually run. There is also is no ability to read or write from external files from a stored procedure (Leiba). Oracle also offers a “black box” of certain stored procedures and functions that share all input, output, and variables, called a “package.” Among other benefits, packages allow top- down, object oriented design and performance improvement. Most of Oracle’s built-in functions are part of a package. There is no equivalent to this in SQL Server, so when converting from Oracle to SQL Server, the packages need to be broken down into multiple processes, user- 3
  • 4. ORACLE DATABASE VS. MICROSOFT SQL SERVER defined functions, and so on. When going from SQL Server to Oracle, the opposite occurs: multiple processes, user-defined functions, and shared variables can be combined as part of an Oracle package (Kline, 2005). Oracle and Microsoft handle updates to their proprietary languages differently. While Oracle releases new versions of PL/SQL separately from their RDBMS product—because PL/SQL is used in other Oracle software—Microsoft updates T-SQL only when issuing a new version of SQL Server. Therefore, every version of T-SQL is linked to a specific version of SQL Server (Kline). Reserved Words Many words that can be used as column headings or object names in SQL Server, such as DATE, are reserved words in Oracle, and thus these names cannot be directly transferred from SQL Server to Oracle (Oracle Corporation, n.d.). Date & Time Data Types Although both databases store point-in-time values for DATE and TIME data types, Oracle and SQL Server date and time ranges are very different. In Oracle, they range from 4712 B.C. to 4712 A.D., while the SQL Server date range is from 1753 A.D. to 9999 A.D. (Microsoft Developer Network, n.d.). Additionally, the date/time precision in Microsoft SQL Server is 1/300th of a second, while Oracle’s data type TIMESTAMP is much more exacting, measuring time in increments of 1/100000000th of a second (Oracle Corporation). A few date and time data types have no direct equivalents between the two DBMSes, such as DATE and TIME in SQL Server, which store each attribute as an individual component, and the Oracle data types INTERVAL YEAR TO MONTH or INTERVAL DAY TO SECOND, which are used for periods of time as opposed to specific dates and times (Snaidero, 2013). 4
  • 5. ORACLE DATABASE VS. MICROSOFT SQL SERVER When migrating from Oracle to SQL Server, columns of type DATE containing values that are out of range for SQL Server are converted to type VARCHAR(19) (Microsoft Developer Network). Conversely, Oracle uses its data type TIMESTAMP for data that requires finer date and time precision than seconds, such as scientific applications, which may require values as tiny as nanoseconds. If such precision is not required, Oracle’s DATE data type, which is accurate to one second, may be used. Numeric Data Types SQL Server has several integer data types based on size: TINYINT, SMALLINT, INT and BIGINT. Oracle simplifies things with its NUMBER(x, y) data type, where x specifies the size (or precision) required, and y specifies the scale (the numbers to the right of the decimal point). For an integer, NUMBER(x, 0), should be used, with x representing the size required, with the scale set to 0 (Snaidero). SQL Server data types DECIMAL[(x,[y])] and NUMERIC[(x,[y])] are equivalent to NUMBER(x, y) in Oracle (Snaidero). However, the systems treat precision and scale of numbers very differently, which can cause issues when migrating from Oracle to SQL Server. While Oracle allows numbers to be defined with a scale greater than the precision, i.e., NUMBER(4,5), SQL Server requires that the precision be greater than or equal to the scale, and it will correct this by setting the precision and scale equal to each other during migration. Thus, NUMBER(4,5) would be mapped to NUMERIC(5,5). Additionally, when encountering a NUMBER data type with no scale or precision specified, SQL Server defaults to the maximum scale and precision, mapping to NUMERIC(8,38) (Microsoft Developer Network). Microsoft therefore recommends that, prior to the data being migrated, a specific scale and precision be specified in Oracle as to protect data integrity. 5
  • 6. ORACLE DATABASE VS. MICROSOFT SQL SERVER SQL Server has two data types, MONEY and SMALLMONEY, specifically for currency values (Snaidero). Oracle, however, assumes an international customer base where users do not necessarily count money in U.S. Dollars, and currency values are mapped to the NUMBER data type (Oracle Corporation). Character String Data Types The Oracle equivalent of SQL Server data type VARCHAR is CLOB (Microsoft Developer Network). SQL Server data type CHAR maps directly to Oracle type CHAR, but with a caveat: it maps directly only for CHAR sizes of 1 through 2000. CHAR data types sized from 2001 to 4000 are invalid in Oracle, and Oracle will convert CHAR types in this size range to VARCHAR2 (Oracle Corporation). Conversely, an Oracle VARCHAR2 type will map to SQL Server type VARCHAR (Microsoft Developer Network). SQL Server type TEXT maps to Oracle type CLOB (Oracle Corporation), but CLOB is mapped to SQL Server type VARCHAR(MAX) (Microsoft Developer Network). Binary and XML Data Types SQL Server types BINARY and VARBINARY map to Oracle type RAW or BLOB, depending on size (Oracle Corporation). However, while Oracle can support up to 4GB of data, SQL Server can support only 2GB, and any data above that amount is truncated (Microsoft Developer Network). Both systems support XML data types. Oracle has type XMLTYPE, and the SQL Server equivalent is simply XML. However, while SQL Server can hold only 2GB of data, Oracle can hold up to 6GB (Snaidero) Boolean Values The SQL Server data type BIT, used for Boolean values, has no direct equivalent in 6
  • 7. ORACLE DATABASE VS. MICROSOFT SQL SERVER Oracle. However, BIT can be mapped to either NUMBER(1) or CHAR, with PL/SQL functions used to query the value (Oracle Corporation). Conclusion There are many other differences between Oracle and SQL Server, such as how each RDBMS handles exceptions, the type of functions that can be called within each environment, and how SQL statements such as CREATE and INSERT are handled. Multiple resources are available online, from the manufacturers and each product’s user community, to aid database administrators as they work with both systems. 7
  • 8. ORACLE DATABASE VS. MICROSOFT SQL SERVER References Backaitis, V. (2014, March 18). Microsoft SQL Server Wins in a Big Data World. CMSWire. Retrieved from http://www.cmswire.com/cms/big-data/microsoft-sql-server-wins-in-a- big-data-world-024565.php Burleson Consulting. (2011, December 27). Data Type Issues with Microsoft SQL Server 2000 and Oracle 10g. Retrieved from http://www.dba- oracle.com/t_migrating_sql_server_vs_oracle_datatypes.htm Hoffer, J. A., & Ramesh, V. (2013). Modern Database Management (11th ed.). Boston: Pearson. Kline, K. (2005, June). Translating Procedural Statements Between Oracle and SQL Server: White Paper. Retrieved from http://www.quest.com/whitepapers/TranslatingProceduralStatements_Oracle_SQLServer. pdf Leiba, E. (May 2003). Oracle vs. SQL Server: Why Oracle wins. TechTarget. Retrieved from http://searchoracle.techtarget.com/tip/Oracle-vs-SQL-Server-Why-Oracle-wins McCown, S. (2008, March 19). The Real Difference Between SQL Server and Oracle. InfoWorld. Retrieved from http://www.infoworld.com/d/data-management/real- difference-between-sql-server-and-oracle-755 Microsoft Developer Network. (n.d.). Data Type Mapping for Oracle Publishers. Retrieved from http://msdn.microsoft.com/en-us/library/ms151817.aspx Oracle Corporation. (n.d.) Oracle® Database SQL Developer Supplementary Information for Microsoft SQL Server Migrations, Release 1.2. Retrieved from http://docs.oracle.com/cd/E10405_01/doc/appdev.120/e10379/ss_oracle_compared.htm# BGBDEBFA 8
  • 9. ORACLE DATABASE VS. MICROSOFT SQL SERVER Snaidero, B. (2013, April 25). Comparing SQL Server and Oracle Data Types. MSSQLTips.com. Retrieved from http://www.mssqltips.com/sqlservertip/2944/comparing-sql-server-and- oracle-datatypes/ Stansfield, J. (2014, March 13). Microsoft SQL Server vs. Oracle: The Same, But Different? Segue Technologies Blog. Retrieved from http://www.seguetech.com/blog/2014/03/13/Microsoft-SQL-Server-versus-oracle 9
  • 10. ORACLE DATABASE VS. MICROSOFT SQL SERVER Snaidero, B. (2013, April 25). Comparing SQL Server and Oracle Data Types. MSSQLTips.com. Retrieved from http://www.mssqltips.com/sqlservertip/2944/comparing-sql-server-and- oracle-datatypes/ Stansfield, J. (2014, March 13). Microsoft SQL Server vs. Oracle: The Same, But Different? Segue Technologies Blog. Retrieved from http://www.seguetech.com/blog/2014/03/13/Microsoft-SQL-Server-versus-oracle 9