Чем sql отличается от mysql

от admin

MySQL vs SQL: Overview, Similarities, Differences

SQL Server vs MySQL is a hot argument since both are the two most popular database management systems out there. In this article, we will explain what they are and how they differ so you can pick the most fitting one for your project.

What’s the Difference Between MySQL and SQL?

The main difference between MySQL and SQL is that MySQL is a specific type of SQL database management system, while SQL is a standard language used to manage databases. MySQL is a relational database management system (RDBMS) that uses SQL as the standard query language, it’s known for its scalability and open-source availability, while SQL is a widely recognized language used across various industries.

RDBMS and SQL: A Short Introduction

Before we compare SQL Server vs MySQL, let’s start from the basics.

A Database Management System is a collection of programs that enable users to access, manipulate, and display the data stored within databases. It has a lot of types, with the Relational Database Management System (RDBMS) being the most well-known.

RDBMS, as its name suggests, is a system used to manage a relational database. Within it, data organization is defined as a relationship between columns and rows in a bunch of tables. Each column represents a specific attribute of data, while each row records its value. Both SQL Server and MySQL fall under this category.

Relational databases are operated, secured, optimized, and maintained using Structured Query Language (SQL). Its syntaxes are almost similar in most RDBMS software, with some variations here and there.

SQL Server vs MySQL: Overview and Similarities

Before we compare their differences, let’s start with a brief overview of our options:

What is SQL Server?

The SQL Server, also known as Microsoft SQL Server (MSSQL), has been around far longer than MySQL. SQL Server was developed by Microsoft in the 80s. Since then, it has become the go-to platform for large-scale enterprises due to its scalability and reliability.

Microsoft offers tools and services for data management and business intelligence as a part of the MSSQL. For data management, there’s SQL Server Integration Services (SSIS) and Data Quality Services, to mention a few. For data analysis, there’s SQL Server Reporting Services (SSRS) and SQL Server Analysis Services (SSAS).

What is MySQL?

Developed in the mid-90s by MySQL AB (later acquired by Oracle), MySQL was one of the first open-source database management systems and remains so to this day. While it has a lot of variants, they are not too different in terms of syntax and basic functionality.

It is typically used in conjunction with PHP and Apache Web Server, on top of a Linux distribution. This phenomenon leads to the famous LAMP (Linux, Apache, MySQL, PHP) acronym.

If you wish to read more about this topic, check out this article.

Similarities

Since SQL Server and MySQL are RDBMS, they share a few common features:

  • Scalable and high-performing — they’re both as efficient in handling smaller-scope projects as they are for bigger ones.
  • Multi-database support — users can host many databases on one server.
  • Parameters — both use foreign and primary key constraints to define tabular relationships.
  • Index-usage — both use indexes to optimize performance and to sort data.

However, many developers tend to specialize in one system due to the differences in their underlying architecture and certain features. We will discuss this further below.

SQL Server vs MySQL: Key Differences

Now that we’ve got an outline of what these systems are and what they do, let us look at several key differences between MySQL and SQL Server:

Cost

When it comes to SQL vs MySQL, the easiest difference between the two would be the cost. Microsoft requires users to buy licenses to access SQL Server’s full features. In contrast, MySQL falls under the General Public License (open source), which makes it completely free to use. The latter only requires you to pay for technical assistance should you need it.

Default Compatibility

SQL Server is mainly intended for developers who are using .NET as their development language, while MySQL can work with just any language, most notably PHP.

MySQL is compatible with every major operating system out there, even though it is traditionally associated with Linux. Meanwhile, SQL Server used to run exclusively on Windows, but this has changed since 2016 when Microsoft announced Linux and Mac support. However, so far you can only run the latter in a Docker container.

Syntax

While both MySQL and SQL Server are based on SQL, differences in syntax are still prominent and worth keeping in mind. For instance, look at the following example:

Microsoft SQL Server
MySQL

Both chunks of code achieve the same result — returning three entries with the youngest age from a table named Person.

Of course, the syntax is subjective, so there’s no clear winner in this round of SQL vs MySQL. Go with whichever seems more intuitive for you. The full list of implementational changes between MySQL and SQL Server can be found here.

Storage engines

Another big difference between the two is the way they store data. SQL Server uses a single storage engine developed by Microsoft. In contrast, MySQL gives developers much more flexibility, as they can use different engines for different tables that are based on speed, reliability, or some other dimensions. Two of the most popular MySQL storage engines are InnoDB and MyISAM.

Filtering Method

MySQL users, tables, and rows can be filtered in several ways. However, it requires users to run multiple queries on each database individually, as opposed to SQL Server’s database-per-database, row-based filtering. The latter streamlines the whole process so developers can filter out rows without considering the number of databases hosted on the server.

Backup and Restoration

When you back up a MySQL database, the data are extracted as SQL statements. As a result, backing up and restoring a huge amount of data can take forever due to the execution of multiple SQL statements.

