Congratulations, @name! You have finished the Catalog Hall - the hardest part of the Library. Your Pinakes is ready, the shelves are in order, and the Library finds every scroll fast and error-free. This is a great art that no ordinary scribe has mastered. Here is what you have mastered on this journey:
WHERE, JOIN and ORDER BY. the price is slower writes and more space taken, so we index with care.type and key columns you check whether MySQL used an index or laboriously searched the whole table.ON DELETE CASCADE and ON DELETE SET NULL rules decide the fate of related rows.| Concept | What for | |---------|----------| | INDEX | fast searching | | UNIQUE | uniqueness of values | | FOREIGN KEY | consistency between tables | | Normalization | no redundancy |
In the next location we will deal with transactions - the art of running many commands so that either all succeed or none leaves a trace. Your catalog is ready, so it is time to make writes safe. Onward, deeper into the Library!