Turn: What is the difference between MySQL and Oracle?
1. Oracle is a large database, while Mysql is a small and medium-sized database. The market share of Oracle is 40%. Mysql is only about 20%. At the same time, Mysql is open source and Oracle is very expensive.
2. Oracle supports high concurrency and high traffic, and is the best tool for OLTP. 3. the space used for installation varies greatly. Mysql is only 15 MB after installation, and Oracle is about 3 GB. Oracle occupies a very large amount of memory space and other machine performance. 4. oracle also has some differences in Mysql operations. ① primary key Mysql generally uses the auto-increment type. When creating a table, you only need to specify the primary key of the table as auto increment. when inserting a record, if you do not need to specify the primary key value of the record, Mysql will automatically grow. Oracle does not have an automatic growth type. The sequence of the primary key is generally used. When you insert a record, you can pay the next value of the serial number to this field; only the ORM framework requires a native primary key generation policy. ② Single quotation marks can be used to enclose strings in MYSQL, and only single quotation marks can be used to enclose strings in ORACLE. You must replace single quotes before inserting and modifying strings: replace all the existing single quotes with two single quotes. ③ The processing of paging SQL statements is relatively simple for MYSQL to process paging SQL statements, starting with LIMIT and recording the number of records; it is complicated for ORACLE to process paging SQL statements. Each result set has only one ROWNUM field to indicate its location, and only ROWNUM <100, ORACLE cannot process long strings with ROWNUM> 80 ④ long strings. The maximum length of a string that can be operated during INSERT and UPDATE is less than or equal to 4000 single bytes. If you want to INSERT a longer string, use the CLOB type for the field to use the DBMS_LOB package that comes with ORACLE. Before inserting a modification record, you must make a non-null and length judgment. If the field value cannot be blank or the field value beyond the length is exceeded, a warning should be given, and the last operation is returned. ⑤ Empty Character Processing MYSQL non-empty fields are also empty content, ORACLE defines non-empty fields are not allowed to be empty content. The ORACLE table structure is defined based on the not null value of MYSQL. errors may occur when data is imported. Therefore, when importing data, you need to judge the NULL character. If it is NULL or NULL, you need to change it to a space string. ⑥ Fuzzy comparison of strings MYSQL uses the field name like '% string %', and ORACLE can also use the field name like '% string %'. However, this method cannot use indexes and is not fast. 7. Oracle has implemented most of the functions in ansii SQL, such as the transaction isolation level and propagation features. Mysql is still relatively