MySQL 9.7 basics: understand the server, storage engines, and transactions
MySQL is an open-source database management system for relational data queried with SQL. MySQL Server handles connections and SQL execution, while a table's storage engine implements how its data is stored and how transactions work. In MySQL 9.7, InnoDB is the default engine for new tables, so beginners should learn to distinguish the server from InnoDB. This guide follows the official MySQL 9.7 manual reviewed on 23 November 2026.
What do the server and database do?
A DBMS does more than keep data in tables: it receives SQL requests and applies rules when reading or changing records. MySQL Server accepts connections from clients such as the mysql command-line program or an application using JDBC or another connector, processes SQL, and returns results. What is MySQL? · Main features
A relational database organizes data into tables of rows and columns. For example, customers can hold customer records and orders can refer to them through customer_id. A primary key identifies a row; a foreign-key constraint checks that a referenced row exists. SQL creates tables, selects rows, and inserts, changes, or deletes values. SQL features and details can differ among database products, so compatibility matters when moving queries between them. What is MySQL?
Use CREATE DATABASE to create a database and USE to select one for the current session. Creating another database does not create another server process or physical machine. Actual isolation, permissions, backups, and network boundaries depend on server configuration and operations. Creating and selecting a database
How is a storage engine different from the SQL server?
MySQL Server handles shared work such as SQL syntax, connections, permissions, and query planning. A storage engine implements table-level details for storing, reading, and changing rows. The engine is not just a speed switch: it affects transactions, locks, foreign keys, and recovery behavior. MySQL lets you choose an engine per table. Storage engine architecture
In MySQL 9.7, InnoDB is the default for new tables unless configured otherwise. It supports commit, rollback and crash recovery, row-level locking, foreign keys, consistent reads, and multiversion concurrency control (MVCC). Row locks can reduce needless blocking among users, but do not eliminate lock waits or deadlocks. Introduction to InnoDB
Unless you need a specialized engine feature, start by evaluating InnoDB for application tables. Engines differ in features and transaction guarantees. If a requested engine is unavailable, configuration can cause substitution, a warning, or an error. Check what the server actually supports with SHOW ENGINES and confirm the table definition after deployment. Do not assume tables using different engines share one uniform rollback or recovery guarantee. Setting the storage engine · Storage engines
How do a query and engine work together?
The following hypothetical shop schema is illustrative and was not run on a server:
CREATE DATABASE shop;
USE shop;
CREATE TABLE inventory (
product_id BIGINT PRIMARY KEY,
quantity INT NOT NULL
) ENGINE = InnoDB;
CREATE TABLE orders (
order_id BIGINT PRIMARY KEY,
product_id BIGINT NOT NULL,
quantity INT NOT NULL,
FOREIGN KEY (product_id) REFERENCES inventory(product_id)
) ENGINE = InnoDB;
SELECT order_id, product_id, quantity
FROM orders
WHERE product_id = 42
ORDER BY order_id DESC;USE selects the session's database; FROM orders identifies a table in it. The server parses SQL and chooses a plan, and InnoDB accesses the table's rows and indexes. ORDER BY states the desired result order; do not rely on physical row or primary-key order unless SQL requests it. Whether an index helps depends on the data and execution plan.
The foreign key helps prevent an order from referring to a nonexistent product, but it does not enforce the full business rule “is enough stock available?” To process an order safely, an application can check and decrement stock inside an InnoDB transaction, verify that one row was affected, and insert the order only on success. If the condition fails or a later step errors, roll back. The application must check the affected-row count; otherwise it could commit an order despite insufficient stock. Locking and retry choices depend on the application's concurrency design.
What do transactions and isolation levels guarantee?
MySQL enables autocommit by default: outside an explicit transaction, each statement commits its own change when it completes. That is different from grouping multiple statements as one business operation. Use START TRANSACTION or BEGIN, then COMMIT if all steps are valid or ROLLBACK if they should be canceled. Client libraries may also manage transaction boundaries, so make sure the application does not manage them twice. START TRANSACTION, COMMIT, and ROLLBACK
InnoDB's default isolation level is REPEATABLE READ. Consistent reads in a transaction use the snapshot established by its first read. Under READ COMMITTED, each consistent read gets a fresh snapshot. Isolation affects which concurrent changes a transaction can see and what locking or waiting it encounters. A higher level is not automatically faster or always the right choice; session/server settings can override defaults, and engine behavior matters. InnoDB transaction isolation levels
Conceptually, order processing might look like this:
START TRANSACTION;
-- Check stock while decrementing it; the app checks affected rows.
-- Insert the order only if that check succeeds.
COMMIT;
-- Otherwise, use ROLLBACK instead of COMMIT.The comments describe application logic, not a complete executable procedure. If the application commits without checking whether the stock update matched a row, the result can violate the business rule. Mixing nontransactional tables into the operation can also weaken rollback expectations.
What should you check when evaluating MySQL?
MySQL with InnoDB is one option for applications that need relational tables, SQL, foreign keys, and transactions. The product name alone does not settle whether it fits. Verify the connector and SQL features your application uses, the MySQL version provided by the operating system or host, the active storage engine, character set and collation, permissions, and backup/recovery plan. Do not assume features of a commercial edition or managed service are present in every Community Server setup. Features and connectivity · MySQL 9.7 manual
Think in three layers: the client connects and sends SQL; MySQL Server handles syntax, permissions, and planning; the table's storage engine handles the data operations, locks, and transaction behavior. This model helps narrow down where to investigate when one table behaves differently from another.
Scope and sources
This conceptual introduction follows the official MySQL 9.7 manual reviewed on 23 November 2026. Installation, account security, tuning, replication, backup/recovery, and provider-specific differences are out of scope. SQL examples are illustrative; no MySQL server or performance test was used.
[MySQL 9.7: What is MySQL?](https://dev.mysql.com/doc/refman/9.7/en/what-is-mysql.html)
[MySQL 9.7: Main features](https://dev.mysql.com/doc/refman/9.7/en/features.html)
[MySQL 9.7: Creating and selecting a database](https://dev.mysql.com/doc/refman/9.7/en/creating-database.html)
[MySQL 9.7: Introduction to InnoDB](https://dev.mysql.com/doc/refman/9.7/en/innodb-introduction.html)
[MySQL 9.7: InnoDB transaction model](https://dev.mysql.com/doc/refman/9.7/en/innodb-transaction-model.html)
[MySQL 9.7: START TRANSACTION, COMMIT, and ROLLBACK](https://dev.mysql.com/doc/refman/9.7/en/commit.html)
[MySQL 9.7: InnoDB transaction isolation levels](https://dev.mysql.com/doc/refman/9.7/en/innodb-transaction-isolation-levels.html)
[MySQL 9.7: Setting the storage engine](https://dev.mysql.com/doc/refman/9.7/en/storage-engine-setting.html)
[MySQL 9.7: Storage engines](https://dev.mysql.com/doc/refman/9.7/en/storage-engines.html)