You have in your hands — a comprehensive guide to the SQL language, aimed at helping not just to master the syntax, but to deeply understand the principles of working with data and become a sought-after specialist. You will start from absolute zero, and each step — from installing the DBMS to complex queries — will be supported by practical examples (online store, fitness club, banking system, computer game, taxi fleet, airport registration system, monitoring patient status in a hospital, etc.) and detailed explanations.
Understanding that there is no perfect DBMS in the world, the book examines each concept using examples from the three most popular systems: MySQL, PostgreSQL, and Microsoft SQL Server. This approach will allow you to see their strengths and weaknesses in practice and get rid of the fear of the «unknown» environment, becoming a truly flexible specialist.
Particular attention is paid to «painful» topics that often remain behind the scenes in textbooks but are critically important in practice: the nuances of data types, encodings, and collations, integrity assurance mechanisms, transactions, isolation levels, and locking. You will understand not only «how it works» but also «why it works this way». The book also goes beyond pure SQL and addresses architectural issues: strategies for «soft» deletion, the pros and cons of moving business logic into stored procedures, security principles, and access management, etc.
A separate focus is made on designing tables, indexes, and analyzing query execution plans. You will learn to write not only working but also efficient queries. This skill is the key competence in real work and the main difference between an amateur and a professional. This book is not only an ideal start for novice developers, analysts, and future DB administrators but also beneficial for specialists already working with DBMS: in addition to deep theoretical knowledge, the book provides real practical confidence in working with the three main DBMS on the modern market.