QUESTIONS
Questions for Tech Checks:
What are the main data types used in MySQL?
INT (many different types: TINYINT, MEDIUMINT, etc.), FLOAT, DOUBLE, CHAR, VARCHAR, DATE, TIMESTAMP
How do you create a database in MySQL?
CREATE DATABASE name;
What is an index in MySQL and why is it used?
An index is used for faster searching in the database. Data in the indexed column is indexed and sorted alphabetically for text or in ascending order for numeric types.
How can you optimize search operations in MySQL?
By indexing database columns.
What is data normalization and why is it needed?
A set of formalized rules regarding how to properly structure data in a database.
What is a stored procedure and in what cases should it be used?
A procedure (or function) that is stored in the database. It contains one or more database queries. It serves to logically combine a list of certain actions when the procedure is called. They are launched and executed directly on the server.
What are the potential disadvantages of using stored procedures?
Difficult debugging, hard to maintain, complex testing.
Describe the architecture of a MySQL database server.
Client-server architecture: - Client layer - executes queries, authorization. - Server layer - divided into the server layer and the engine layer. On the first, query processing, validation, caching, and threading take place, and on the second - data is stored. How exactly? Depending on the engine implementation.
What types of data storage are there in MySQL and how do they differ?
Transactional and non-transactional. Depending on the tasks at hand, you can use different ones, such as: InnoDB, MyISAM, Memory, CSV, Blackhole, Federated. They differ in read and write speed, transaction support, and storage method.