freeCodeCamp Database Design Full Course

As many of you know, my technical roots are in databases, SQL, and full stack web development.

I’ve spent a lot of time creating videos on YouTube over databases. For example, I have a 51 part video series on Database Design. 

Who or What is freeCodeCamp?

Recently I was reached out to by freeCodeCamp. For those who don’t know, freeCodeCamp is one of the most popular online learning platforms for software development. freeCodeCamp is a nonprofit organization that brings people from noob to developer through their online curriculum.

freeCodeCamp came to me to talk about potential collaborations. I’m happy to say that we came to agreements and decided that we would aggregate my database design series into one long, undivided video! As a result, the Database Design Full Course was born.

Continue reading “freeCodeCamp Database Design Full Course”

Db2 SQL Tutorial 4 – Create and Drop Table

So far we’ve learned about the very basic concepts of Db2, but now I want to dive in a bit and work with tables. Some of the material in blog may take a few more blogs to fully understand, but that is okay. The goal is to get you started. Later we will come back and learn all the details.

SQL

We will be using SQL (Structured Query Language) to communicate to our database. DSM (Data Server Manager) is the UI (user interface) that we can use to work with our database, but we should do as much as we can with SQL. Why use code when there is a user interface? I’m glad you asked.

Continue reading “Db2 SQL Tutorial 4 – Create and Drop Table”

Db2 SQL Tutorial 3 – Data Structure and Data Types

Before building a database for yourself or a corporation, you need to understand a bit about database structure.

We are going to go in some depth on how to design a database, which deals with structuring your database the best way possible. However, I thought it would be appropriate to give an overview of the Db2 structure and start using the database right away.

Once we have the fundamentals down, we are going to then go back to database design to learn the details. This will allow us to more concretely discuss database design because we’ve already had some experience with the fundamentals.

Continue reading “Db2 SQL Tutorial 3 – Data Structure and Data Types”

Db2 SQL Tutorial 2 – Getting Started with Db2 and DSM

Db2 2

Here it is, your guide on getting started with Db2! Working with new software can be stressful, so my goal is to make this as easy as possible for you. Fortunately, Db2 setup is not too challenging.

Db2 Editions

Before we dive in and start downloading stuff, I want to take a moment to explain a few of the different editions of Db2. First off, we will be using Db2 for Linux, UNIX, and Windows. The edition we will be using is called Developer Community Edition (You may hear it as Developer-C) which is a full-fledged version of Db2 with the only limitation that it is only to be used for development.

Continue reading “Db2 SQL Tutorial 2 – Getting Started with Db2 and DSM”

Db2 SQL Tutorial 1 – Intro to Db2

First off, what is a database? A database stores data, which is any information that might be of use to a company.

Db2 is a database created by IBM that is best known as an enterprise database, so we are talking about a database used by huge companies who have more data than they know what to do with. The great part for us is that that there are multiple editions of Db2 going all of the way up to the enterprise editions, but actually starting with a completely free version. That’s what I’ll be using.

So back on the topic of data. A database will often be used behind the scenes when you are using some software. Anytime you put information in software that you can access at a later time, that information will be stored in a database.

Continue reading “Db2 SQL Tutorial 1 – Intro to Db2”

Intro to MongoDB

Intro to MongoDB

What is Mongo DB?  MongoDB is an unstructured database that is becoming extremely popular for speed, ease-of-use, and scalability.

The Problem with Structured Data

Until now, the majority of the my content has covered relational databases. You communicate with a relational database using SQL (Structured Query Language). A relational database follows a structure defined by columns in a table.

The problem with a structured database is that it can become too structured and require a lot of resources to create and design a good database. For instance, I have a fifty part YouTube series just on how to design the structure of a relational database, and that doesn’t even talk about how to use the database.

Just to show one example of this, what if we have a table that defines some structure and for a specific row we want to have some extra data?

Continue reading “Intro to MongoDB”

Introduction to Indexes

This will be a blog dedicated to designing relational database indexes. By this I mean we will be discussing the important topics of indexing a database but we will not be programming any SQL. This is all part of database design.

What is an index?

Wow, such as awesome question! An index allows us to select data from our table much quicker. Think of an index in a book…If you want to know something about a specific topic, you check the index.

Continue reading “Introduction to Indexes”

Introduction to Database Normalization

Any time that you design a database you will have to use normal forms. Normal forms are steps used create the best database design.

Good database design prevents non-scalar data. Non-scalar data is data that does not store only one value. Having non-scalar data violates the rule that everything should be atomic.

Good database design prevents repeating data. For example, take a look at this incorrect table:

user_idfirst_namelast_nameemail
54CalebCurryepic@legit.com
54CalebCurryCooldude@yo.com
Continue reading “Introduction to Database Normalization”

Cardinality and Modality

In the blog about designing binary relationships, I briefly described crow’s foot notation. Crow’s foot notation is a design technique that visually explains our relationship between tables.

In order to understand crow’s foot notation, we must first understand the basics of database design. I recommend you read the previous blogs listed to familiarize yourself with all of the database relationship concepts:

Cardinality 

Cardinality refers to the relationship between a row of one table and a row of another table. The only two options for cardinality are one or many.

Example: Think of a credit card company that has two tables: a table for the person who gets the card and a table for the card itself. A row from the card_holder table would have a relationship with a row in the card table because the card_holder holds the card.

Here is an example of a one to one relationship.

Continue reading “Cardinality and Modality”

Designing Binary Relationships

We talked about relationships in the relationship blog. We talked a little about how to structure relationships in a database, but this blog will be dedicated to specifically that.

One to One

One to one relationships over multiple tables are not very common. This is because a one to one relationship can be stored in one table.

Think of the example of a user table and a social security number (SSN) attribute. This would be unnecessary:

Here is an unnecessary table structure. The SSN (social security number) has its own table even though this could easily be put as a column in the user table. 
Continue reading “Designing Binary Relationships”