Briefly describe the difference between MySQL and Oracle

Briefly describe the difference between MySQL and Oracle

1. Oracle is a large database while MySQL is a small to medium-sized database. Oracle has a market share of 40% while MySQL only has about 20%. In addition, MySQL is open source while Oracle is very expensive.

2. Oracle supports large concurrency and large access volume, and is the best tool for OLTP.

3. The space used for installation is also very different. After installation, MySQL only takes up 152M while Oracle takes up about 3G. In addition, Oracle takes up a particularly large amount of memory space and other machine performance when in use.

4. Some differences between Oracle and MySQL operations

①Mysql generally uses the auto-increment type for the primary key. When creating a table, you only need to specify the primary key of the table as auto increment. When inserting a record, you do not need to specify the primary key value of the record, and Mysql will automatically increase it. Oracle does not have an auto-increment type. The primary key generally uses a sequence. When inserting a record, just assign the next value of the sequence number to the field. It's just that the ORM framework only needs a native primary key generation strategy.

②Handling of single quotes In MYSQL, strings can be enclosed in double quotes, but in ORACLE, strings can only be enclosed in single quotes. Before inserting and modifying a string, single quotes must be replaced: all occurrences of a single quote are replaced with two single quotes.

③Processing of SQL statements for page turning: MYSQL's processing of SQL statements for page turning is relatively simple, using LIMIT to set the starting position and record the number; ORACLE's processing of SQL statements for page turning is relatively complicated. Each result set has only one ROWNUM field to indicate its position, and can only use ROWNUM<100, not ROWNUM>80

④ Processing of long strings ORACLE also has its special features in processing long strings. The maximum operable string length for INSERT and UPDATE is less than or equal to 4000 single bytes. If you want to insert a longer string, please consider using the CLOB type for the field and using the DBMS_LOB package that comes with ORACLE. Before inserting or modifying records, you must perform non-empty and length checks. Field values ​​that cannot be empty and field values ​​that exceed the length should issue a warning and return to the last operation. ⑤ Handling of empty characters: MYSQL's non-empty fields also have empty contents, while ORACLE does not allow empty contents in non-empty fields. Defining the ORACLE table structure according to MYSQL's NOT NULL will result in errors when importing data. Therefore, when importing data, you need to judge the empty character. If it is NULL or an empty character, you need to change it to a string of spaces.

⑥ Fuzzy comparison of strings uses field name like '% string%' in MYSQL, and can also be used in ORACLE. However, this method cannot use indexes and is not fast.

⑦Oracle implements most of the functions in ANSII SQL, such as transaction isolation level, propagation characteristics, etc., while MySQL is still relatively new in this regard.

The above is a brief introduction of the differences between MySQL and Oracle. I hope it will be helpful to everyone. If you have any questions, please leave me a message and I will reply to you in time!

You may also be interested in:
  • A brief discussion on the differences between the three major databases: Mysql, SqlServer, and Oracle
  • Mybatis foreach batch insert data: Introduction to the difference between Oracle and MySQL
  • A brief analysis of the difference between Oracle and MySQL paging
  • Detailed explanation of the difference between Oracle10 partitions and MySQL partitions
  • Introduction to the differences between paging query statements in Oracle, MySQL and SqlServe
  • 9 differences between Oracle and MySQL
  • The difference between Oracle and MySQL auto-increment columns (id)
  • Analyzing the difference between MySQL and Oracle update
  • Detailed comparison of syntax differences between MySQL and Oracle
  • Summary of the differences between Oracle and MySQL primary keys, indexes, and paging
  • Summary of the differences between MySQL and Oracle (comparison of functional performance, selection, SQL when using them, etc.)

<<:  Install docker offline by downloading rpm and related dependencies using yum

>>:  Detailed explanation of the role of brackets in AngularJS

Recommend

Detailed explanation of Angular routing sub-routes

Table of contents 1. Sub-route syntax 2. Examples...

Detailed explanation of the top ten commonly used string functions in MySQL

Hello everyone! I am Mr. Tony who only talks abou...

Complete steps for deploying confluence with docker

Confluence is paid, but it can be cracked for use...

Vue uses three methods to refresh the page

When we are writing projects, we often encounter ...

How to write memory-efficient applications with Node.js

Table of contents Preface Problem: Large file cop...

Design of image preview in content webpage

<br />I have written two articles before, &q...

UCenter Home site adds statistics code

UCenter Home is an SNS website building system rel...

Brief analysis of the MySQL character set causing database recovery errors

Importing data with incorrect MySQL character set...

How to implement vertical text alignment with CSS (Summary)

The default arrangement of text in HTML is horizo...

Optimized implementation of count() for large MySQL tables

The following is my judgment based on the data st...

Web standards learning to understand the separation of structure and presentation

When discussing Web standards, one thing that alwa...

Ubuntu 19.10 enables ssh service (detailed process)

It took me more than an hour to open ssh in Ubunt...