Furthermore, to avoid inconsistency, MySQL will lock the database during the backup process. This lock makes your database unusable.

However, you can override this by using the mysqldump utility alongside a specific flag:

This will backup your database tables without locking them. In case you want to back up large tables, use the –quick flag as well.

Meanwhile, users of SQL Server doesn’t have to go through that situation. SQL Server won’t lock the database, so you still can use it during the backup process.

Security

Both tools are EC2 compliant, which means they adhere to security standards designed for safe cloud computing. However, there’s a notable difference in how they restrict access to the database.

MySQL allows its database files to be edited and accessed by other processes during runtime. This, however, isn’t the case with SQL Server, as its users are required to run an instance to perform the function. It makes SQL Server less prone to hacking as the data cannot be manipulated or accessed directly.

Community Support

While you can pay for MySQL support, the scenario rarely arises due to its stellar community contribution and support. Most people do not have to reach out for official assistance as they can search the web and find a ton of solutions.

On the other hand, since SQL Server is a paid service, you won’t get much community support. If you need any assistance, you can refer to its official support page.

Integrated Development Environment

It is important to note that both RDMBSs support different Integrated Development Environment (IDE) tools. These tools offer a cohesive environment for development and your choice entirely depends on your project.

The best IDE tool for MySQL is MySQL Workbench, while SQL Server Management Studio is the best option for SQL Server. Both have their pros and cons and might tip the balance if you have nothing else left to base your decision on.

Conclusion

In this guide, we have discussed the strengths and weaknesses of SQL Server vs MySQL.

Ultimately, the choice is yours. As a rule of thumb, if you’re developing small or medium-sized applications and predominantly use PHP, go with MySQL. On the other hand, if you’re interested in building large-scale, secure, resilient enterprise applications, SQL Server should be right up your alley.

Читать:
Как добавить свой узор в фотошоп

So which one would you choose? Let us know in the comments below!

Domantas leads the content and SEO teams forward with fresh ideas and out of the box approaches. Armed with extensive SEO and marketing knowledge, he aims to spread the word of Hostinger to every corner of the world. During his free time, Domantas likes to hone his web development skills and travel to exotic places.

Чем отличается MySQL от SQL

Здравствуйте, недавно начал изучать программирование с C# и понял что надо изучать базы данных, не могу понять, что есть что, есть ли разница между MySQL и SQL?

SQL — это стандартизированный язык запросов. А MySQL — это одна из систем управления базами данных, «говорящих» на этом языке.

Коллеги все пишут верно. SQL — это язык программирования, на котором пишутся запросы к БД, а MySQL — одна из реализаций СУБД, которая имеет свой диалект языка SQL (вообще любая СУБД имеет свой собственный диалект SQL)

Позволю себе небольшой оффтопик:

SQL читается по русски как сИкуэл — с ударением на И . Допускается также и произношение ЭсКьюЭл, но иногда этот вариант произношения в некоторых кругах считается не совсем профессиональным. Некоторые адепты (Oracle/MS SQL), по этому произношению вычисляют новичков.

Никак не могу понять. Какие Отличия между mysql и sql?

SQL — это язык запросов для управления СУБД (система управления базами данных).
MySQL — это одна из таких СУБД.
phpMyAdmin — веб-приложение с открытым кодом, написанное на языке PHP и представляющее собой веб-интерфейс для администрирования СУБД MySQL.

QL это язык запросов, с синтаксисом я знаком.
Все что есть в phpMyAdmin создание таблиц, связи, кодировка и подобное, все это можно делать с помощью языка SQL через консоль. те. phpMyAdmin это грубо говоря визуализация SQL что бы нажимать на кнопочки, а не писать запросы SQL. Гже же тогда сама MySQL ?

  • Вопрос задан более трёх лет назад
  • 4886 просмотров
  • Facebook
  • Вконтакте
  • Twitter

27cm

SQL — язык, если точнее, множество стандартов языка. Вы можете написать запрос на SQL, но исполнить его может только конкретная СУБД.
MySQL / MariaDB / PostgreSQL — различные реляционные СУБД, выполняющие запросы.
PhpMyAdmin / MySQL Workbench / DBeaver — приложения, для удобной работы с различными СУБД.

What’s the difference between SQL and MySQL?

Before we dive in, let us define some key terms that are typically used interchangeably, but are important to distinguish in the coming discussion.

Key Terms

Database — an organized collection of logically related data arranged for ease and speed of retrieval [1][2].

Database management system (DBMS) — “a software system that is used to create, maintain, and provide controlled access to user databases” [1].

Story time

In 1970, a computer scientist named E. F. Codd blessed the world with the relational model, an idea rooted in the mathematics of relational algebra that gave us the now popular view of data organized as tables in DBMSes [3]. Four years later in 1974, Chamberlin and Boyce, Codd’s colleagues at IBM, proposed a structured query language based on the relational model they called SEQUEL [4].

