Class 9

Based on the 20/5/19 Dat602 class.

It’s all about joins. Our next couples of classes will be about joins and project work.

The whole of a relational database is that all of the data is related to each other. This is the point of them, each table relates to other tables via foreign keys. This is useful as it allows us to relate data from different tables together.

We have a lot of way for interacting with these intersections.

Normalization is about separating into set which are different and logically relate to each other, normalization also separates things so their is one primary key for each row and their is no transient dependence between each other. For this class we only have to bring our database to 3rd normal form. I am a little rusty on my 3rd normal form so I will have to do more research on this. The 3rd normal form will be useful as it will allow us to be able to be mostly sure that we wont brake anything or coarse extra work with our CRUD statements.

For joins we must find a link between the keys of a table. If one table doesn’t contain a link to another table then we must find a common link between them.

Inner joins only join where the two columns meet.

We may use join clauses in the from function in a select statement. This is the way that is normally use how ever they are about equivalent to having a select statement from where the two key match.

Outer joins(both left and right), these select all of the rows from a table even ones which don’t correlate, it just set the extra values to null.

ble even ones which don’t correlate, it just set the extra values to null.

Cross joins are bad leave them alone.

Self joins are a way of join a table on its self.

Leave a comment