A SQL database is a relational database management system (RDBMS) that uses SQL (Structured Query Language) commands to manage, store, retrieve, process and organize data in a structured format.
Popular SQL database systems include Microsoft SQL Server, MySQL, PostgreSQL and Oracle.
SQL databases offer a standardized, efficient way to use SQL to manage, query and interact with structured data. Their flexibility makes them valuable in a variety of applications including web development, enterprise applications, data analysis and reporting. Organizations use SQL databases to support a wide range of uses from simple data storage to complex business intelligence systems.
Azure SQL Database from Microsoft Azure is an example of a SQL database offered as a scalable, managed, cloud-based relational database system.
There are several brands of SQL database, each with different options for licensing cost. Commonly used SQL databases include the following:
Microsoft offers several editions of SQL Server – both free and commercial – including Express, Developer, Evaluation, Enterprise, Web and Standard.
MySQL is a cost-free, open-source RDBMS that is well known for its use in web applications. MySQL is also available in commercial editions like MySQL Enterprise Edition, offering additional features and support in exchange for licensing fees.
PostgreSQL is another cost-free RDBMS. Its permissive, open-source license allows for subsequent use, modification and distribution of the software.
Note that the database software itself may be free, but the vendor may charge for support, maintenance or specific features. Check the website of each vendor for up-to-date information on proper usage, cost and licensing requirements.
Besides the fundamentals of using SQL to manage structured data, each brand of SQL database provides services that support database development, deployment and management.
SQL databases are built on a relational model, where data is stored in tables with rows and columns. With SQL, you can perform common operations like querying data, inserting new records and updating or deleting existing records. The ACID (Atomicity, Consistency, Isolation and Durability) properties of SQL databases ensure the reliability and integrity of database transactions. Elements like primary keys, foreign keys, unique constraints and check constraints ensure the accuracy of the stored data.
As an example of database services provided by a SQL database, consider those built into Microsoft SQL Server, as follows.
With SQL Server, users create and manage databases, define tables consisting of rows and columns, establish relationships among tables and transact using SQL. The relational model is an organized way to store and retrieve information.
SQL Server Integration Services (SSIS) is a data integration tool that helps facilitate the extraction, transformation and loading (ETL) of data among databases and systems.
SQL Server Analysis Services (SSAS) provides online analytical processing (OLAP) and data mining. It allows users to create multidimensional data models for complex analysis and reporting.
SQL Server Reporting Services (SSRS) is a server-based reporting platform for creating, deploying and managing reports. It supports a variety of report types including tabular, matrix and graphical.
SQL Server Machine Learning Services integrates with popular machine learning frameworks and languages like Python and R. It enables data professionals to run machine learning models directly within the SQL Server environment.
Database administrators (DBAs) and developers use tools for tasks like database design, development, monitoring, administration and performance tuning. Frequently used tools include the following:
SSMS is the primary tool that Microsoft provides for managing and administering SQL Server databases. It lets users connect to and manage SQL Server instances, write and execute Transact-SQL (T-SQL) queries, design and administer databases, create unit tests and automate tasks.
SSDT is an integrated development environment (IDE) for building, designing, testing and deploying SQL Server databases. Database developers use it to create and maintain database projects, design tables, write stored procedures and manage database schema.
This tool is used to configure and manage SQL Server services and network settings.
Profiler helps users capture and analyze events that occur in a SQL Server instance. It is often used for performance tuning, troubleshooting and auditing.
The SQL Server Data Tools extension to Visual Studio enables more extensive development of applications. The additional features provided by the extension integrate database development with application development.
This cross-platform database tool can be used with on-premises SQL Server and Azure SQL database. It includes features for writing and executing queries, managing databases and visualizing data.
DBAs and developers use this tool to execute T-SQL commands and scripts directly from the command line. It is useful for automating tasks and scripting.
This tool helps in optimizing the performance of queries and databases. It analyzes query workloads and suggests performance improvements such as indexes.
A lightweight performance monitoring system for SQL Server, Extended Events is used for tracing and monitoring events inside the database engine.
As essential processes for safeguarding your database environment, backup and recovery allow you to resume normal operation with minimal downtime in case of an outage.
As the name Structured Query Language suggests, SQL is neither a database nor a server but a programming language used for managing and interacting with relational databases.
In the context of databases, “server” refers to the database server, which stores data and manages the database. The combination of SQL and a database server allows you to manipulate the data stored in a SQL database.
SQL Server, developed by Microsoft, and MySQL, developed by Oracle, are both RDBMSes. Here is a comparison of their main characteristics:
SQL Server
MySQL
Platform support
Primarily designed to run on Windows. Also runs on Linux (Red Hat Enterprise Linux, SUSE Linux Enterprise Server and Ubuntu).
Runs on several operating systems including Windows, Linux and macOS.
Features
Includes advanced business intelligence tools, reporting services and integration services, plus robust support for advanced analytics and machine learning.
Provides a solid set of features for standard relational database needs. Advanced features for business intelligence and analytics may not be as extensive as those in SQL Server.
Performance
Features like in-memory OLTP and columnstore indexes offer performance at enterprise scale.
Well-reputed for performance and reliability. Support for multiple storage engines allows users to choose based on specific requirements.
Ease of use
Considered user-friendly. Its SSMS is a graphical management tool providing a comprehensive interface for database management.
Known for simplicity and ease of use. Graphical tools like MySQL Workbench make MySQL accessible to beginners.
Cost
Varies by edition and features. Express edition is free; Standard and Enterprise editions have associated licensing costs.
Core MySQL is open-source and free. Costs are associated with commercial support and access to some advanced features.