SEQUEL was later renamed SQL because of a trademark conflict [5].

In the time following the publication of the relational model and SEQUEL papers, IBM competed with Oracle, then named Relational Software, Inc., to bring the first commercial implementation of SQL to market. Oracle won in 1979 with their SQL-based relational DBMS Oracle V2 [6][7].

Before the end of the next decade, the American National Standards Institute (ANSI) and the International Standards Organization (ISO) agreed to make SQL the standard language for managing relational databases in 1986 and 1987 respectively [1]. As database management needs changed over the years, the SQL standard has been updated to accommodate those needs.

Prior to the development of the relational model and SQL, managing databases was tedious. Developers had to organize and manipulate flat files — an approach to database management called file processing. Other models also suffered from a slew of problems that made database management more challenging [1].

Today, the relational model is the most widely adopted. It allows the flexibility developers need to organize and manage data, and SQL provides a declarative language to do so. Since this approach gained in popularity, most developers no longer need to write code to organize and manipulate files. High maintenance burdens associated with previous database management approaches were also eased.

What is SQL?

SQL is a declarative, structured query language for managing databases through DBMSes that implement the relational model. This is historically accurate, but SQL’s unquestionable success has caused some DBMS and query language developers to implement SQL as the query language for modern non-relational databases. One example of such a decision is Amazon Redshift [8][9].

SQL may also refer to the ANSI/ISO standards that specify the features and behaviors of a SQL language. Typically, when discussing SQL standards, the year the standard was published is indicated. For example, the standards were initially referred to as SQL-86, SQL-89, and SQL-92, but later took the form SQL:1999, SQL:2003, and SQL:2006.

What is MySQL?

So far, we’ve discussed SQL as a language and a standard.

Languages that implement the SQL standard are often called flavors, variants, or dialects of SQL, and we say these languages are compliant with whatever version of the SQL standard they implement.

MySQL is a DBMS that allows us to develop and manage databases using its own flavor of SQL.

SQL flavors are different from standard SQL in that they implement extensions — that is, additional language features that go beyond those specified in the SQL standards. Furthermore, these flavors differ among themselves by the extensions they implement, how the extensions behave, and minor differences in syntax, among other differences.

SQL is supposed to be standard, so why do all these different SQL flavors exist?

This is a fair question. One reason is that the developers of these DBMSes and SQL flavors found the SQL standard lacking in specifications for functionalities they deem important to their customers. This leads them to implement extensions that meet their customers’ needs.

Minor differences in syntax may also stem from the aesthetics of the original language and DBMS developers which are maintained for backwards compatibility and ease of migration to future versions of their systems.

Yet another reason for some differences is that the developers may make design decisions to fulfill non-functional requirements, such as performance and convenience, that lead them to implement things a bit differently.

The SQL standards ensure there is a consistent set of features that function in a particular manner. This makes it so that we don’t have to learn and use an entirely new language simply because we’re using a different DBMS.

You can use other relational DBMSes knowing that SELECT, FROM, WHERE, GROUP BY, HAVING, and ORDER BY, for example, are all available to you and behave consistently.

Conclusion

SQL may refer to the structured query language used to manage relational databases. It can also refer to the standards that specify the features and behaviors of the language.

MySQL is a DBMS that implements or uses its own flavor of SQL.

References

  1. Hoffer, Jeffrey A., Ramesh V., Topi H. Modern Database Management. Pearson Education, 2010.
  2. “Database — Definition, Examples, Related Words and More at Wordnik.” Wordnik.com, www.wordnik.com/words/database.
  3. Codd, E. F. “A Relational Model of Data for Large Shared Data Banks.” Communications of the ACM, vol. 13, no. 6, 1970, pp. 377–387., doi:10.1145/362384.362685.
  4. Chamberlin, D. D, Boyce, R. F. 1974. SEQUEL: A structured English query language. In Proceedings of the 1974 ACM SIGFIDET (now SIGMOD) workshop on Data description, access and control (SIGFIDET ’74). Association for Computing Machinery, New York, NY, USA, 249–264. DOI:https://doi.org/10.1145/800296.811515
  5. “SQL Trademark Information.” Trademarkia.com, https://trademark.trademarkia.com/sequel-73346503.html
  6. “History of IBM.” IBM.com, https://www.ibm.com/ibm/history/history/year_1978.html
  7. “Oracle V2.” Universität Klagenfurt, http://cs-exhibitions.uni-klu.ac.at/index.php?id=403
  8. “What is Columnar Database? — AWS.” Amazon.com, https://aws.amazon.com/nosql/columnar/
  9. “Amazon Redshift SQL.” Amazon.com, https://docs.aws.amazon.com/redshift/latest/dg/c_redshift-sql.html

Thank you Hannah M. Clark, Mickaylia Johnson, and Tajay Marshall for reading drafts of this.

Похожие статьи