Midterm_II_Review.pdf - MIDTERM II REVIEW REVIEW OF...

This preview shows page 1 - 6 out of 24 pages.

MIDTERM II REVIEW
REVIEW OF CONCEPTS
SQL DATABASES Relational with data normalization Normalize fields that can be their own entity and show up in multiple places. Don’t normalize data that can be infinite, basically numbers. Multiple tables with references i.e. Foreign Keys to join them We use primary keys always as references because they do not change and are unique NoSQL: Non-relational with unstructured JSON objects Relationships that may exist: 1-1, 1-many, many-many Given a list of items, make sure you look at how each column/attribute relate to each other and normalize it. THIS IS A GUARANTEED QUESTION ON THE EXAM. Example: You have a list of books with their name and genres. How would you normalize this? What relationships would you have? Understand what data types to use i.e. string, numeric, date and time Int, BigInt, Double, Varchar, Boolean, Year, Date, DateTime,
INNER VS OUTER JOINS Inner JOIN The one we’ve used in class, an intersection of the 2 tables Outer JOINs (Left, Right, Full) Left Outer Join is a Union between all the rows in the left table with the matching rows in the right table Best used for null IDs Source:
Source:

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture