comparison between Oracle 9i and SQL Server 2000

User avatar
Sabina
Уже с Приветом
Posts: 5669
Joined: 13 Oct 2000 09:01
Location: East Bay, CA

comparison between Oracle 9i and SQL Server 2000

Post by Sabina »

Искала себе для интервью и подумала может кому тоже пригодится. Все-таки часто спрашивают:
http://searchoracle.techtarget.com/tip/ ... 43,00.html

Там регистрация геморройная, так что приведу здесь статью
-------------------------------------------------------------------------------------------
Here is a brief comparison between Oracle 9i and SQL Server 2000. In my view, Oracle comes out ahead in this comparison.

Platform dependancy

SQL Server is only operable on the Windows platform, a major limitation for it to be an enterprise solution. Oracle is available on multiple platforms such as Windows, all flavors of Unix from vendors such as IBM, Sun, Digital, HP, Sequent, etc. and VAX-VMS, as well as MVS. The multi-platform nature of Oracle makes it a true enterprise solution.

Locking and concurrency

SQL Server has no multi-version consistency model, which means that "writers block readers and readers block writers" to ensure data integrity. In contrast, with Oracle, the rule is "readers don't block writers and writers don't block readers." This is possible without compromising data integrity because Oracle will dynamically re-create a read-consistent image for a reader of any requested data that has been changed but not yet committed. In other words, the reader will see the data as it was before the writer began changing it (until the writer commits). SQL Server's locking scheme is much simpler (less mature) and will result in a lot of delays/waits in a heavy OLTP environment.

Also, SQL Server will escalate row locks to page level locks when too many rows on a page are locked. This locks rows which are uninvolved in any updates for no good reason.

Performance and tuning

In SQL Server, the DBA has no "real" control over sorting and cache memory allocation. The memory allocation is decided only globally in the server properties memory folder, and that applies for ALL memory and not CACHING, SORTING, etc.
All pages (blocks) are always 8k and all extents are always 8 pages (64k). This means you have no way to specify larger extents to ensure contiguous space for large objects.
No range partioning of large tables and indexes. In Oracle, a large 100 GB table can be seamlessly partitioned at the database level into range partitions. For example, an invoice table can be partitioned into monthly partitions. Such partitioned tables and partitioned indexes give performance and maintenance benefits and are transparent to the application.
There is no partitioning in SQL Server.
There are no bitmap indexes in SQL Server.
There are no reverse key indexes in SQL Server.
There are no function-based indexes in SQL Server.
There is no star query optimization in SQL Server.

Object types

Here are some object types missing in SQL Server that exist in Oracle.

You cannot declare public or private synonyms.
There is no such thing as independent sequence objects.
There are no packages; i.e., collections of procedures and functions.
No "before" event triggers (only "after" event triggers) and no row triggers (only statement).
No object types like in PL/SQL.

PL/SQL versus T-SQL

In T-SQL there are significant extensions to the ANSI SQL-92 standard which means converting applications to a different database later will be a code challenge re-write. The INNER JOIN, LEFT OUTER, RIGHT OUTER JOIN syntax differs from the classic JOIN.
No Java database engine as in Oracle.
Stored procedures in SQL Server are not compiled until executed (which means overhead, late binding and finding errors at execution time only!).
No ability to read/write from external files from a stored procedure.
PL/SQL has many DBMS system packages, where T-SQL relies only on a limited number of extended and system stored procedures in the master database.
PL/SQL is better in error exception handling, and there is no such thing as exceptions in T-SQL (T-SQL uses @@error -- not elegant!).
T-SQL does not have the MINUS operator, that makes finding schema differences more difficult in SQL Server.
In SQL Server there is no "dead connection detection". Clients who lose their connection may still hold locks until a DBA is notified to kill their server side processes.
In SQL Server there is no such thing as SQL*NET aliases/service names! This means applications have to hard code the actual server name into their apps, making it difficult to move databases later to load balance across servers.

Clustering technology

In clustering technology, Oracle is light years ahead, since SQL Server has nothing like Oracle Parallel Server/RAC -- two instances acting on the same data in active-active configurations. And with the new version of Parallel Server in Oracle 9i, renamed as the Oracle Real Application Clusters, there is diskless contention handling of read-read, read-write, write-read, and write-write contention between the instances. This diskless contention handling is called Cache Fusion, and it means for the first time, any application can be placed in a cluster without any changes, and it scales upwards by just adding another machine to the cluster. Microsoft has nothing like this.

Reliability

In SQL Server Standard Edition there is no ability to mirror the transaction log files. In Enterprise Edition there is a log shipping process that is not so reliable.
If the logs fill up the disk, the database will crash hard.
Sometimes this requires the server itself to be rebooted.

Summary

SQL Server is clearly positioned between Microsoft Access and Oracle in terms of functionality, performance and scalability. It is a good workgroup-level solution, a very quick time to market solution, and is very simple to use and administer. Oracle is much more advanced and has more to offer for larger applications with both OLTP and data warehouse applications. Its new clustering features are ideal for Application Service Providers (ASPs) on the Internet, who can now start with a cluster of two small servers and grow by just adding a server when they need to.
User avatar
AnyaGal
Уже с Приветом
Posts: 5771
Joined: 02 Dec 1999 10:01
Location: Saint-Petersburg --> Bellevue, WA

Post by AnyaGal »

Писал явно Oracle-biased человек. Сейчас придут спецы по SQL Server-у и ответят по всем пунктам. :)

Не верю что по всем пунктам Oracle даст очко вперед SQL Server.

На всякий случай я за SQL Server болеть буду (как говорится, ну я тебя выбираю, тебя я знаю давно, а этого кота вижу в первый раз (c) Простоквашино) :)
User avatar
Sabina
Уже с Приветом
Posts: 5669
Joined: 13 Oct 2000 09:01
Location: East Bay, CA

Re: comparison between Oracle 9i and SQL Server 2000

Post by Sabina »

Другая тема, но все-таки может кто-нибудь добавит к моему списку
-----------------
What are the major differences between oracle 7 and oracle 8/9 ?

- Oracle 7 - RDBMS while since Oracle 8,9 - ORDBMS (objects were added);
- You can store and execute plsql units as part of the object they refer to…
- Improved performance of oltp (larger buffer caches, improved sharing of runtime data structures and deferrable constraints)
- Parallel execution of insert, update, delete
- Data warehousing features (Partitioning support and parallel-aware query optimization)
- Functions can change tables
- Support distributed and multi-tiered client-server web based applications
- Supports all types of data
User avatar
Sabina
Уже с Приветом
Posts: 5669
Joined: 13 Oct 2000 09:01
Location: East Bay, CA

Post by Sabina »

AnyaGal wrote:Писал явно Oracle-biased человек. Сейчас придут спецы по SQL Server-у и ответят по всем пунктам. :)

Не верю что по всем пунктам Oracle даст очко вперед SQL Server.

На всякий случай я за SQL Server болеть буду (как говорится, ну я тебя выбираю, тебя я знаю давно, а этого кота вижу в первый раз (c) Простоквашино) :)


Ну это все понятно - "Спартак - чемпион" :wink:
А я вот за Оракл буду болеть, у меня по нему завтра интервью. А не возьмут, тогда может и передумаю :mrgreen:

Сабина
Rain_Man
Posts: 9
Joined: 13 May 2004 14:52
Location: Ukraine,Kiev

Re: comparison between Oracle 9i and SQL Server 2000

Post by Rain_Man »

Sabina wrote:Другая тема, но все-таки может кто-нибудь добавит к моему списку
-----------------
What are the major differences between oracle 7 and oracle 8/9 ?

- Oracle 7 - RDBMS while since Oracle 8,9 - ORDBMS (objects were added);
- You can store and execute plsql units as part of the object they refer to…
- Improved performance of oltp (larger buffer caches, improved sharing of runtime data structures and deferrable constraints)
- Parallel execution of insert, update, delete
- Data warehousing features (Partitioning support and parallel-aware query optimization)
- Functions can change tables
- Support distributed and multi-tiered client-server web based applications
- Supports all types of data


