Chapter 3
Welcome to chapter three. You have mastered the majority of the basics of sql. Now that you can manage the data in your database only some special but very important stuff is missing.
To better understand what is going on in our database we will take a look at the query planers first. We will use these over and over again in this chapter to check if our changes really help us with our queries.
They key of a good database is data consistency. For this we have a lot of tools at our hand like auto increments to create an automatically incrementing and unique id for our entries, indices which can validate that a value in a column is unique over the whole table. Or stuff like foreign keys which help us to maintain data consistency over multiple tables.
Additionally, we have stuff called aggregations to transform our data and create cool overviews and statistics.
In the end we will take a look at a basic normalization and a very important thing when using normalization. Joints are used to combine multiple tables to a new table allowing us to access new datasets.