What 3 levels of MYSQL database consist from?
What kind of locking do you know?
2. Table Locking ( blocks all table )
What is ACID?
ACID is an acronym that describes four properties of a robust database system: atomicity, consistency, isolation, and durability.
What is transaction isolation level? What transaction isolation levels do you know?
Isolation levels define the degree to which a transaction must be isolated from the data modifications made by any other transaction in the database system
What is database transaction deadlock?
In a database, a deadlock is a situation in which two or more transactions are waiting for one another to give up locks.
For example, Transaction A might hold a lock on some rows in the Accounts table and needs to update some rows in the Orders table to finish. Transaction B holds locks on those very rows in the Orders table but needs to update the rows in the Accounts table held by Transaction A. Transaction A cannot complete its transaction because of the lock on Orders. Transaction B cannot complete its transaction because of the lock on Accounts
Where do we store MySQL tables?
In file system. MySQL creates file with .frm extension for each table and store data there ( for example animal.frm)
What is MVCC?
Multi versioning concurrency control (MVCC) is a database design theory that enables relational databases to support concurrency, or more simply multiple user access to common data in your database.
What kind of measure for testing db performance do you know?
What steps you can do to test your database?
- Save all request in the most loaded time ( from logs)
What is Profiling?
MySQL query profiling is a useful technique when trying to analyze the overall DB performance ( Gives you information about db performance)
Why do you need trigger?
You can use a trigger to backfill table column with duplication values to optimize select request from the table ( denormalization)
What is a shadow copy?
It allows you to create a new table, do ALTER operation there to not block the main table, then replace them.
What commands can block the whole table?
What can slow down your DB requests?
How caching understand that existing data haven’t changed (not outdated )?
What is a database table partitioning ( секционирование )?
Partitioning is the database process where very large tables are divided into multiple smaller parts. By splitting a large table into smaller, individual tables, queries that access only a fraction of the data can run faster because there is less data to scan. The main of goal of partitioning is to aid in maintenance of large tables and to reduce the overall response time to read and load data for particular SQL operations.
What is a trigger?
Trigger allows to run code after one of the following operations CREATE, UPDATAT OR DELETE
What is database event?
This is something similar to cron job. It allows you to run code at a specific time.
What is distributed transaction?
A distributed transaction is a set of operations on data that is performed across two or more databases. ( transaction between several databases)
What is replication? Why do we need it?
Replication is a copy of DB on another server.
We need it to:
What relations between replications servers you know?
What is scalability?
It’s the ability to scale the system when it’s necessary and has a good proportion between resources and workload.
What kind of scalability do you know?
- Horizontal scaling ( Adding more hardware to a system)
How to implement horizontal scaling?
- Separate debates to independent parts ( as contexts )