Еще могу добавить такой список:)
Orcale 8i против Oracle 8(ну и ессно Oracle 7, если надо могу еще добавить 9i и 10g:) :
1. Разработка приложений Java
1.1. VM Java в составе базы данных
1.2. Хранимые процедуры Java, функции, и триггеры
1.3. Полное взаимодействие между Java, SQL и PL/SQL
1.4. Встроенные операторы SQL в Java-коде SQLJ
1.5. Усовершенствованные драйверы JDBC
2. Управление содержимым
2.1. interMedia
2.2. iFS
3. Хранилища данных
..
3.4. Переносимые табличные пространства
3.5. Функциональные индексы и виртуальные столбцы
3.6. Онлайновое формирование и перестройка индексов
3.7. Убывающие индексы
3.8. Автоматизация определения степени параллелизма при выполнения
запроса
3.9. Соединенные индексы и автоматически поддержи-ваемые итоговые
представления
3.10. Резервная база данных "только для чтения"
3.11. API прямой загрузки
3.12. Новые возможности битовых индексов
3.13. Функция выборки
3.14. Параллельный и детализированный оператор ANALYZE
3.15. Состояние отмены автоматического подтверждения выполнения
ограничений
3.16. Копирование статистик
3.17. Операция СЛИЯНИЯ (MERGE) разделов (секций)
3.18. Оптимизация запросов типа "первые n"
4. Обработка транзакций
4.1. Возможности публикации и подписки
4.2. Триггеры событий базы данных
4.3. Автономные транзакции
4.4. Хешированный кластер для единственной таблицы
4.5. Столбцы объектных типов в секционированных таб-лицах
4.6. LOB в секционированных таблицах
4.7. Секционированные индекс-таблицы
4.8. Стабильные планы выполнения оптимизатора
5. Параллельный Сервер Oracle
5.1. Сервер Согласованного Чтения (Consistent Read Server) для
масштабируемых запросов между экземп-лярами
5.2. Мастера Установки
5.3. Автоматическая балансировка загрузки соединений
5.4. Принудительное выполнение задания на конкретном узле
6. Объектно-реляционная база данных
7. Временные LOB
8. Декомпозиция коллекций
9. Расширения представлений объектов
10. Расширения кэша объектов
11. Усовершенствование SQL*Loader для поддержки загрузки объектов,
коллекций и LOB
12. Усовершенствование производительности при работе с LOB
13. Миграция данных из LONG в LOB
14. Определяемые пользователем идентификаторы объектов и идентификаторы
вложенных таблиц
15. Обнаружение "висящих" ссылок (REF) с помощью операто-ра ANALYZE
16. Защита данных и детализированное управление доступом
17. Расширяемая и управляемая параметрами спецификация контекста
приложения
18. интеграция с LDAP
19. N-уровневая аутентификация/авторизация
20. Поддержка SSL и X.509v3
21. Адаптер RADIUS
22. Управление системой и удобство использования
22.1. Многопользовательский Oracle Enterprise Manager на базе Java
22.2. Универсальный Установщик Oracle (Oracle Universal Installer) на
базе Java
22.3. Ассистент Конфигурирования Базы Данных (Database Configuration
Assistant) на базе Java
22.4. Автоматическая регистрация экземпляра программа-ми-листенерами
22.5. Параллельное восстановление параллельных транзак-ций
22.6. Удаление столбцов
22.7. Индикатор развития для долго длящихся операций
22.8. Усовершенствования производительности Менеджера Восстановления
(Recovery Manager)
22.9. Осведомленность Менеджера Восстановления о по-нятии дисковой
близости (предпочтение операций ввода/вывода на своем узле)
22.10. Автоматизированная резервная база данных
22.11. Ограничение времени восстановления экземпляра
22.12. Обнаружение и восстановление поврежденных бло-ков
22.13. Локально управляемые табличные пространства
22.14. Многочисленные архивные процессы и адресаты
22.15. Упрощение восстановления табличных пространств к назначенному
времени
23. Автоматизация репликации/учрежденческой деятельности
23.1. Использование шаблонов снимков для облегчения массового
развертывания
23.2. Автономная установка экземпляра
23.3. Выделение подмножеств уровня столбцов в обнов-ляемых снимках
23.4. Перенесение пакетов репликации в ядро БД
23.5. Увеличение производительности обновления снимков
23.6. Оптимизация распределенных запросов
23.7. Усовершенствования модели защиты данных
23.8. Поддержка Oracle Lite
24. Усовершенствования PL/SQL
24.1. Манипулирование в PL/SQL многими компонентами данных в рамках
одного оператора SQL (большие связи)
24.2. Передача параметров по ссылке в PL/SQL
24.3. Встроенный в PL/SQL динамический SQL
24.4. Охват кодов PL/SQL от поставщиков инструменталь-ных средств
24.5. Неограниченные размеры пакетов PL/SQL
25. Расширяемость
25.1. Расширяемое индексирование
25.2. Расширяемый оптимизатор
25.3. Услуги картриджей данных
25.4. Внешние процедуры Pro*C
25.5. Регистрация обратных вызовов Oracle Call Interface
25.6. Вторичные индексы в индекс-таблицах
25.7. Поддержка объектов во внешних процедурах
26. Прочее
26.2. Временные таблицы
26.3. Выполнение подпрограмм с полномочиями вызвав-шего приложения
26.4. Интеграция с Microsoft Transaction Server
26.5. Протокольный адаптер HTTP для Net8T
26.6. Улучшение производительности при обработке фразы RETURNING
RainMan
Rain_Man
Posts: 9
Joined: 13 May 2004 14:52
Location: Ukraine,Kiev

Post by Rain_Man »

Sabina wrote:Ну это все понятно - "Спартак - чемпион" :wink:
А я вот за Оракл буду болеть, у меня по нему завтра интервью. А не возьмут, тогда может и передумаю :mrgreen:
Сабина


Чемпион конечно Динамо :wink:
А Вам желаю удачи!
RainMan
Lazy44
Уже с Приветом
Posts: 525
Joined: 01 May 2002 20:29
Location: CT->MA->TX->UT

Post by Lazy44 »

Sabina,
Some data obsolete. For example lock escalation - M$ fixed it.
zVlad
Уже с Приветом
Posts: 15409
Joined: 30 Apr 2003 16:43

Post by zVlad »

Lazy44 wrote:Sabina,
Some data obsolete. For example lock escalation - M$ fixed it.


How? Can you tell a little bit more about it, please.

In Sabina's provided comparison it says:

"...Also, SQL Server will escalate row locks to page level locks when too many rows on a page are locked. This locks rows which are uninvolved in any updates for no good reason."

I doubt that escalation is performed from row level to page level. In my opinion, it should be to table level. MS SQL people could you, please, comment it?
User avatar
cityzen
Уже с Приветом
Posts: 3759
Joined: 11 Feb 2004 13:37

Re: comparison between Oracle 9i and SQL Server 2000

Post by cityzen »

Sabina wrote:SQL Server has no multi-version consistency model, which means that "writers block readers and readers block writers" to ensure data integrity. In contrast, with Oracle, the rule is "readers don't block writers and writers don't block readers." This is possible without compromising data integrity because Oracle will dynamically re-create a read-consistent image for a reader of any requested data that has been changed but not yet committed. In other words, the reader will see the data as it was before the writer began changing it (until the writer commits). SQL Server's locking scheme is much simpler (less mature) and will result in a lot of delays/waits in a heavy OLTP environment.




Тенг-и-и-з!
One small step for me ...One giant leap for.. A frog?
NNemo
Уже с Приветом
Posts: 1935
Joined: 15 Sep 2003 17:49
Location: Ukraine, Mariupol -> USA everywhere :-)

Post by NNemo »

Yukon now supports versioning.
AFAIK, even older versions can lock separate records and pages if table has apropriate indices.
User avatar
Sabina
Уже с Приветом
Posts: 5669
Joined: 13 Oct 2000 09:01
Location: East Bay, CA

Re: comparison between Oracle 9i and SQL Server 2000

Post by Sabina »

cityzen wrote:Тенг-и-и-з!


Ну вот чуть что..."I want my Momma!" Image

Да я сама на 99,9% уверена что Тенгиз знает гораздо больше чем тетка(дядька) написавшие эту (не первой свежести кстати) статью.
Но ведь говорить что-то надо на интервью :pain1: А выяснять кто прав, кто виноват - некогда :mrgreen:
User avatar
YellowMan
Уже с Приветом
Posts: 1099
Joined: 30 Sep 1999 09:01
Location: Bryansk,RUSSIA >> Dublin, Ireland

Post by YellowMan »

Да чего тут комментировать - большинство из вышесказанного имеет место быть, с небольшими передергиваниями - partisioned views еще никто не отменял. И совершенно верно подмеченно что продукты лежат в разных нишах - SQL Server заточен под мелкие и средние бизнесы, Оракл - под средние и большие: никто же не будет стрелять из пушек по комарам.
Правда ни слова не было сказано про то что SQL Server банально быстрее работает, требует меньшего железа при сравнимой производительности, значительно меньше стоит и проще администриться.
Удачи@С.Смирнов
User avatar
YellowMan
Уже с Приветом
Posts: 1099
Joined: 30 Sep 1999 09:01
Location: Bryansk,RUSSIA >> Dublin, Ireland

Post by YellowMan »

zVlad wrote: I doubt that escalation is performed from row level to page level. In my opinion, it should be to table level. MS SQL people could you, please, comment it?


Совершенно верно, именно так и бывает - со страницы на таблицу... Все равно когда полтаблицы залочено страничными локами всем остальным работать становиться очень некомфортно
Удачи@С.Смирнов
User avatar
Sabina
Уже с Приветом
Posts: 5669
Joined: 13 Oct 2000 09:01
Location: East Bay, CA

Re: comparison between Oracle 9i and SQL Server 2000

Post by Sabina »

Rain_Man wrote:1. Разработка приложений Java


Кстати меня этот вопрос на интервью тоже спросили (не Ораклы сравнить, а чем отличаются SQL Server от Oracle в плане написания хранимых процедур). Well, хотя бы одно отличие, благодаря вашему посту, быстро пришло в голову :)
User avatar
chepackav
Уже с Приветом
Posts: 1513
Joined: 03 Apr 2001 09:01
Location: London, UK

Re: comparison between Oracle 9i and SQL Server 2000

Post by chepackav »

Что-то я не понял - разве LEFT JOIN в стандарте SQL нету?
Я уж не берусь комменировать Оракловский синтакс с плюсиками.

Return to “Вопросы и новости IT”