Categories
Programming

Relational Databases

Inspired by a mix of Julia Evans and how much fun I had last time, I threw together another sketchnote on the basics of relational databases.

Relational Databases: How we store data! They model relations between things. Databases have tables, which have rows and columns.  A column has one type of data, like CHAR, VARCHAR, and NVARCHAR for text, INT, BIGINT, FLOAT, and DOUBLE for numbers, BOOL for booleans, and DATETIME for dates and times. Columns can also be nullable, which basically means ‘optional.’ Having a single type of data per column allows databases to be very fast and efficient. Rows are the actual data in the database, and are also referred to as ‘records’ or ‘entries.’ Keys: a table has a column as its primary key. That means that each row has a unique value there, which you can use to identify the row. Kinda like a social security number, or your phone number - it’s uniquely yours! A foreign key is a value that is the primary key of another table. You can use it to reference a row in a different table.
(Obviously I’m skipping over a lot of detail, but as a very quick intro to what a relational database is, I think it works!)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.